From 41456cf28af0b6f17c78ab98611a3ec4194a1684 Mon Sep 17 00:00:00 2001 From: Stefano Lattarini Date: Mon, 30 Jul 2012 15:36:58 +0200 Subject: [PATCH] [ng] all: deps for the 'all' target listed in '$(am.all.targets)' * automake.in (handle_all_and_check): Drop transform 'ALL-DEPS' when processing the 'all-target.am' file. (generate_makefile): Define '$(am.all.targets)' as the list of dependencies for the 'all' target. * lib/am/all-target.am: Use it instead of the transform '%ALL-DEPS%'. * t/java.sh: Relax grepping checks to avoid spurious failures. * t/amopts-variable-expansion.sh: Likewise. Signed-off-by: Stefano Lattarini --- automake.in | 5 +++-- lib/am/all-target.am | 2 +- t/amopts-variable-expansion.sh | 2 +- t/java.sh | 2 -- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/automake.in b/automake.in index a11d90a37..a25ba748d 100644 --- a/automake.in +++ b/automake.in @@ -3887,7 +3887,7 @@ sub handle_footer # Generate "make all" and "make check" rules. sub handle_all_and_check () { - almost_verbatim ('all-target', 'ALL-DEPS' => "@all"); + almost_verbatim ('all-target'); almost_verbatim ('check-target'); } @@ -6892,7 +6892,8 @@ sub generate_makefile ($$) define_variable 'am.all-ltlibs', INTERNAL, sort keys %known_ltlibraries; # Must come after invocation of several of the 'handle_*' functions # above, which can declare additional dependencies for the 'check' - # target. + # and 'all' target. + define_variable ('am.all.targets', INTERNAL, @all); define_variable ('am.test-suite.deps', INTERNAL, @check); handle_tests; diff --git a/lib/am/all-target.am b/lib/am/all-target.am index 285e9026b..c14ff1787 100644 --- a/lib/am/all-target.am +++ b/lib/am/all-target.am @@ -38,5 +38,5 @@ $(foreach x,$(am.built-early),$(eval -include .am/built-sources/$(x))) @touch $@ endif -all-am: all-local %ALL-DEPS% +all-am: all-local $(am.all.targets) all: $(if $(SUBDIRS),all-recursive,all-am) diff --git a/t/amopts-variable-expansion.sh b/t/amopts-variable-expansion.sh index 830373a59..a11f57633 100755 --- a/t/amopts-variable-expansion.sh +++ b/t/amopts-variable-expansion.sh @@ -57,6 +57,6 @@ AUTOMAKE_run grep '^Makefile\.am:.*sub/foo\.c.*requires.*AM_PROG_CC_C_O' stderr grep README stderr && exit 1 $EGREP '(install|override)' stderr && exit 1 -$EGREP 'distdir|\.tar' Makefile.in && exit 1 +$EGREP 'distdir|\.tar[ .]' Makefile.in && exit 1 : diff --git a/t/java.sh b/t/java.sh index 0103eeae4..631f98bf9 100755 --- a/t/java.sh +++ b/t/java.sh @@ -33,8 +33,6 @@ $AUTOCONF $AUTOMAKE $EGREP '\.stamp|class' Makefile.in # For debugging. -grep '^all[-a-z]*:.*classjava\.stamp' Makefile.in -test $(grep -c '^all[-a-z]*:.*classjava\.stamp' Makefile.in) -eq 1 echo 'class a { }' > a.java echo 'class b { }' > b.java -- 2.47.2