#
# This is a Wafe script to build the initial indices for the tcl
# libraries provided with wafe and to achive backward compatibility
#
puts stderr "building aliases for backward compatibility ..."
source mkAliasIndex.tcl
mkAliasIndex bc *.tcl

puts stderr "building index in Wafe tcl library..."
if [string match "" [info proc auto_mkindex]] {
    puts stderr ""
    puts stderr "Problem:"
    puts stderr "   'auto_mk_index' is not defined, probably since init.tcl is"
    puts stderr "   not installed. I expect init.tcl in [info library]."
    puts stderr "   If the standard (not necessarily Wafe specific) tcl library"
    puts stderr "   is installed at a non-standard place (the default is "
    puts stderr "   /usr/local/lib/tcl/) you should "
    puts stderr "      a) specify the directory when you compile tcl"
    puts stderr "         (see TCL_LIBRARY in the Makefile of tcl), or"
    puts stderr "      b) use the TCL_LIBRARY environment variable"
    puts stderr "aborting."
    quit
} 

auto_mkindex . *.tcl
puts stderr "Indices build"
quit
