* gnulib-tool (func_modules_add_dummy, func_emit_lib_Makefile_am) (func_emit_tests_Makefile_am, func_import): Abort loops early if we already know the answer. ---
Sorry, I forgot a couple of instances. Updated patch. Cheers, Ralf gnulib-tool | 20 ++++++++------------ 1 files changed, 8 insertions(+), 12 deletions(-) diff --git a/gnulib-tool b/gnulib-tool index c172d6c..ad27f21 100755 --- a/gnulib-tool +++ b/gnulib-tool @@ -1726,7 +1726,7 @@ ba # Ignore .h files since they are not compiled. case "$file" in *.h) ;; - *) have_lib_SOURCES=yes ;; + *) have_lib_SOURCES=yes; break 2 ;; esac done fi @@ -1892,7 +1892,7 @@ func_emit_lib_Makefile_am () func_get_filelist "$module" for f in $module_files; do case $f in - lib/*/*.c) uses_subdirs=yes ;; + lib/*/*.c) uses_subdirs=yes; break ;; esac done fi @@ -2141,7 +2141,7 @@ func_emit_tests_Makefile_am () func_get_filelist "$module" for f in $module_files; do case $f in - lib/*/*.c | tests/*/*.c) uses_subdirs=yes ;; + lib/*/*.c | tests/*/*.c) uses_subdirs=yes; break ;; esac done fi @@ -2664,15 +2664,11 @@ func_import () if test -n "$module"; then func_get_filelist $module all_files=$module_files - lib_files=`for f in $all_files; do \ - case $f in \ - lib/*) echo $f ;; \ - esac; \ - done | sed -e 's,^lib/,,'` - if test -n "$lib_files"; then - use_libtests=true - break - fi + for f in $all_files; do + case $f in + lib/*) use_libtests=true; break 2;; + esac + done fi done -- 1.6.1.rc3.96.g159c88