[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
FYI: traverse_recursively (skip_ac_subst => 1)
From: |
Alexandre Duret-Lutz |
Subject: |
FYI: traverse_recursively (skip_ac_subst => 1) |
Date: |
Sun, 07 Mar 2004 10:24:08 +0100 |
User-agent: |
Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 (gnu/linux) |
I'm installing this on HEAD.
2004-03-07 Alexandre Duret-Lutz <address@hidden>
* lib/Automake/Variable.pm (traverse_recursively,
_do_recursive_traversal): Honor the skip_ac_subst option.
* automake.in (handle_dist): Use skip_ac_subst.
Index: automake.in
===================================================================
RCS file: /cvs/automake/automake/automake.in,v
retrieving revision 1.1544
diff -u -r1.1544 automake.in
--- automake.in 29 Feb 2004 19:10:21 -0000 1.1544
+++ automake.in 7 Mar 2004 09:22:59 -0000
@@ -3352,9 +3352,8 @@
# 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 /address@hidden@$/;
next unless s,/+[^/]+$,,;
$dist_dirs{$_} = 1
unless $_ eq '.';
@@ -3364,9 +3363,8 @@
# 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 /address@hidden@$/;
s/\$\(top_srcdir\)/$topsrcdir/;
s/\$\(srcdir\)/./;
# Strip any leading `./'.
Index: lib/Automake/Variable.pm
===================================================================
RCS file: /cvs/automake/automake/lib/Automake/Variable.pm,v
retrieving revision 1.30
diff -u -r1.30 Variable.pm
--- lib/Automake/Variable.pm 29 Feb 2004 19:10:21 -0000 1.30
+++ lib/Automake/Variable.pm 7 Mar 2004 09:23:01 -0000
@@ -1189,7 +1189,7 @@
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.
@@ -1218,6 +1218,9 @@
(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.
@@ -1254,16 +1257,18 @@
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;
@@ -1374,6 +1379,10 @@
}
# We do not know any variable with this name. Fall through
# to filename processing.
+ }
+ elsif ($skip_ac_subst && $var =~ /address@hidden@$/)
+ {
+ next;
}
if ($fun_item) # $var is a filename we must process
--
Alexandre Duret-Lutz
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- FYI: traverse_recursively (skip_ac_subst => 1),
Alexandre Duret-Lutz <=