From 21a86f429e295a0daeb72b1485a01a46ca15cb41 Mon Sep 17 00:00:00 2001 From: Nate Bargmann Date: Thu, 27 Jul 2017 14:44:40 -0500 Subject: [PATCH] Fix TCL script test target--check-tcl Found that when nothing was installed that check-tcl failed with a failure of tclsh not being able to load the shared library. Thanks to assistance from comp.lang.tcl, copying pkgIndex.tcl to $(builddir)/.libs prior to loading the test script allows the script to load the shared library immediately after 'make' and before 'make install'. Prefixed various TCL section target commands with either $(AM_V_GEN) or $(AM_V_at) to conditionally silence the output of 'make'. --- bindings/Makefile.am | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/bindings/Makefile.am b/bindings/Makefile.am index 716686222..a6a72c0d2 100644 --- a/bindings/Makefile.am +++ b/bindings/Makefile.am @@ -158,22 +158,25 @@ hamlibtcl_la_LTLIBRARIES = $(tcl_ltlib) # Having the first occurance of 'hamlib' capitalized seemed to cause confusion # for the TCL interpreter loading the Hamlib module. pkgIndex.tcl: Makefile - echo 'package ifneeded hamlib $(PKG_VER) [list load [file join $$dir $(DLL)] Hamlib]' > pkgIndex.tcl + $(AM_V_at)echo 'package ifneeded hamlib $(PKG_VER) [list load [file join $$dir $(DLL)] Hamlib]' > pkgIndex.tcl hamlibtcl_wrap.c: hamlib.swg $(SWGDEP) - $(SWIG) -tcl -pkgversion $(PKG_VER) $(AM_CPPFLAGS) -I$(top_srcdir)/bindings \ - -o $@ `test -f hamlib.swg || echo '$(srcdir)/'`hamlib.swg + $(AM_V_GEN)$(SWIG) -tcl -pkgversion $(PKG_VER) $(AM_CPPFLAGS) \ + -I$(top_srcdir)/bindings \ + -o $@ `test -f hamlib.swg || echo '$(srcdir)/'`hamlib.swg do_subst = sed -e 's,[@]tcldir[@],$(tcldir),g' tcltest.tcl: tcltest.tcl.in Makefile - $(do_subst) < $(srcdir)/tcltest.tcl.in > tcltest.tcl + $(AM_V_GEN)$(do_subst) < $(srcdir)/tcltest.tcl.in > tcltest.tcl all-tcl: pkgIndex.tcl $(tcl_ltlib) tcltest.tcl check-tcl: all-tcl - TCLLIBPATH=$(builddir)/.libs tclsh $(builddir)/tcltest.tcl \ - || echo "Tcl test failed" 1>&2 + $(AM_V_at)cp $(builddir)/pkgIndex.tcl $(builddir)/.libs + $(AM_V_at)TCLLIBPATH=$(builddir)/.libs tclsh $(builddir)/tcltest.tcl \ + || echo "Tcl test failed" 1>&2 + $(AM_V_at)rm -f $(builddir)/.libs/pkgIndex.tcl install-tcl: clean-tcl: