* gnulib-tool (func_modules_add_dummy, func_import): Abort loops early if we already know the answer. --- gnulib-tool | 16 ++++++---------- 1 files changed, 6 insertions(+), 10 deletions(-)
diff --git a/gnulib-tool b/gnulib-tool index c172d6c..af0726e 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 @@ -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