From 211a7ae878f854c1787121947bd39dce925b3344 Mon Sep 17 00:00:00 2001 From: Akim Demaille Date: Mon, 26 Feb 2001 13:59:46 +0000 Subject: [PATCH] * automake.in ($am_file): Be `local', as my'd variables used in `foreach' loops are always private to the loop. --- ChangeLog | 5 +++++ Makefile.am | 6 +++--- Makefile.in | 6 +++--- automake.in | 4 +++- lib/am/Makefile.am | 6 +++--- 5 files changed, 17 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1af12128..65461e2d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2001-02-26 Akim Demaille + + * automake.in ($am_file): Be `local', as my'd variables used in + `foreach' loops are always private to the loop. + 2001-02-26 Pavel Roskin * Makefile.am: Add install.am. diff --git a/Makefile.am b/Makefile.am index 42cb2d21..eb420ec8 100644 --- a/Makefile.am +++ b/Makefile.am @@ -117,15 +117,15 @@ maintainer-check: automake aclocal ## Up to now we manage to limit to 6 uses of local. @locals=`grep -c '^[ \t]*local [^*]' $(srcdir)/automake.in`; \ case $$locals in \ - [0-5] ) \ + [0-6] ) \ echo "Wow, congrats! There are $$locals \`local' now!." >&2; \ echo "Please update Makefile.am (maintainer-check)." >&2; \ exit 1; \ ;; \ - 6 ) ;; \ + 7 ) ;; \ * ) \ echo "Too many \`local'! Are you sure you need $$locals of them?" >&2; \ - echo "Up to now 6 was enough." >&2; \ + echo "Up to now 7 was enough." >&2; \ exit 1; \ ;; \ esac diff --git a/Makefile.in b/Makefile.in index fc3173e8..6a7d31b9 100644 --- a/Makefile.in +++ b/Makefile.in @@ -643,15 +643,15 @@ maintainer-check: automake aclocal fi @locals=`grep -c '^[ \t]*local [^*]' $(srcdir)/automake.in`; \ case $$locals in \ - [0-5] ) \ + [0-6] ) \ echo "Wow, congrats! There are $$locals \`local' now!." >&2; \ echo "Please update Makefile.am (maintainer-check)." >&2; \ exit 1; \ ;; \ - 6 ) ;; \ + 7 ) ;; \ * ) \ echo "Too many \`local'! Are you sure you need $$locals of them?" >&2; \ - echo "Up to now 6 was enough." >&2; \ + echo "Up to now 7 was enough." >&2; \ exit 1; \ ;; \ esac diff --git a/automake.in b/automake.in index 1bb1f705..d4594185 100755 --- a/automake.in +++ b/automake.in @@ -419,7 +419,9 @@ die "$me: no \`Makefile.am' found or specified\n" if ! @input_files; # Now do all the work on each file. -foreach my $am_file (@input_files) +# This guy must be local otherwise it's private to the loop. +local $am_file; +foreach $am_file (@input_files) { if (! -f ($am_file . '.am')) { diff --git a/lib/am/Makefile.am b/lib/am/Makefile.am index 42cb2d21..eb420ec8 100644 --- a/lib/am/Makefile.am +++ b/lib/am/Makefile.am @@ -117,15 +117,15 @@ maintainer-check: automake aclocal ## Up to now we manage to limit to 6 uses of local. @locals=`grep -c '^[ \t]*local [^*]' $(srcdir)/automake.in`; \ case $$locals in \ - [0-5] ) \ + [0-6] ) \ echo "Wow, congrats! There are $$locals \`local' now!." >&2; \ echo "Please update Makefile.am (maintainer-check)." >&2; \ exit 1; \ ;; \ - 6 ) ;; \ + 7 ) ;; \ * ) \ echo "Too many \`local'! Are you sure you need $$locals of them?" >&2; \ - echo "Up to now 6 was enough." >&2; \ + echo "Up to now 7 was enough." >&2; \ exit 1; \ ;; \ esac -- 2.43.5