]> sourceware.org Git - automake.git/commitdiff
* automake.in (&handle_all): Use an array instead of a scalar for
authorAkim Demaille <akim@epita.fr>
Wed, 7 Mar 2001 19:09:43 +0000 (19:09 +0000)
committerAkim Demaille <akim@epita.fr>
Wed, 7 Mar 2001 19:09:43 +0000 (19:09 +0000)
local_headers.
Get rid of all-redirect: let `all' be that target.

ChangeLog
Makefile.in
automake.in
m4/Makefile.in
tests/Makefile.in

index 720c81d17ea64d19716c1f5dd35ad286957e7b36..b217cd9ca39053ddc5538e3200df606b3fa8f3f4 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2001-03-07  Akim Demaille  <akim@epita.fr>
+
+       * automake.in (&handle_all): Use an array instead of a scalar for
+       local_headers.
+       Get rid of all-redirect: let `all' be that target.
+
 2001-03-07  Akim Demaille  <akim@epita.fr>
 
        * automake.in (&handle_merge_targets): Ventilate its non `all'
@@ -9,7 +15,6 @@
        contains at least the `basename ($makefile)' which has just been
        unshifted.
 
-       
 2001-03-07  Akim Demaille  <akim@epita.fr>
 
        * automake.in, aclocal.in: Backquote is inert in double quotes.
index 73af4852e9d4098fe66d13c012d457019f8dd193..524c40a15cd822b4ffb5a4d8e538e8d9a3184ed7 100644 (file)
@@ -139,6 +139,7 @@ stamp-vti texinfo.tex version.texi ylwrap
 
 DIST_SUBDIRS = $(SUBDIRS)
 all: all-recursive
+
 .SUFFIXES:
 .SUFFIXES: .dvi .info .ps .texi .texinfo .txi
 
index c3fe5813e1e7cf5973e75738ae3bb11832cc9deb..fe968d0b22a504304ccbbbffe4f2964f4a9df98d 100755 (executable)
@@ -3833,6 +3833,8 @@ sub handle_all ($)
 {
     my ($makefile) = @_;
 
+    # Output `all-am'.
+
     # Put this at the beginning for the sake of non-GNU makes.  This
     # is still wrong if these makes can run parallel jobs.  But it is
     # right enough.
@@ -3844,35 +3846,6 @@ sub handle_all ($)
            if dirname ($one_name) eq $relative_dir;
     }
 
-    my $local_headers = '';
-    $local_headers = '$(BUILT_SOURCES)'
-      if &variable_defined ('BUILT_SOURCES');
-    foreach my $one_name (@config_names)
-      {
-       if (dirname ($one_name) eq $relative_dir)
-         {
-           $local_headers .= ' ' if $local_headers;
-           $local_headers .= basename ($one_name);
-         }
-      }
-    if ($local_headers)
-      {
-       # We need to make sure config.h is built before we
-       # recurse.  We also want to make sure that built sources
-       # are built before any ordinary `all' targets are run.  We
-       # can't do this by changing the order of dependencies to
-       # the "all" because that breaks when using parallel makes.
-       # Instead we handle things explicitly.
-       $output_rules .= ("all-redirect: ${local_headers}"
-                         . "\n\t"
-                         . '$(MAKE) $(AM_MAKEFLAGS) '
-                         . (&variable_defined ('SUBDIRS')
-                            ? 'all-recursive' : 'all-am')
-                         . "\n\n");
-       $all_target = 'all-redirect';
-       &depend ('.PHONY', 'all-redirect');
-    }
-
     # Install `all' hooks.
     if (&target_defined ("all-local"))
     {
@@ -3881,17 +3854,40 @@ sub handle_all ($)
     }
 
     &pretty_print_rule ("all-am:", "\t\t", @all);
+    &depend ('.PHONY', 'all-am', 'all');
 
-    # If we aren't using a redirect target then find the
-    # appropriate actual redirect.
-    if ($all_target eq '')
+
+    # Output `all'.
+
+    my @local_headers = ();
+    push @local_headers, '$(BUILT_SOURCES)'
+      if &variable_defined ('BUILT_SOURCES');
+    foreach my $one_name (@config_names)
       {
-       $all_target = (&variable_defined ('SUBDIRS')
-                      ? 'all-recursive' : 'all-am');
+       push @local_headers, basename ($one_name)
+         if dirname ($one_name) eq $relative_dir;
       }
 
-    $output_all = "all: $all_target\n";
-    &depend ('.PHONY', 'all-am', 'all');
+    if (@local_headers)
+      {
+       # We need to make sure config.h is built before we recurse.
+       # We also want to make sure that built sources are built
+       # before any ordinary `all' targets are run.  We can't do this
+       # by changing the order of dependencies to the "all" because
+       # that breaks when using parallel makes.  Instead we handle
+       # things explicitly.
+       $output_all .= ("all: " . join (' ', @local_headers)
+                       . "\n\t"
+                       . '$(MAKE) $(AM_MAKEFLAGS) '
+                       . (&variable_defined ('SUBDIRS')
+                          ? 'all-recursive' : 'all-am')
+                       . "\n\n");
+      }
+    else
+      {
+       $output_all .= "all: " . (&variable_defined ('SUBDIRS')
+                                 ? 'all-recursive' : 'all-am') . "\n\n";
+      }
 }
 
 
index 3d609d1039fca6f7f8a94fc50a5f619cb0905230..acadab2469db23ea6e8639129268cfb91db3b1bf 100644 (file)
@@ -99,6 +99,7 @@ DATA = $(m4data_DATA)
 DIST_COMMON = Makefile.am Makefile.in
 
 all: all-am
+
 .SUFFIXES:
 
 $(srcdir)/Makefile.in: Makefile.am  $(top_srcdir)/configure.in $(ACLOCAL_M4)
index 524b274580735c768b6560124b2160300f7ff3e2..fba8467e0f9697f123a858cb082886f270af8cc2 100644 (file)
@@ -367,6 +367,7 @@ DIST_SOURCES =
 DIST_COMMON = Makefile.am Makefile.in
 
 all: all-am
+
 .SUFFIXES:
 
 $(srcdir)/Makefile.in: Makefile.am  $(top_srcdir)/configure.in $(ACLOCAL_M4)
This page took 0.044942 seconds and 5 git commands to generate.