diff options
author | Bruno Haible <bruno@clisp.org> | 2011-06-13 12:29:46 +0200 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2011-06-13 12:29:46 +0200 |
commit | 6c6ac3672f5a8079fcab8b60698496524d6bf698 (patch) | |
tree | daaaadad6b326206afea4f61b87a671228eefeae /gnulib-tool | |
parent | a203d01a877e80e8a07147d892ec89a63498f7ff (diff) | |
download | gnulib-6c6ac3672f5a8079fcab8b60698496524d6bf698.tar.gz |
gnulib-tool: Allow comments in the 'Depends-on' section.
* doc/gnulib.texi (Module description): Mention comment syntax in the
Depends-on section.
* gnulib-tool (func_get_dependencies): Filter out comment lines.
Diffstat (limited to 'gnulib-tool')
-rwxr-xr-x | gnulib-tool | 32 |
1 files changed, 17 insertions, 15 deletions
diff --git a/gnulib-tool b/gnulib-tool index 0f315a492d..37073ededf 100755 --- a/gnulib-tool +++ b/gnulib-tool @@ -2096,24 +2096,26 @@ func_get_dependencies () ;; esac # Then the explicit dependencies listed in the module description. - if ! $modcache; then - func_lookup_file "modules/$1" - sed -n -e "/^Depends-on$sed_extract_prog" < "$lookedup_file" - else - func_cache_lookup_module "$1" - # Output the field's value, including the final newline (if any). - if $have_associative; then - if eval 'test -n "${modcache_dependson[$1]+set}"'; then - eval 'echo "${modcache_dependson[$1]}"' - fi + { if ! $modcache; then + func_lookup_file "modules/$1" + sed -n -e "/^Depends-on$sed_extract_prog" < "$lookedup_file" else - eval "field_set=\"\$${cachevar}_dependson_set\"" - if test -n "$field_set"; then - eval "field_value=\"\$${cachevar}_dependson\"" - echo "${field_value}" + func_cache_lookup_module "$1" + # Output the field's value, including the final newline (if any). + if $have_associative; then + if eval 'test -n "${modcache_dependson[$1]+set}"'; then + eval 'echo "${modcache_dependson[$1]}"' + fi + else + eval "field_set=\"\$${cachevar}_dependson_set\"" + if test -n "$field_set"; then + eval "field_value=\"\$${cachevar}_dependson\"" + echo "${field_value}" + fi fi fi - fi + } \ + | sed -e '/^#/d' } # func_get_autoconf_early_snippet module |