For a homegrown global TCL proc to show up across all sites you need to create the symbolic link in
$HCIROOT/tclprocs
and do your mktclindex in that directory.
If you create your symbolic link in $HCISITEDIR/tclprocs it will only be visible to the global site and $HCISITEDIR.
Unfortunately you will want to make a backup copy of
$HCIROOT/tclprocs/tclIndex
So you can do a diff after your mktclindex so you can add back the desired entries that get blown away ; otherwise, you could just make a backup copy and manually add the one entry of interest.
We had a mda_global site with link in $HCIROOT/tclprocs for a long time.
I did not find out recently about the lack of robustness of the $HCIROOT/tclprocs/tclIndex file and wasn’t impacted by it because it is the JAVA stuff that gets blown away.
Here is a script we have been using to reduce the human error that recreates all the symbolic links in $HCIROOT/tclprocs for object in our mda_global site and does a mktclindex that you can build off of if you want.
Now that we are at Cloverleaf 5.6 we simply specified mda_global as our master site and no lnger need homegrown symbolic links.
#!/usr/bin/ksh
# Begin Module Header ==============================================================================
#
#——
# Name:
#——
#
# make_links_for_mda_global_tclprocs.ksh
#
#———
# Purpose:
#———
#
# Create all the $HCIROOT/tclprocs symbolic links for all *.tcl file in the mda_global site.
#
#——-
# Notes:
#——-
#
# will remove any existing links in the $HCIROOT/tclprocs directory and
# will remove $HCIROOT/mda_global/tclprocs/tclIndex if it exists and
# will do mktclindex for the $HCIROOT/tclprocs directory
#
#———
# History:
#———
#
# 2000.08.22 Russ Ross
# – wrote initial version
#
# 2003.01.08 Russ Ross
# – modified to create absolute paths in the links to adhere to team standard
#
# End of Module Header =============================================================================
#————————————————————-
# remove any existing links in the $HCIROOT/tclprocs directory
# and chmod -rw-rw-r– all the mda_global TCL files
#————————————————————-
echo ==========
cd $HCIROOT/tclprocs
chmod 664 *
mda_global_link_list=`ls -l | grep ^l | awk ‘{print $9}’`
for mda_global_link in $mda_global_link_list; do
echo Deleting link $mda_global_link
rm $mda_global_link
done
#———————————————————-
# get list of tcl file that will need links created and
# remove $HCIROOT/mda_global/tclprocs/tclIndex if it exists
#———————————————————-
cd $HCIROOT/mda_global/tclprocs
tcl_file_list=`ls *.tcl|sort`
rm -f tclIndex
#——————————————-
# create the symbolic links
#——————————————-
echo ==========
cd $HCIROOT/tclprocs
for tcl_file in $tcl_file_list; do
echo creating link for $tcl_file
ln -s $HCIROOT/mda_global/tclprocs/$tcl_file $tcl_file
done
#————————————————–
# do mktclindex for the $HCIROOT/tclprocs directory
#————————————————–
echo ==========
echo Making TCL index file
mktclindex
To use prior to Cloverleaf 5.6 simply put the global object in $HCIROOT/mda_global/tclprocs and run it to take care of the rest.
Then if you do a manual diff of the current and backup copy of $HCIROOT/tclprocs/tclIndex to get the problematic entries you can add them back of make a separate static file of the problematic entries and modify the script to concatenate the back to $HCIROO/tclprocs/tclIndex each time the script is run.
Here are what the problematic entries look like on Cloverleaf 5.6 I’m talking about; they are problematic because the objects arent in $HCIROOT/tclprocs and there isn’t a symbolic link in that directory to the objects.
set auto_index(cljTPS) [list SourceFilter [file join $dir ../tcl/lib/tfc/cloverleafJava.tcl]]
set auto_index(cljXLTStrings) [list SourceFilter [file join $dir ../tcl/lib/tfc/cloverleafJava.tcl]]
set auto_index(cljXLTObjects) [list SourceFilter [file join $dir ../tcl/lib/tfc/cloverleafJava.tcl]]
set auto_index(cljTrxid) [list SourceFilter [file join $dir ../tcl/lib/tfc/cloverleafJava.tcl]]
set auto_index(Rm_GetStrings_grm) [list SourceFilter [file join $dir ../tcl/lib/tfc/cloverleafJava.tcl]]
set auto_index(Rm_GetStrings_xpm) [list SourceFilter [file join $dir ../tcl/lib/tfc/cloverleafJava.tcl]]
set auto_index(Rm_GetObjects_grm) [list SourceFilter [file join $dir ../tcl/lib/tfc/cloverleafJava.tcl]]
set auto_index(Rm_GetObjects_xpm) [list SourceFilter [file join $dir ../tcl/lib/tfc/cloverleafJava.tcl]]
set auto_index(Rm_GetString_grm) [list SourceFilter [file join $dir ../tcl/lib/tfc/cloverleafJava.tcl]]
set auto_index(Rm_GetString_xpm) [list SourceFilter [file join $dir ../tcl/lib/tfc/cloverleafJava.tcl]]
set auto_index(Rm_GetObject_grm) [list SourceFilter [file join $dir ../tcl/lib/tfc/cloverleafJava.tcl]]
set auto_index(Rm_GetObject_xpm) [list SourceFilter [file join $dir ../tcl/lib/tfc/cloverleafJava.tcl]]
set auto_index(SpliceStacks) [list SourceFilter [file join $dir ../tcl/lib/tfc/cloverleafJava.tcl]]
set auto_index(jtpsRun) [list SourceFilter [file join $dir ../tcl/lib/tfc/cloverleafJava.tcl]]
set auto_index(jtpsStart) [list SourceFilter [file join $dir ../tcl/lib/tfc/cloverleafJava.tcl]]
set auto_index(jtpsTime) [list SourceFilter [file join $dir ../tcl/lib/tfc/cloverleafJava.tcl]]
set auto_index(jtrxidProcess) [list SourceFilter [file join $dir ../tcl/lib/tfc/cloverleafJava.tcl]]
Russ Ross
RussRoss318@gmail.com