changeset 12055:4d4f9a27cde5

Add 'link-warning' to testsrelated_modules during --import.
author Bruno Haible <bruno@clisp.org>
date Wed, 23 Sep 2009 10:28:57 +0200
parents 1c9a8901e75c
children e0c5d88f8c3b
files ChangeLog gnulib-tool
diffstat 2 files changed, 13 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2009-09-23  Bruno Haible  <bruno@clisp.org>
+
+	* gnulib-tool (func_import): Add 'link-warning' to testsrelated_modules
+	when needed.
+	Test case: gnulib-tool --import --with-tests atexit inttypes.
+	Reported by Pauli Miettinen <pauli.miettinen@cs.helsinki.fi>.
+
 2009-09-23  Bruno Haible  <bruno@clisp.org>
 
 	* gnulib-tool (func_emit_tests_Makefile_am): Set uses_subdirs in a
--- a/gnulib-tool
+++ b/gnulib-tool
@@ -2743,9 +2743,10 @@
   # ignoring tests modules. Its lib/* sources go into $sourcebase/. If --lgpl
   # is specified, it will consist only of LGPLed source.
   # The tests-related module list is the transitive closure of the specified
-  # modules, including tests modules, minus the main module list. Its lib/*
-  # sources (brought in through dependencies of *-tests modules) go into
-  # $testsbase/. It may contain GPLed source, even if --lgpl is specified.
+  # modules, including tests modules, minus the main module list excluding
+  # 'link-warning'. Its lib/* sources (brought in through dependencies of
+  # *-tests modules) go into $testsbase/. It may contain GPLed source, even if
+  # --lgpl is specified.
   # Determine main module list.
   saved_inctests="$inctests"
   inctests=""
@@ -2759,7 +2760,8 @@
   fi
   # Determine tests-related module list.
   echo "$final_modules" | LC_ALL=C sort -u > "$tmp"/final-modules
-  testsrelated_modules=`func_reset_sigpipe; echo "$main_modules" | LC_ALL=C sort -u | LC_ALL=C join -v 2 - "$tmp"/final-modules`
+  sed_remove_link_warning='/^link-warning$/d'
+  testsrelated_modules=`func_reset_sigpipe; echo "$main_modules" | LC_ALL=C sort -u | sed -e "$sed_remove_link_warning" | LC_ALL=C join -v 2 - "$tmp"/final-modules`
   if test $verbose -ge 1; then
     echo "Tests-related module list:"
     echo "$testsrelated_modules" | sed -e 's/^/  /'