# HG changeset patch # User Bruno Haible # Date 1550262464 -3600 # Node ID a7fe9f54c3dfe8301cfb88c11fafe0b8898f45d2 # Parent 7f0ac0398fae959a717dced84eb5052b760657d1 gnulib-tool: Support --import with just a few tests, not --with-tests. * gnulib-tool (func_import): New variable 'gentests'. Use it instead of 'inctests' when generating files; use 'inctests' only for computing the transitive closure. diff -r 7f0ac0398fae -r a7fe9f54c3df ChangeLog --- a/ChangeLog Thu Feb 14 20:50:57 2019 +0100 +++ b/ChangeLog Fri Feb 15 21:27:44 2019 +0100 @@ -1,3 +1,10 @@ +2019-02-15 Bruno Haible + + gnulib-tool: Support --import with just a few tests, not --with-tests. + * gnulib-tool (func_import): New variable 'gentests'. Use it instead of + 'inctests' when generating files; use 'inctests' only for computing the + transitive closure. + 2019-02-14 Bruno Haible gnulib-tool: Improve handling of multiple --local-dir options. diff -r 7f0ac0398fae -r a7fe9f54c3df gnulib-tool --- a/gnulib-tool Thu Feb 14 20:50:57 2019 +0100 +++ b/gnulib-tool Fri Feb 15 21:27:44 2019 +0100 @@ -5107,6 +5107,14 @@ s,^top/,$rewritten, s,^$rewritten,," + # Determine whether to put anything into $testsbase. + testsfiles=`echo "$files" | sed -n -e 's,^tests/,,p' -e 's,^tests=lib/,,p'` + if test -n "$testsfiles"; then + gentests=true + else + gentests=false + fi + # Create directories. { echo "$sourcebase" echo "$m4base" @@ -5117,7 +5125,7 @@ if test -n "$docfiles"; then echo "$docbase" fi - if $inctests; then + if $gentests; then echo "$testsbase" fi echo "$auxdir" @@ -5412,7 +5420,7 @@ && ! { test -f "${destdir}/${dir1}Makefile.am" \ || test "${dir1}Makefile.am" = "$sourcebase/$makefile_am" \ || test "./${dir1}Makefile.am" = "$sourcebase/$makefile_am" \ - || { $inctests \ + || { $gentests \ && { test "${dir1}Makefile.am" = "$testsbase/$makefile_am" \ || test "./${dir1}Makefile.am" = "$testsbase/$makefile_am"; }; }; }; do dir2=`echo "$dir1" | sed -e "$sed_last"`"$dir2" @@ -5833,7 +5841,7 @@ fi fi - if $inctests; then + if $gentests; then # Create tests makefile. func_dest_tmpfilename $testsbase/$makefile_am destfile="$testsbase/$makefile_am" @@ -6021,7 +6029,7 @@ if test -n "$pobase"; then echo " - add \"$pobase/Makefile.in\" to AC_CONFIG_FILES in $configure_ac," fi - if $inctests; then + if $gentests; then if test "$makefile_am" = Makefile.am; then echo " - add \"$testsbase/Makefile\" to AC_CONFIG_FILES in $configure_ac," else