summaryrefslogtreecommitdiff
path: root/gnulib-tool
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2017-03-15 23:24:03 +0100
committerBruno Haible <bruno@clisp.org>2017-03-15 23:25:37 +0100
commit363135016c25696d7a173094715e7f3f2dda3596 (patch)
tree275ffc0316d4732f07b09f9710e280a06dec2bdc /gnulib-tool
parentc1a21de2148bbc6cb3401e82ae1b75f0be077200 (diff)
downloadgnulib-363135016c25696d7a173094715e7f3f2dda3596.tar.gz
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.
Diffstat (limited to 'gnulib-tool')
-rwxr-xr-xgnulib-tool12
1 files changed, 12 insertions, 0 deletions
diff --git a/gnulib-tool b/gnulib-tool
index 0d1ceb242e..b6726452cd 100755
--- a/gnulib-tool
+++ b/gnulib-tool
@@ -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/^/ /'