]> Savannah Git Hosting - gnulib.git/commitdiff
gnulib-tool: Fix build error on macOS with --conditional-dependencies.
authorBruno Haible <bruno@clisp.org>
Mon, 18 Nov 2019 12:32:46 +0000 (13:32 +0100)
committerBruno Haible <bruno@clisp.org>
Mon, 18 Nov 2019 12:32:46 +0000 (13:32 +0100)
* gnulib-tool (func_modules_add_dummy): Ignore modules that are
conditionally enabled.

ChangeLog
gnulib-tool

index a213ccae6c0921c5e7e1aecbd522b88b8b3002c7..8f3d3a3d5f5b1ffacbe1277c7d2e12476caa13f9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2019-11-18  Bruno Haible  <bruno@clisp.org>
+
+       gnulib-tool: Fix build error on macOS with --conditional-dependencies.
+       * gnulib-tool (func_modules_add_dummy): Ignore modules that are
+       conditionally enabled.
+
 2019-11-18  Bruno Haible  <bruno@clisp.org>
 
        gc: Mirror libgcrypt.m4 from libgcrypt.
index a41522ba0ea37697a32e8b886d2edf0d336874c0..28b5bcb71fbd96b36f6d5978cd0b3096b4bf692f 100755 (executable)
@@ -3283,18 +3283,24 @@ func_modules_add_dummy ()
   for module in $modules; do
     func_verify_nontests_module
     if test -n "$module"; then
-      # Extract the value of "lib_SOURCES += ...".
-      for file in `func_get_automake_snippet "$module" | combine_lines |
-                   sed -n -e 's,^lib_SOURCES[   ]*+=\([^#]*\).*$,\1,p'`; do
-        # Ignore .h files since they are not compiled.
-        case "$file" in
-          *.h) ;;
-          *)
-            have_lib_SOURCES=yes
-            break 2
-            ;;
-        esac
-      done
+      if test "$cond_dependencies" = true && func_cond_module_p $module; then
+        # Ignore conditional modules, since they are not guaranteed to
+        # contribute to lib_SOURCES.
+        :
+      else
+        # Extract the value of "lib_SOURCES += ...".
+        for file in `func_get_automake_snippet "$module" | combine_lines |
+                     sed -n -e 's,^lib_SOURCES[         ]*+=\([^#]*\).*$,\1,p'`; do
+          # Ignore .h files since they are not compiled.
+          case "$file" in
+            *.h) ;;
+            *)
+              have_lib_SOURCES=yes
+              break 2
+              ;;
+          esac
+        done
+      fi
     fi
   done
   # Add the dummy module, to make sure the library will be non-empty.