bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

gnulib-tool: fix generated code when libtests contains module 'alloca'


From: Bruno Haible
Subject: gnulib-tool: fix generated code when libtests contains module 'alloca'
Date: Mon, 15 May 2017 23:21:28 +0200
User-agent: KMail/5.1.3 (Linux/4.4.0-75-generic; KDE/5.18.0; x86_64; ; )

The use of gnulib-tool in gettext currently fails:

  gnulib-tests/Makefile.gnulib:55: error: @LTALLOCA@ used but 'LTALLOCA' is 
undefined
  gnulib-tests/Makefile.am:20:   'gnulib-tests/Makefile.gnulib' included from 
here

What triggers this, is that gettext uses the module 'copy-file', whose tests
now have a new dependency chain towards the module 'alloca':

  copy-file -> utimens     -> utime
               utimens-tests, utime-tests -> nanosleep -> select -> alloca

The generated Makefile.am lines

  libtests_a_LIBADD += @LTALLOCA@
  libtests_a_DEPENDENCIES += @LTALLOCA@

are wrong, because libtests.a is a "convenience library", not a "libtool 
library".
The special thing about the code in function func_emit_tests_Makefile_am
is that it deals with both a possibly libtool library (namely
${libname}.${libext}) and a convenience library (namely libtests.a).

This patch fixes it.


2017-05-15  Bruno Haible  <address@hidden>

        gnulib-tool: Fix generated code when libtests contains module 'alloca'.
        * gnulib-tool (func_emit_tests_Makefile_am): For libtests.a, use
        @ALLOCA@, not @address@hidden

diff --git a/gnulib-tool b/gnulib-tool
index 5dd77f7..f3463b6 100755
--- a/gnulib-tool
+++ b/gnulib-tool
@@ -3828,8 +3828,8 @@ func_emit_tests_Makefile_am ()
                 -e "$sed_transform_check_PROGRAMS" \
                 -e "$sed_replace_include_guard_prefix"
           if $use_libtests && test "$module" = 'alloca'; then
-            echo "libtests_a_LIBADD += @${perhapsLT}ALLOCA@"
-            echo "libtests_a_DEPENDENCIES += @${perhapsLT}ALLOCA@"
+            echo "libtests_a_LIBADD += @ALLOCA@"
+            echo "libtests_a_DEPENDENCIES += @ALLOCA@"
           fi
         } > "$tmp"/amsnippet
         # Skip the contents if it's entirely empty.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]