mktclindex is a simple Tcl script that runs the Tcl auto_mkindex command.
This creates a file of the name tclIndex in the currect directory. The tclIndex file is an array with index of process name and a value of the SourceFilter command with aruments of the full path to the file containing the Tcl procedure. The SourceFilter command is a specialized version of the source command.
Nothing magic here 😀 When a procedure is needed the Tcl path (auto_path) is searched for tclIndex files with that procedure. When found, simply load that file via the SourceFilter command to the interpreter.
Since mktclindex is simply a script of Tcl commands you can modify it to do whatever you want. If you look at it you will see the mdification I made to warn you of duplicate procedures.
We came in this morning and found the tclIndex file on one of our sites was corrupted. It only contained 3 lines. The timestamp on the file was from around 3pm yesterday afternoon. The latest timestamp on any of the files in the tclprocs directory was from May 15th. We have asked the others on the Cloverleaf staff here but no one admits running the mktclindex command yesterday on that site.