`foreach' loops are always private to the loop.
+2001-02-26 Akim Demaille <akim@epita.fr>
+
+ * 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 <proski@gnu.org>
* Makefile.am: Add install.am.
## 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
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
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'))
{
## 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