From: Bruno Haible Date: Wed, 15 Mar 2017 22:24:03 +0000 (+0100) Subject: gnulib-tool: Don't produce a tests directory with only snippet .h files. X-Git-Tag: v1.0~6318 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=363135016c25696d7a173094715e7f3f2dda3596;p=gnulib.git 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. --- diff --git a/ChangeLog b/ChangeLog index 2e3d0ed6ef..a4fa592119 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2017-03-14 Bruno Haible + + 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 vma-iter: Add support for HP-UX. 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/^/ /'