automake-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

FYI: fix for PR/317


From: Alexandre Duret-Lutz
Subject: FYI: fix for PR/317
Date: Sat, 08 Jun 2002 18:52:50 +0200
User-agent: Gnus/5.090006 (Oort Gnus v0.06) Emacs/21.2 (i386-debian-linux-gnu)

I'm committing this on HEAD and branch-1-6.

2002-06-08  Alexandre Duret-Lutz  <address@hidden>

        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.

Index: Makefile.am
===================================================================
RCS file: /cvs/automake/automake/Makefile.am,v
retrieving revision 1.190.2.1
diff -u -r1.190.2.1 Makefile.am
--- Makefile.am 6 May 2002 19:30:21 -0000       1.190.2.1
+++ Makefile.am 8 Jun 2002 16:28:23 -0000
@@ -91,6 +91,13 @@
          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 fgrep -n 'mkinstalldirs' $(srcdir)/lib/am/[a-z]*.am | \
              fgrep -v '$$(mkinstalldirs)'; then \
Index: THANKS
===================================================================
RCS file: /cvs/automake/automake/THANKS,v
retrieving revision 1.166.2.7
diff -u -r1.166.2.7 THANKS
--- THANKS      5 Jun 2002 09:06:37 -0000       1.166.2.7
+++ THANKS      8 Jun 2002 16:28:23 -0000
@@ -48,6 +48,7 @@
 Enrico Scholz          address@hidden
 Erez Zadok             address@hidden
 Eric Magnien           address@hidden
+Eric Siegerman         address@hidden
 Erick Branderhorst     address@hidden
 Erik Lindahl           address@hidden
 François Pinard                address@hidden
@@ -148,6 +149,7 @@
 Peter Muir             address@hidden
 Petter Reinholdtsen    address@hidden
 Phil Nelson            address@hidden
+Philip Fong            address@hidden
 Rainer Orth            address@hidden
 Raja R Harinath                address@hidden
 Ralf Corsepius         address@hidden
Index: lib/am/distdir.am
===================================================================
RCS file: /cvs/automake/automake/lib/am/distdir.am,v
retrieving revision 1.32
diff -u -r1.32 distdir.am
--- lib/am/distdir.am   26 Mar 2002 10:48:35 -0000      1.32
+++ lib/am/distdir.am   8 Jun 2002 16:28:23 -0000
@@ -61,7 +61,7 @@
 ?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
Index: lib/am/texinfos.am
===================================================================
RCS file: /cvs/automake/automake/lib/am/texinfos.am,v
retrieving revision 1.91
diff -u -r1.91 texinfos.am
--- lib/am/texinfos.am  2 Oct 2001 16:00:04 -0000       1.91
+++ lib/am/texinfos.am  8 Jun 2002 16:28:23 -0000
@@ -225,7 +225,7 @@
 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]*; \
Index: tests/Makefile.am
===================================================================
RCS file: /cvs/automake/automake/tests/Makefile.am,v
retrieving revision 1.385.2.12
diff -u -r1.385.2.12 Makefile.am
--- tests/Makefile.am   6 Jun 2002 08:35:01 -0000       1.385.2.12
+++ tests/Makefile.am   8 Jun 2002 16:28:24 -0000
@@ -131,6 +131,7 @@
 distcommon3.test \
 distdir.test \
 distname.test \
+dollar.test \
 double.test \
 dup2.test \
 dup3.test \
Index: tests/dollar.test
===================================================================
RCS file: tests/dollar.test
diff -N tests/dollar.test
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ tests/dollar.test   8 Jun 2002 16:28:24 -0000
@@ -0,0 +1,30 @@
+#!/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

-- 
Alexandre Duret-Lutz




reply via email to

[Prev in Thread] Current Thread [Next in Thread]