>From 83948c64d10c77fb964e6523a9524729d6a66f32 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sat, 25 Dec 2021 12:19:13 +0100 Subject: [PATCH 1/2] gnulib-tool: Respect applicability 'all' without --single-configure. * gnulib-tool (func_verify_tests_module): Treat modules with applicability 'all' like 'tests' modules, not like 'main' modules. --- ChangeLog | 6 ++++++ gnulib-tool | 30 +++++++++++++++++------------- 2 files changed, 23 insertions(+), 13 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6e31734e2..cc9c38192 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2021-12-25 Bruno Haible + + gnulib-tool: Respect applicability 'all' without --single-configure. + * gnulib-tool (func_verify_tests_module): Treat modules with + applicability 'all' like 'tests' modules, not like 'main' modules. + 2021-12-24 Paul Eggert maint: avoid empty lines in recipes diff --git a/gnulib-tool b/gnulib-tool index 0d4f246d8..c2607c95a 100755 --- a/gnulib-tool +++ b/gnulib-tool @@ -1894,19 +1894,6 @@ func_verify_nontests_module () esac } -# func_verify_tests_module -# verifies a module name, considering only tests modules -# Input: -# - local_gnulib_path from --local-dir -# - module module name argument -func_verify_tests_module () -{ - case "$module" in - *-tests ) func_verify_module ;; - * ) module= ;; - esac -} - # Suffix of a sed expression that extracts a particular field from a # module description. # A field starts with a line that contains a keyword, such as 'Description', @@ -2793,6 +2780,23 @@ func_get_tests_module () fi } +# func_verify_tests_module +# verifies a module name, considering only tests modules and modules with +# applicability 'all'. +# Input: +# - local_gnulib_path from --local-dir +# - modcache true or false, from --cache-modules/--no-cache-modules +# - module module name argument +func_verify_tests_module () +{ + func_verify_module + if test -n "$module"; then + if test `func_get_applicability $module` = main; then + module= + fi + fi +} + # func_get_dependencies_recursively module # Input: # - local_gnulib_path from --local-dir -- 2.25.1