From 185a673db0cbf03aa750fc9388a64908484ea0ff Mon Sep 17 00:00:00 2001 From: Akim Demaille Date: Wed, 7 Mar 2001 19:09:43 +0000 Subject: [PATCH] * automake.in (&handle_all): Use an array instead of a scalar for local_headers. Get rid of all-redirect: let `all' be that target. --- ChangeLog | 7 ++++- Makefile.in | 1 + automake.in | 68 ++++++++++++++++++++++------------------------- m4/Makefile.in | 1 + tests/Makefile.in | 1 + 5 files changed, 41 insertions(+), 37 deletions(-) diff --git a/ChangeLog b/ChangeLog index 720c81d1..b217cd9c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2001-03-07 Akim Demaille + + * 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 * 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 * automake.in, aclocal.in: Backquote is inert in double quotes. diff --git a/Makefile.in b/Makefile.in index 73af4852..524c40a1 100644 --- a/Makefile.in +++ b/Makefile.in @@ -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 diff --git a/automake.in b/automake.in index c3fe5813..fe968d0b 100755 --- a/automake.in +++ b/automake.in @@ -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"; + } } diff --git a/m4/Makefile.in b/m4/Makefile.in index 3d609d10..acadab24 100644 --- a/m4/Makefile.in +++ b/m4/Makefile.in @@ -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) diff --git a/tests/Makefile.in b/tests/Makefile.in index 524b2745..fba8467e 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -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) -- 2.43.5