diff options
author | Bruno Haible <bruno@clisp.org> | 2006-09-01 11:57:26 +0000 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2006-09-01 11:57:26 +0000 |
commit | 5a7c8db71983a4dfe1885f2c51f5217dff544e5b (patch) | |
tree | c97c4e53b12e061d523d87ed398f3a3d1f525290 | |
parent | 476acf7e0ed9a77255df9f51fd71cdb731c2fddb (diff) | |
download | gnulib-5a7c8db71983a4dfe1885f2c51f5217dff544e5b.tar.gz |
Improve maintainability.
Fix a typo.
-rw-r--r-- | ChangeLog | 6 | ||||
-rwxr-xr-x | gnulib-tool | 21 |
2 files changed, 16 insertions, 11 deletions
@@ -1,3 +1,9 @@ +2006-08-31 Bruno Haible <bruno@clisp.org> + + * 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 <eggert@cs.ucla.edu> * 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" \ |