]> Savannah Git Hosting - gnulib.git/commitdiff
gnulib-tool: Respect applicability 'all' without --single-configure.
authorBruno Haible <bruno@clisp.org>
Sat, 25 Dec 2021 11:19:13 +0000 (12:19 +0100)
committerBruno Haible <bruno@clisp.org>
Sat, 25 Dec 2021 11:19:13 +0000 (12:19 +0100)
* gnulib-tool (func_verify_tests_module): Treat modules with
applicability 'all' like 'tests' modules, not like 'main' modules.

ChangeLog
gnulib-tool

index 6e31734e215694b4ba2eb1dee330d595e2d53689..cc9c38192d9d55384f66278ee7ae47df71e67201 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2021-12-25  Bruno Haible  <bruno@clisp.org>
+
+       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  <eggert@cs.ucla.edu>
 
        maint: avoid empty lines in recipes
index 0d4f246d8c91463fe5271844d03fef26eaef1c54..c2607c95a0f855e8b299ac2e4c0e4184cb0a28b3 100755 (executable)
@@ -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