* tests/extra6.test: New file.
* tests/Makefile.am (TESTS): Add it.
2002-01-13 Alexandre Duret-Lutz <duret_g@epita.fr>
+ * lib/am/distdir.am (distdir): Handle subdirectories.
+ * tests/extra6.test: New file.
+ * tests/Makefile.am (TESTS): Add it.
+
+2002-01-13 Alexandre Duret-Lutz <duret_g@epita.fr>
+
* tests/extra2.test: Run $ACLOCAL.
2002-01-12 Alexandre Duret-Lutz <duret_g@epita.fr>
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 \
##
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
- $(mkinstalldirs) "$(distdir)/$$dir"; \
+ dir="/$$dir"; \
+ $(mkinstalldirs) "$(distdir)$$dir"; \
+ else \
+ dir=''; \
fi; \
##
## In loop, test for file existence because sometimes a file gets
## Don't mention $$file in destination argument, since this fails if
## destination directory already exists. Also, use `-R' and not `-r'.
## `-r' is almost always incorrect.
- cp -pR $$d/$$file $(distdir) \
+ cp -pR $$d/$$file $(distdir)$$dir \
|| exit 1; \
else \
test -f $(distdir)/$$file \
extra3.test \
extra4.test \
extra5.test \
+extra6.test \
flibs.test \
fnoc.test \
fo.test \
extra3.test \
extra4.test \
extra5.test \
+extra6.test \
flibs.test \
fnoc.test \
fo.test \
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 \
--- /dev/null
+#! /bin/sh
+
+# Check to make sure EXTRA_DIST can contain a directory or
+# a subdirectory, in $(builddir) or $(srcdir).
+
+. $srcdir/defs || exit 1
+
+set -e
+
+echo AC_OUTPUT >> configure.in
+
+cat > Makefile.am << 'END'
+EXTRA_DIST=foo/bar baz foo2/bar2 baz2
+
+check: distdir
+ test -f $(distdir)/foo/bar/baz
+ test -f $(distdir)/baz/foo
+ test -f $(distdir)/foo2/bar2/baz2
+ test -f $(distdir)/baz2/foo2
+END
+
+# Create some files in $(srcdir)
+mkdir foo
+mkdir foo/bar
+touch foo/bar/baz
+mkdir baz
+touch baz/foo
+
+$ACLOCAL
+$AUTOMAKE
+$AUTOCONF
+mkdir build
+cd build
+../configure
+
+# Create some files in $(builddir)
+mkdir foo2
+mkdir foo2/bar2
+touch foo2/bar2/baz2
+mkdir baz2
+touch baz2/foo2
+
+make check