From f6eacc555219a1a3560f28d33401f699044594ef Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Sat, 5 May 2001 20:47:29 +0000 Subject: [PATCH] Fix bug reported by Robert Boehne: * automake.in (output_lex_build_rule): Don't let AMDEP_TRUE be substituted. (handle_dependencies): Likewise. * Makefile.am (maintainer-check): Look for AMDEP_TRUE substitution. Correct diff now has 30 lines. Look for space after losing `undef'. --- ChangeLog | 10 ++++++++++ Makefile.am | 9 +++++++-- Makefile.in | 8 ++++++-- automake.in | 9 +++++++-- configure | 2 +- lib/am/Makefile.am | 9 +++++++-- 6 files changed, 38 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index a99035d5..6cc13f36 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2001-05-05 Tom Tromey + + Fix bug reported by Robert Boehne: + * automake.in (output_lex_build_rule): Don't let AMDEP_TRUE be + substituted. + (handle_dependencies): Likewise. + * Makefile.am (maintainer-check): Look for AMDEP_TRUE + substitution. Correct diff now has 30 lines. Look for space + after losing `undef'. + 2001-05-04 Peter Eisentraut * m4/sanity.m4: Remove the temp file before possible error exits. diff --git a/Makefile.am b/Makefile.am index 29a6a16e..bc535a7f 100644 --- a/Makefile.am +++ b/Makefile.am @@ -66,7 +66,7 @@ maintainer-check: automake aclocal ## This check avoids accidental configure substitutions in the source. ## There are exactly 7 lines that should be modified. This works out ## to 22 lines of diffs. - @if test `diff $(srcdir)/automake.in automake | wc -l` -ne 22; then \ + @if test `diff $(srcdir)/automake.in automake | wc -l` -ne 30; then \ echo "found too many diffs between automake.in and automake"; 1>&2; \ diff -c $(srcdir)/automake.in automake; \ exit 1; \ @@ -96,7 +96,7 @@ maintainer-check: automake aclocal exit 1; \ else :; fi ## We never want to use "undef", only "delete", but for $/. - @if grep -n -w undef $(srcdir)/automake.in | \ + @if grep -n -w 'undef ' $(srcdir)/automake.in | \ fgrep -v 'undef $$/'; then \ echo "Found undef in automake.in; use delete instead" 1>&2; \ exit 1; \ @@ -137,6 +137,11 @@ maintainer-check: automake aclocal exit 1; \ ;; \ esac +## Don't let AMDEP_TRUE substitution appear in automake.in. + @if grep '@AMDEP''_TRUE@' $(srcdir)/automake.in; then \ + echo "Don't put AMDEP_TRUE substitution in automake.in" 1>&2; \ + exit 1; \ + fi # Tag before making distribution. Also, don't make a distribution if # checks fail. Also, make sure the NEWS file is up-to-date. diff --git a/Makefile.in b/Makefile.in index 5100b9b8..64948746 100644 --- a/Makefile.in +++ b/Makefile.in @@ -636,7 +636,7 @@ installcheck-local: # Some simple checks, and then ordinary check. These are only really # guaranteed to work on my machine. maintainer-check: automake aclocal - @if test `diff $(srcdir)/automake.in automake | wc -l` -ne 22; then \ + @if test `diff $(srcdir)/automake.in automake | wc -l` -ne 30; then \ echo "found too many diffs between automake.in and automake"; 1>&2; \ diff -c $(srcdir)/automake.in automake; \ exit 1; \ @@ -659,7 +659,7 @@ maintainer-check: automake aclocal echo "Found incorrect use of mkinstalldirs in the lines above" 1>&2; \ exit 1; \ else :; fi - @if grep -n -w undef $(srcdir)/automake.in | \ + @if grep -n -w 'undef ' $(srcdir)/automake.in | \ fgrep -v 'undef $$/'; then \ echo "Found undef in automake.in; use delete instead" 1>&2; \ exit 1; \ @@ -695,6 +695,10 @@ maintainer-check: automake aclocal exit 1; \ ;; \ esac + @if grep '@AMDEP''_TRUE@' $(srcdir)/automake.in; then \ + echo "Don't put AMDEP_TRUE substitution in automake.in" 1>&2; \ + exit 1; \ + fi # Tag before making distribution. Also, don't make a distribution if # checks fail. Also, make sure the NEWS file is up-to-date. diff --git a/automake.in b/automake.in index bff61145..03d45577 100755 --- a/automake.in +++ b/automake.in @@ -1466,7 +1466,10 @@ sub output_lex_build_rule $output_rules .= "\n"; foreach my $iter (@deplist) { - $output_rules .= '@AMDEP_TRUE@@_am_include@ ' . $iter . "\n"; + # The strange concatentation is used to avoid + # substitutions from our own configure. + $output_rules .= ('@AMDEP' . '_TRUE@@_am_include@ ' + . $iter . "\n"); } $output_rules .= &file_contents ('depend'); @@ -3238,7 +3241,9 @@ sub handle_dependencies $output_rules .= "\n"; foreach my $iter (@deplist) { - $output_rules .= ('@AMDEP_TRUE@@_am_include@ @_am_quote@' + # The strange concatentation is used to avoid + # substitutions from our own configure. + $output_rules .= ('@AMDEP' . '_TRUE@@_am_include@ @_am_quote@' . $iter . '@_am_quote@' . "\n"); } diff --git a/configure b/configure index 1bb40c4b..f8e177ec 100755 --- a/configure +++ b/configure @@ -676,7 +676,7 @@ else echo "configure: warning: ${am_backtick}missing' script is too old or missing" 1>&2 fi -for ac_prog in mawk gawk nawk awk +for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 diff --git a/lib/am/Makefile.am b/lib/am/Makefile.am index 29a6a16e..bc535a7f 100644 --- a/lib/am/Makefile.am +++ b/lib/am/Makefile.am @@ -66,7 +66,7 @@ maintainer-check: automake aclocal ## This check avoids accidental configure substitutions in the source. ## There are exactly 7 lines that should be modified. This works out ## to 22 lines of diffs. - @if test `diff $(srcdir)/automake.in automake | wc -l` -ne 22; then \ + @if test `diff $(srcdir)/automake.in automake | wc -l` -ne 30; then \ echo "found too many diffs between automake.in and automake"; 1>&2; \ diff -c $(srcdir)/automake.in automake; \ exit 1; \ @@ -96,7 +96,7 @@ maintainer-check: automake aclocal exit 1; \ else :; fi ## We never want to use "undef", only "delete", but for $/. - @if grep -n -w undef $(srcdir)/automake.in | \ + @if grep -n -w 'undef ' $(srcdir)/automake.in | \ fgrep -v 'undef $$/'; then \ echo "Found undef in automake.in; use delete instead" 1>&2; \ exit 1; \ @@ -137,6 +137,11 @@ maintainer-check: automake aclocal exit 1; \ ;; \ esac +## Don't let AMDEP_TRUE substitution appear in automake.in. + @if grep '@AMDEP''_TRUE@' $(srcdir)/automake.in; then \ + echo "Don't put AMDEP_TRUE substitution in automake.in" 1>&2; \ + exit 1; \ + fi # Tag before making distribution. Also, don't make a distribution if # checks fail. Also, make sure the NEWS file is up-to-date. -- 2.43.5