diff options
author | Alexandre Duret-Lutz <adl@gnu.org> | 2004-05-22 07:19:37 +0000 |
---|---|---|
committer | Alexandre Duret-Lutz <adl@gnu.org> | 2004-05-22 07:19:37 +0000 |
commit | bf7ab094627292822942e404fcf1e42d329e631a (patch) | |
tree | 7aec72b120f8a79eda4823089d1d397c4bf449ae /lib/Automake/Variable.pm | |
parent | 7c75aeb218a6d57e835263c28de3f2d4ed929d85 (diff) | |
download | automake-bf7ab094627292822942e404fcf1e42d329e631a.tar.gz |
Check directory names for unportable names. Shaking the code
to check this also led to the removal of the no-"/"-in-SUBDIRS
restriction, and a fix to _do_recursive_traversal.
* automake.in (check_directory): New function extracted from
handle_subdirs, and augmented to check for reserved W32/DOS name.
(check_directories_in_var): New function.
(handle_subdirs): Call check_directories_in_var. Doing so also
suppress the restriction that SUBDIRS should not contain slashes.
(scan_autoconf_traces) <AC_CONFIG_AUX_DIR>: Call check_directory
to ensure the argument exists and is safe.
* doc/automake.texi (Top level): Do not say that src/subdir
cannot be put in SUBDIRS.
(Dist): Mention that distdir and top_distdir can be absolute.
* lib/Automake/Variable.pm (_do_recursive_traversal) Support
undefined $fun_collect, and fix two bugs introduced with
skip_ac_subst on 2004-03-07.
* lib/am/distdir.am (distdir): Use absolute distdir and
top_distdir when recursing, because we can no longer prepend only
`..' in case of SUBDIRS with `/'.
* tests/auxdir4.test, tests/subdir9.test: New files.
* tests/Makefile.am (TESTS): Add auxdir4.test.
* tests/cond2.test, tests/subdir7.test: Augment to check location
in diagnostics.
Diffstat (limited to 'lib/Automake/Variable.pm')
-rw-r--r-- | lib/Automake/Variable.pm | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/Automake/Variable.pm b/lib/Automake/Variable.pm index 0bb14434f..591b7790a 100644 --- a/lib/Automake/Variable.pm +++ b/lib/Automake/Variable.pm @@ -1225,8 +1225,8 @@ If C<skip_ac_subst> is set, Autoconf @substitutions@ will be skipped, i.e., C<&fun_item> will never be called for them. C<&fun_item> may return a list of items, they will be passed to -C<&fun_store> later on. Define C<&fun_item> as C<undef> when it serve -no purpose, this will speed things up. +C<&fun_store> later on. Define C<&fun_item> or @<&fun_store> as +C<undef> when they serve no purpose. Once all items of a variable have been processed, the result (of the calls to C<&fun_items>, or of recursive traversals of subvariables) @@ -1338,7 +1338,8 @@ sub _do_recursive_traversal ($$&&$$$$) $fun_collect, $cond_filter, $full_cond, - $inner_expand); + $inner_expand, + $skip_ac_subst); push (@result, @res); pop @_substfroms; @@ -1383,7 +1384,7 @@ sub _do_recursive_traversal ($$&&$$$$) # We do not know any variable with this name. Fall through # to filename processing. } - elsif ($skip_ac_subst && $var =~ /^\@.+\@$/) + elsif ($skip_ac_subst && $val =~ /^\@.+\@$/) { next; } @@ -1412,6 +1413,8 @@ sub _do_recursive_traversal ($$&&$$$$) # is free to use the same variable several times in the same definition. $var->{'scanned'} = -1; + return () + unless $fun_collect; # Make sure you update the doc of Automake::Variable::traverse_recursively # if you change the prototype of &fun_collect. return &$fun_collect ($var, $parent_cond, @allresults); |