automake
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

10-all-redirect.patch


From: Akim Demaille
Subject: 10-all-redirect.patch
Date: Tue, 06 Mar 2001 08:35:14 +0100

FYI, here is the result on the fileutils:

~/src/fu % makesort -u Makefile.in.old Makefile.in                    1:26 remo
--- Makefile.in.old.sort        Tue Mar  6 01:27:04 2001
+++ Makefile.in.sort    Tue Mar  6 01:27:04 2001
@@ -307,8 +307,8 @@
               END { for (i in files) print i; }'`; \
        test -z "$(ETAGS_ARGS)config.h.in$$unique$(LISP)$$tags" \
          || etags $(ETAGS_ARGS) $$tags config.h.in $$unique $(LISP)
-all: all-redirect
-
+all: config.h
+       $(MAKE) $(AM_MAKEFLAGS) all-recursive
 all-am: Makefile config.h

 all-recursive install-data-recursive install-exec-recursive installdirs-recursi
ve install-recursive uninstall-recursive install-info-recursive uninstall-info-r
ecursive check-recursive installcheck-recursive info-recursive dvi-recursive:
@@ -329,8 +329,6 @@
        if test "$$dot_seen" = "no"; then \
          $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
        fi; test -z "$$fail"
-all-redirect: config.h
-       $(MAKE) $(AM_MAKEFLAGS) all-recursive
 check: check-recursive

 check-am: all-am
@@ -524,11 +522,11 @@
        done
 uninstall: uninstall-recursive

-.PHONY: all all-am all-recursive all-redirect check check-am check-recursive \
-       clean clean-generic clean-recursive dist dist-all distcheck \
-       distclean distclean-generic distclean-hdr distclean-recursive \
-       distclean-tags distdir dvi dvi-am dvi-recursive info info-am \
-       info-recursive install install-am install-data install-data-am \
+.PHONY: all all-am all-recursive check check-am check-recursive clean \
+       clean-generic clean-recursive dist dist-all distcheck distclean \
+       distclean-generic distclean-hdr distclean-recursive distclean-tags \
+       distdir dvi dvi-am dvi-recursive info info-am info-recursive \
+       install install-am install-data install-data-am \
        install-data-recursive install-exec install-exec-am \
        install-exec-recursive install-info install-info-recursive \
        install-man install-recursive install-strip installcheck \





Index: ChangeLog
from  Akim Demaille  <address@hidden>
        * automake.in (&handle_all): Use an array instead of a scalar for
        local_headers.
        Get rid of all-redirect: let `all' be that target.

Index: Makefile.in
--- Makefile.in Tue, 06 Mar 2001 00:51:06 +0100 akim (am/h/16_Makefile.i 1.38 
644)
+++ Makefile.in Tue, 06 Mar 2001 01:21:08 +0100 akim (am/h/16_Makefile.i 1.38 
644)
@@ -139,6 +139,7 @@

 DIST_SUBDIRS = $(SUBDIRS)
 all: all-recursive
+
 .SUFFIXES:
 .SUFFIXES: .dvi .info .ps .texi .texinfo .txi

Index: automake.in
--- automake.in Tue, 06 Mar 2001 01:12:18 +0100 akim (am/f/39_automake.i 1.118 
755)
+++ automake.in Tue, 06 Mar 2001 01:20:12 +0100 akim (am/f/39_automake.i 1.118 
755)
@@ -3836,6 +3836,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.
@@ -3847,35 +3849,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"))
     {
@@ -3884,17 +3857,41 @@ 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 = ();
+    # FIXME: I believe Tom wants to remove this --akim.
+    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: m4/Makefile.in
--- m4/Makefile.in Mon, 05 Mar 2001 22:33:22 +0100 akim (am/h/15_Makefile.i 
1.29 644)
+++ m4/Makefile.in Tue, 06 Mar 2001 01:21:08 +0100 akim (am/h/15_Makefile.i 
1.29 644)
@@ -99,6 +99,7 @@
 DIST_COMMON = Makefile.am Makefile.in

 all: all-am
+
 .SUFFIXES:

 $(srcdir)/Makefile.in: Makefile.am  $(top_srcdir)/configure.in $(ACLOCAL_M4)
Index: tests/Makefile.in
--- tests/Makefile.in Mon, 05 Mar 2001 22:33:22 +0100 akim (am/h/14_Makefile.i 
1.31 644)
+++ tests/Makefile.in Tue, 06 Mar 2001 01:21:08 +0100 akim (am/h/14_Makefile.i 
1.31 644)
@@ -366,6 +366,7 @@
 DIST_COMMON = Makefile.am Makefile.in

 all: all-am
+
 .SUFFIXES:

 $(srcdir)/Makefile.in: Makefile.am  $(top_srcdir)/configure.in $(ACLOCAL_M4)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]