My apologies if this is an FAQ.
I am going through parts of a library project that I help maintain and
would like to be able to run a short test TCL script using the uninstalled
library generated by SWIG and GNU Libtool. I will admit to being rather
unfamiliar with the intricacies of TCL's loading mechanism.
The following target is written into the local Makefile.am:
check-tcl: all-tcl
TCLLIBPATH=$(builddir)/.libs tclsh $(builddir)/tcltest.tcl \
|| echo "Tcl test failed" 1>&2
Libtool puts the newly compiled library in the .libs directory below the
directory the generated tcltest.tcl script is placed in the build tree.
Near the top of the 'tcltest.tcl' script is the following line:
lappend ::auto_path /usr/local/lib/tcl8.6/Hamlib
The path is written to the script file by the Makefile through a variable
substitution to reflect the directory the library will be installed to.
Once the main library and the generated TCL library are installed, the
'check-tcl' target succeeds.
After uninstalling the library and the generated TCL library and trying to
run the test results in:
$ make check-tcl
TCLLIBPATH=./.libs tclsh ./tcltest.tcl \
|| echo "Tcl test failed" 1>&2
can't find package hamlib
while executing
"package require hamlib"
(file "./tcltest.tcl" line 12)
Tcl test failed
It seems to me that even setting TCLLIBPATH has no effect.
What am I missing?
TIA
- Nate
--
"The optimist proclaims that we live in the best of all
possible worlds. The pessimist fears this is true."
Ham radio, Linux, bikes, and more:
http://www.n0nb.us