]> Savannah Git Hosting - gnulib.git/commitdiff
gnulib-tool: Don't produce a tests directory with only snippet .h files.
authorBruno Haible <bruno@clisp.org>
Wed, 15 Mar 2017 22:24:03 +0000 (23:24 +0100)
committerBruno Haible <bruno@clisp.org>
Wed, 15 Mar 2017 22:25:37 +0000 (23:25 +0100)
* gnulib-tool (func_modules_transitive_closure_separately): If
testsrelated_modules ends up with no "real" modules, aside from
modules with applicability 'all', set it to empty.

ChangeLog
gnulib-tool

index 2e3d0ed6ef109622d7dd985e8eed8c81172edfbe..a4fa59211940e408729aa829f997a86157471ac2 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2017-03-14  Bruno Haible  <bruno@clisp.org>
+
+       gnulib-tool: Don't produce a tests directory with only snippet .h files.
+       * gnulib-tool (func_modules_transitive_closure_separately): If
+       testsrelated_modules ends up with no "real" modules, aside from
+       modules with applicability 'all', set it to empty.
+
 2017-03-14  Bruno Haible  <bruno@clisp.org>
 
        vma-iter: Add support for HP-UX.
index 0d1ceb242e3a474e07f8d29944be92ce267b1dc6..b6726452cd0df7443a91fd4dd571a4ffe3c65cbf 100755 (executable)
@@ -3048,6 +3048,18 @@ func_modules_transitive_closure_separately ()
                           fi
                         done \
                         | LC_ALL=C sort -u | LC_ALL=C join -v 2 - "$tmp"/final-modules`
+  # If testsrelated_modules consists only of modules with applicability 'all',
+  # set it to empty (because such modules are only helper modules for other modules).
+  have_nontrivial_testsrelated_modules=
+  for module in $testsrelated_modules; do
+    if test `func_get_applicability $module` != all; then
+      have_nontrivial_testsrelated_modules=yes
+      break
+    fi
+  done
+  if test -z "$have_nontrivial_testsrelated_modules"; then
+    testsrelated_modules=
+  fi
   if test $verbose -ge 1; then
     echo "Tests-related module list:"
     echo "$testsrelated_modules" | sed -e 's/^/  /'