+2002-06-08 Alexandre Duret-Lutz <duret_g@epita.fr>
+
+ For PR automake/317:
+ * Makefile.am (maintainer-check): Disallow `for f in $(FILES)',
+ suggest `list='$(FILES)'; for f in $$list' instead.
+ * lib/am/distdir.am (distdir): Adjust `for' usage.
+ * lib/am/texinfos.am (maintainer-clean-aminfo): Likewise.
+ * tests/dollar.test: New file.
+ * tests/Makefile.am (TESTS): Add dollar.test.
+ Reported by Eric Siegerman and Philip Fong.
+
2002-06-06 Alexandre Duret-Lutz <duret_g@epita.fr>
For PR automake/47 (fixed a long time ago):
echo "Suspicious 'rm' invocation." 1>&2; \
exit 1; \
else :; fi
+## Never use something like `for file in $(FILES)', this doesn't work
+## if FILES is empty or if it contains shell meta characters (e.g. $ is
+## commonly used in Java filenames).
+ @if egrep 'for .* in \$$\(' $(srcdir)/lib/am/[a-z]*.am; then \
+ echo 'Use "list=$$(mumble); for var in $$$$list".' 1>&2 ; \
+ exit 1; \
+ else :; fi
## Make sure all invocations of mkinstalldirs are correct.
@if grep -n 'mkinstalldirs' $(srcdir)/lib/am/[a-z]*.am | \
grep -F -v '$$(mkinstalldirs)'; then \
maintainer-clean-aminfo:
cd $(srcdir) && \
- for i in $(INFO_DEPS); do \
+ list='$(INFO_DEPS)'; for i in $$list; do \
rm -f $$i; \
if test "`echo $$i-[0-9]*`" != "$$i-[0-9]*"; then \
rm -f $$i-[0-9]*; \
$(am__remove_distdir)
mkdir $(distdir)
$(mkinstalldirs) $(distdir)/. $(distdir)/m4
- @for file in $(DISTFILES); do \
+ @list='$(DISTFILES)'; for file in $$list; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
echo "Suspicious 'rm' invocation." 1>&2; \
exit 1; \
else :; fi
+ @if egrep 'for .* in \$$\(' $(srcdir)/lib/am/[a-z]*.am; then \
+ echo 'Use "list=$$(mumble); for var in $$$$list".' 1>&2 ; \
+ exit 1; \
+ else :; fi
@if grep -n 'mkinstalldirs' $(srcdir)/lib/am/[a-z]*.am | \
grep -F -v '$$(mkinstalldirs)'; then \
echo "Found incorrect use of mkinstalldirs in the lines above" 1>&2; \
Enrico Scholz enrico.scholz@informatik.tu-chemnitz.de
Erez Zadok ezk@cs.columbia.edu
Eric Magnien emagnien@club-internet.fr
+Eric Siegerman erics_97@pobox.com
Erick Branderhorst branderh@iaehv.nl
Erik Lindahl E.Lindahl@chem.rug.nl
François Pinard pinard@iro.umontreal.ca
Peter Muir iyhi@yahoo.com
Petter Reinholdtsen pere@hungry.com
Phil Nelson phil@cs.wwu.edu
+Philip Fong pwlfong@users.sourceforge.net
Rainer Orth ro@techfak.uni-bielefeld.de
Raja R Harinath harinath@cs.umn.edu
Ralf Corsepius corsepiu@faw.uni-ulm.de
distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
distdir: $(DISTFILES)
- @for file in $(DISTFILES); do \
+ @list='$(DISTFILES)'; for file in $$list; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
clean-generic:
distclean-generic:
- -rm -f Makefile $(CONFIG_CLEAN_FILES) stamp-h stamp-h[0-9]*
+ -rm -f Makefile $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
distdir: $(DISTFILES)
- @for file in $(DISTFILES); do \
+ @list='$(DISTFILES)'; for file in $$list; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
clean-generic:
distclean-generic:
- -rm -f Makefile $(CONFIG_CLEAN_FILES) stamp-h stamp-h[0-9]*
+ -rm -f Makefile $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
distdir: $(DISTFILES)
- @for file in $(DISTFILES); do \
+ @list='$(DISTFILES)'; for file in $$list; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
clean-generic:
distclean-generic:
- -rm -f Makefile $(CONFIG_CLEAN_FILES) stamp-h stamp-h[0-9]*
+ -rm -f Makefile $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
?DISTDIRS? $(mkinstalldirs) %DISTDIRS%
##
##
- @for file in $(DISTFILES); do \
+ @list='$(DISTFILES)'; for file in $$list; do \
##
## Always look for the file in the build directory first. That way
## for something like yacc output we will correctly pick up the latest
maintainer-clean-aminfo:
## Eww. But how else can we find all the output files from makeinfo?
?!CYGNUS? cd $(srcdir) && \
- for i in $(INFO_DEPS); do \
+ list='$(INFO_DEPS)'; for i in $$list; do \
rm -f $$i; \
if test "`echo $$i-[0-9]*`" != "$$i-[0-9]*"; then \
rm -f $$i-[0-9]*; \
distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
distdir: $(DISTFILES)
- @for file in $(DISTFILES); do \
+ @list='$(DISTFILES)'; for file in $$list; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
clean-generic:
distclean-generic:
- -rm -f Makefile $(CONFIG_CLEAN_FILES) stamp-h stamp-h[0-9]*
+ -rm -f Makefile $(CONFIG_CLEAN_FILES)
-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
maintainer-clean-generic:
distcommon3.test \
distdir.test \
distname.test \
+dollar.test \
double.test \
dup2.test \
dup3.test \
distcommon3.test \
distdir.test \
distname.test \
+dollar.test \
double.test \
dup2.test \
dup3.test \
distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
distdir: $(DISTFILES)
- @for file in $(DISTFILES); do \
+ @list='$(DISTFILES)'; for file in $$list; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
--- /dev/null
+#!/bin/sh
+
+# We should support files with `$' characters in their names.
+# Java people need this.
+# PR/317, reported by Eric Siegerman and Philip Fong.
+
+. $srcdir/defs
+
+set -e
+
+echo AC_OUTPUT >> configure.in
+
+cat > Makefile.am <<'EOF'
+mydir = $(prefix)/my
+dist_my_DATA = hello$$world
+
+hello$$world:
+ touch '$@'
+
+check-dist: distdir
+ test -f '$(distdir)/hello$$world'
+EOF
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+./configure --prefix `pwd`/inst
+$MAKE install
+test -f 'inst/my/hello$world'
+$MAKE check-dist