From: Bruno Haible Date: Fri, 1 Sep 2006 11:57:26 +0000 (+0000) Subject: Improve maintainability. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5a7c8db71983a4dfe1885f2c51f5217dff544e5b;p=pspp Improve maintainability. Fix a typo. --- diff --git a/ChangeLog b/ChangeLog index 93a5cca70f..80e8a33b64 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2006-08-31 Bruno Haible + + * gnulib-tool (nl): Remove variable. + (sed_transform_lib_file): Use more robust test for config-h module. + (func_import): Fix typo in 2006-08-25 patch. + 2006-08-31 Paul Eggert * modules/getloadavg (Files): Add m4/getloadavg.m4. diff --git a/gnulib-tool b/gnulib-tool index bbe38a94de..6551dbf851 100755 --- a/gnulib-tool +++ b/gnulib-tool @@ -22,7 +22,7 @@ progname=$0 package=gnulib -cvsdatestamp='$Date: 2006-08-31 14:36:39 $' +cvsdatestamp='$Date: 2006-09-01 11:57:26 $' last_checkin_date=`echo "$cvsdatestamp" | sed -e 's,^\$[D]ate: ,,'` version=`echo "$last_checkin_date" | sed -e 's/ .*$//' -e 's,/,-,g'` @@ -59,9 +59,6 @@ if test -z "$SORT"; then SORT=sort fi -nl=' -' - # func_usage # outputs to stdout the --help usage message. func_usage () @@ -1418,7 +1415,7 @@ func_import () license=`func_get_license $module` case $license in LGPL | 'GPLed build tool') ;; - 'public domain' | 'unlimited' | 'unmodifiable license text') ;; + 'public domain' | 'unlimited' | 'unmodifiable license text') ;; *) func_fatal_error "incompatible license on module $module: $license" ;; esac done @@ -1426,13 +1423,15 @@ func_import () # Determine script to apply to imported library files. sed_transform_lib_file= - case $nl$modules$nl in - *"${nl}config-h$nl"*) + for module in $modules; do + if test $module = config-h; then # Assume config.h exists, and that -DHAVE_CONFIG_H is omitted. sed_transform_lib_file=$sed_transform_lib_file' - s/^#ifdef[ ]*HAVE_CONFIG_H[ ]*$/#if 1/ - ' ;; - esac + s/^#ifdef[ ]*HAVE_CONFIG_H[ ]*$/#if 1/ + ' + break + fi + done if test -n "$lgpl"; then # Update license. sed_transform_lib_file=$sed_transform_lib_file' @@ -1564,7 +1563,7 @@ func_import () func_dest_tmpfilename "$g" func_lookup_file "$f" cp "$lookedup_file" "$tmpfile" || func_fatal_error "failed" - if test -n "sed_transform_lib_file"; then + if test -n "$sed_transform_lib_file"; then case "$f" in lib/*) sed -e "$sed_transform_lib_file" \