]> sourceware.org Git - automake.git/commitdiff
* lib/Automake/Variable.pm (traverse_recursively,
authorAlexandre Duret-Lutz <adl@gnu.org>
Sun, 7 Mar 2004 09:24:21 +0000 (09:24 +0000)
committerAlexandre Duret-Lutz <adl@gnu.org>
Sun, 7 Mar 2004 09:24:21 +0000 (09:24 +0000)
_do_recursive_traversal): Honor the skip_ac_subst option.
* automake.in (handle_dist): Use skip_ac_subst.

ChangeLog
automake.in
lib/Automake/Variable.pm

index 40d67248e3db671278eb0c17b4c29a0950dd6fab..abe5e293ca10123697264cb544baeb95a1134c66 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+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
index af5a86fa40b587e0261c58e359ebfc83079c8023..bd23301273209bc550bdd99eb7409996ea4b149f 100755 (executable)
@@ -3352,9 +3352,8 @@ sub handle_dist ()
       # 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 '.';
@@ -3364,9 +3363,8 @@ sub handle_dist ()
   # 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 `./'.
index 797d2ca94bf3af73f825df02f0c7076c62175f41..874339fbd5df4236b89db0d9f79501eb075688b8 100644 (file)
@@ -1189,7 +1189,7 @@ sub output_variables ()
   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 @@ If C<inner_expand> is set, variable references occuring in filename
 (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 @@ sub traverse_recursively ($&&;%)
   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;
 
@@ -1375,6 +1380,10 @@ sub _do_recursive_traversal ($$&&$$$)
              # 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
            {
This page took 0.051271 seconds and 5 git commands to generate.