Hi Paul, > I installed the attached patch to Gnulib on Savannah; please give it a try.
This patch has the strange consequence that the gnulib import in GNU clisp now installs files tests/_Noreturn.h tests/arg-nonnull.h tests/c++defs.h tests/dummy.c tests/warn-on-use.h although the gnulib-tool invocation did not contain --with-tests, nor any tests module. The underlying problem is present since the beginning: Modules with applicability 'all' get added to $testsrelated_modules, from which the file list for tests/ is built. So far this had no consequences, because the files of these modules were under build-aux/ - so the use of the same module in $libdir and $testsdir was idempotent. But now, these modules install files such as arg-nonnull.h twice. I'm fixing this problem like this: 2017-03-14 Bruno Haible <br...@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. diff --git a/gnulib-tool b/gnulib-tool index 0d1ceb2..b672645 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/^/ /'