Hi Dmitriy,

> It seems I've found another small bug inside gnulib-tool.
> 
> In func_emit_tests_Makefile_am at lines 3618-3620 we add two lines
> to emit if module is 'alloca' and we use perhapsLT variable. The problem
> is that it is always empty.
> 
> BTW, there are no other places in func_emit_tests_Makefile_am where we
> need perhapsLT. I guess that it must be 'LT' if we use libtool and ''
> if not, like in func_emit_lib_Makefile_am, but I'm not sure.

The variable perhapsLT gets set in func_emit_lib_Makefile_am, which
*happens* to be invoked before func_emit_tests_Makefile_am. So it's
not a bug, only very sloppy and fragile coding style. Corrected as
follows:


2012-08-19  Bruno Haible  <[email protected]>

        gnulib-tool: Improve coding style.
        * gnulib-tool (func_emit_tests_Makefile_am): Set perhapsLT, like in
        func_emit_lib_Makefile_am.
        Reported and fix suggested by Dmitriy Selyutin <[email protected]>.

--- gnulib-tool.orig    Sun Aug 19 14:11:39 2012
+++ gnulib-tool Sun Aug 19 14:10:22 2012
@@ -3576,9 +3576,11 @@
   witness_macro="$1"
   if test "$libtool" = true; then
     libext=la
+    perhapsLT=LT
     sed_eliminate_LDFLAGS="$sed_noop"
   else
     libext=a
+    perhapsLT=
     sed_eliminate_LDFLAGS='/^lib_LDFLAGS[       ]*+=/d'
   fi
   if $for_test; then


Reply via email to