diff options
author | Bruno Haible <bruno@clisp.org> | 2019-11-18 13:32:46 +0100 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2019-11-18 13:32:46 +0100 |
commit | 0d41dbc7c88b10d16751466ec91efa75951426bb (patch) | |
tree | d4435d074e3d4015d8cecc9bb121b35940802020 /gnulib-tool | |
parent | d94f40cf09e42e6895ab75e5f14a9b2f682882e9 (diff) | |
download | gnulib-0d41dbc7c88b10d16751466ec91efa75951426bb.tar.gz |
gnulib-tool: Fix build error on macOS with --conditional-dependencies.
* gnulib-tool (func_modules_add_dummy): Ignore modules that are
conditionally enabled.
Diffstat (limited to 'gnulib-tool')
-rwxr-xr-x | gnulib-tool | 30 |
1 files changed, 18 insertions, 12 deletions
diff --git a/gnulib-tool b/gnulib-tool index a41522ba0e..28b5bcb71f 100755 --- a/gnulib-tool +++ b/gnulib-tool @@ -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. |