+2004-03-07 Alexandre Duret-Lutz <adl@gnu.org>
+
+ * lib/Automake/Variable.pm (traverse_recursively,
+ _do_recursive_traversal): Honor the skip_ac_subst option.
+ * automake.in (handle_dist): Use skip_ac_subst.
+
2004-02-29 Alexandre Duret-Lutz <adl@gnu.org>
* Makefile.am (cvs-release): Upload to ~ftp/pub/automake, not
# appropriate condition. This is meaningful if the nature of
# the distribution should depend upon the configure options
# used.
- foreach ($extra_dist->value_as_list_recursive)
+ foreach ($extra_dist->value_as_list_recursive (skip_ac_subst => 1))
{
- next if /^\@.*\@$/;
next unless s,/+[^/]+$,,;
$dist_dirs{$_} = 1
unless $_ eq '.';
# We have to check DIST_COMMON for extra directories in case the
# user put a source used in AC_OUTPUT into a subdir.
my $topsrcdir = backname ($relative_dir);
- foreach (rvar ('DIST_COMMON')->value_as_list_recursive)
+ foreach (rvar ('DIST_COMMON')->value_as_list_recursive (skip_ac_subst => 1))
{
- next if /^\@.*\@$/;
s/\$\(top_srcdir\)/$topsrcdir/;
s/\$\(srcdir\)/./;
# Strip any leading `./'.
return $res;
}
-=item C<$var-E<gt>traverse_recursively (&fun_item, &fun_collect, [cond_filter =E<gt> $cond_filter], [inner_expand =E<gt> 1])>
+=item C<$var-E<gt>traverse_recursively (&fun_item, &fun_collect, [cond_filter =E<gt> $cond_filter], [inner_expand =E<gt> 1], [skip_ac_subst =E<gt> 1])>
Split the value of the Automake::Variable C<$var> on space, and
traverse its components recursively.
(as in C<$(BASE).ext>) are expansed before the filename is passed to
C<&fun_item>.
+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.
my ($var, $fun_item, $fun_collect, %options) = @_;
my $cond_filter = $options{'cond_filter'};
my $inner_expand = $options{'inner_expand'};
+ my $skip_ac_subst = $options{'skip_ac_subst'};
return $var->_do_recursive_traversal ($var,
$fun_item, $fun_collect,
- $cond_filter, TRUE, $inner_expand)
+ $cond_filter, TRUE, $inner_expand,
+ $skip_ac_subst)
}
# The guts of Automake::Variable::traverse_recursively.
-sub _do_recursive_traversal ($$&&$$$)
+sub _do_recursive_traversal ($$&&$$$$)
{
my ($var, $parent, $fun_item, $fun_collect, $cond_filter, $parent_cond,
- $inner_expand) = @_;
+ $inner_expand, $skip_ac_subst) = @_;
$var->set_seen;
# We do not know any variable with this name. Fall through
# to filename processing.
}
+ elsif ($skip_ac_subst && $var =~ /^\@.+\@$/)
+ {
+ next;
+ }
if ($fun_item) # $var is a filename we must process
{