]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
For PR automake/287:
authorTom Tromey <tromey@redhat.com>
Sun, 13 Jan 2002 20:33:40 +0000 (20:33 +0000)
committerTom Tromey <tromey@redhat.com>
Sun, 13 Jan 2002 20:33:40 +0000 (20:33 +0000)
* lib/am/distdir.am (distdir): Use `$$list' trick when looping
over subdirs.
* tests/Makefile.am (TESTS): Added pr287.test.
* tests/pr287.test: New file.

ChangeLog
lib/Automake/Makefile.in
lib/Makefile.in
lib/am/Makefile.in
lib/am/distdir.am
m4/Makefile.in
tests/Makefile.am
tests/Makefile.in
tests/pr287.test [new file with mode: 0755]

index 274dfa0e10050be137b89d2db758e7e4b264d8dc..8da6948376dd8c9c60e47414daeadf2c35702bcb 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2002-01-13  Tom Tromey  <tromey@redhat.com>
+
+       For PR automake/287:
+       * lib/am/distdir.am (distdir): Use `$$list' trick when looping
+       over subdirs.
+       * tests/Makefile.am (TESTS): Added pr287.test.
+       * tests/pr287.test: New file.
+
 2002-01-13  Alexandre Duret-Lutz  <duret_g@epita.fr>
 
        * lib/am/distdir.am (distdir): Handle subdirectories.
index 14e8809b8df4fa093e89d3cb7034ea5f787a2c0e..070ba4429113e05ddd7c21f11e3d0751b0700fe9 100644 (file)
@@ -121,10 +121,13 @@ distdir: $(DISTFILES)
          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 \
-           $(mkinstalldirs) "$(distdir)/$$dir"; \
+           dir="/$$dir"; \
+           $(mkinstalldirs) "$(distdir)$$dir"; \
+         else \
+           dir=''; \
          fi; \
          if test -d $$d/$$file; then \
-           cp -pR $$d/$$file $(distdir) \
+           cp -pR $$d/$$file $(distdir)$$dir \
            || exit 1; \
          else \
            test -f $(distdir)/$$file \
index 8a0bac022c2dbbb5d354b3f89374d2a74b66f9dd..656e91c96369df388ab71f469bda300d99254124 100644 (file)
@@ -247,10 +247,13 @@ distdir: $(DISTFILES)
          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 \
-           $(mkinstalldirs) "$(distdir)/$$dir"; \
+           dir="/$$dir"; \
+           $(mkinstalldirs) "$(distdir)$$dir"; \
+         else \
+           dir=''; \
          fi; \
          if test -d $$d/$$file; then \
-           cp -pR $$d/$$file $(distdir) \
+           cp -pR $$d/$$file $(distdir)$$dir \
            || exit 1; \
          else \
            test -f $(distdir)/$$file \
index eb7b268d3dafdaf0bbcd3a36845540e73e20e79c..f3e22bbbda889fa5dc9641a50a1464ac5776ccf4 100644 (file)
@@ -129,10 +129,13 @@ distdir: $(DISTFILES)
          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 \
-           $(mkinstalldirs) "$(distdir)/$$dir"; \
+           dir="/$$dir"; \
+           $(mkinstalldirs) "$(distdir)$$dir"; \
+         else \
+           dir=''; \
          fi; \
          if test -d $$d/$$file; then \
-           cp -pR $$d/$$file $(distdir) \
+           cp -pR $$d/$$file $(distdir)$$dir \
            || exit 1; \
          else \
            test -f $(distdir)/$$file \
index c3f70671eb84c61188bd586f93c282e235e1a262..f8b1dff0aec3a1004448cd986e3be0af5811d4b6 100644 (file)
@@ -111,7 +111,7 @@ endif %?TOPDIR_P%
 ## us work correctly with an enclosing package.
 ##
 if %?SUBDIRS%
-       for subdir in $(%DIST_SUBDIR_NAME%); do \
+       list='$(%DIST_SUBDIR_NAME%)'; for subdir in $$list; do \
          if test "$$subdir" = .; then :; else \
            test -d $(distdir)/$$subdir \
            || mkdir $(distdir)/$$subdir \
index c11923204245abb73d9c7a25ad3f9d3ff641d1c5..66684aa84ba512f9d755ce9453d8093a7ddd57e2 100644 (file)
@@ -150,10 +150,13 @@ distdir: $(DISTFILES)
          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 \
-           $(mkinstalldirs) "$(distdir)/$$dir"; \
+           dir="/$$dir"; \
+           $(mkinstalldirs) "$(distdir)$$dir"; \
+         else \
+           dir=''; \
          fi; \
          if test -d $$d/$$file; then \
-           cp -pR $$d/$$file $(distdir) \
+           cp -pR $$d/$$file $(distdir)$$dir \
            || exit 1; \
          else \
            test -f $(distdir)/$$file \
index 5bd4ed5963954e2422e7858b7c8e964359e4ac82..0ccf4aada01e3d816bae78660a5573a185d8709d 100644 (file)
@@ -253,6 +253,7 @@ pr243.test \
 pr266.test \
 pr279.test \
 pr279-2.test \
+pr287.test \
 pr9.test \
 pr72.test \
 pr87.test \
index 0a8f21dfb3b8cfa7c027c8954a704f3f2482a6fc..082dbf5fafbfaba02f1b2275785bee0ca67f6066 100644 (file)
@@ -325,6 +325,7 @@ pr243.test \
 pr266.test \
 pr279.test \
 pr279-2.test \
+pr287.test \
 pr9.test \
 pr72.test \
 pr87.test \
diff --git a/tests/pr287.test b/tests/pr287.test
new file mode 100755 (executable)
index 0000000..a827a3b
--- /dev/null
@@ -0,0 +1,36 @@
+#! /bin/sh
+
+# Test for PR 287: empty SUBDIRS.
+
+. $srcdir/defs || exit 1
+
+cat > configure.in << 'END'
+AC_INIT(foo, 0.1, dev@null)
+AM_INIT_AUTOMAKE
+AC_PROG_CC
+AC_CONFIG_FILES(Makefile)
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+SUBDIRS =
+bin_SCRIPTS = foo
+END
+
+cat > foo << 'END'
+#! /bin/sh
+echo Maude
+END
+
+chmod +x foo
+
+set -e
+
+mkdir install
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
+./configure --prefix=`cd install && pwd`
+make
+make distdir