summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2001-05-07 16:31:01 +0000
committerTom Tromey <tromey@redhat.com>2001-05-07 16:31:01 +0000
commit98d6bc1b79f0027b9f357644e94b9c9319e9cb45 (patch)
treedd243c3c5915b41e5f1efb687232e352c5c3886f
parentd333c64c1e20698ff0d87023366f802d9fff7057 (diff)
downloadautomake-handle-languages.tar.gz
For PR automake/46:handle-languages
* tests/Makefile.am (TESTS): Added subdir5.test. (XFAIL_TESTS): Likewise. * tests/subdir5.test: New file.
-rw-r--r--ChangeLog5
-rw-r--r--Makefile.in4
-rw-r--r--lib/Automake/Makefile.in4
-rw-r--r--lib/Makefile.in4
-rw-r--r--m4/Makefile.in4
-rw-r--r--tests/Makefile.am4
-rw-r--r--tests/Makefile.in5
-rwxr-xr-xtests/subdir5.test59
8 files changed, 87 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 28965f592..06e6ee47d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
2001-05-06 Tom Tromey <tromey@redhat.com>
+ For PR automake/46:
+ * tests/Makefile.am (TESTS): Added subdir5.test.
+ (XFAIL_TESTS): Likewise.
+ * tests/subdir5.test: New file.
+
* tests/subobj6.test (wish_SOURCES): Use $MAKE.
* tests/subobj5.test (wish_SOURCES): Use $MAKE.
diff --git a/Makefile.in b/Makefile.in
index 8118fac20..4b2d01061 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -434,6 +434,10 @@ distdir: $(DISTFILES)
$(mkinstalldirs) $(distdir)/.
@for file in $(DISTFILES); do \
d=$(srcdir); \
+ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+ $(mkinstalldirs) "$(distdir)/$$dir"; \
+ fi; \
if test -d $$d/$$file; then \
cp -pR $$d/$$file $(distdir) \
|| exit 1; \
diff --git a/lib/Automake/Makefile.in b/lib/Automake/Makefile.in
index 2de2fd57c..e7fd7b412 100644
--- a/lib/Automake/Makefile.in
+++ b/lib/Automake/Makefile.in
@@ -125,6 +125,10 @@ distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
distdir: $(DISTFILES)
@for file in $(DISTFILES); do \
d=$(srcdir); \
+ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+ $(mkinstalldirs) "$(distdir)/$$dir"; \
+ fi; \
if test -d $$d/$$file; then \
cp -pR $$d/$$file $(distdir) \
|| exit 1; \
diff --git a/lib/Makefile.in b/lib/Makefile.in
index 29af4d7db..bc408eaca 100644
--- a/lib/Makefile.in
+++ b/lib/Makefile.in
@@ -199,6 +199,10 @@ distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
distdir: $(DISTFILES)
@for file in $(DISTFILES); do \
d=$(srcdir); \
+ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+ $(mkinstalldirs) "$(distdir)/$$dir"; \
+ fi; \
if test -d $$d/$$file; then \
cp -pR $$d/$$file $(distdir) \
|| exit 1; \
diff --git a/m4/Makefile.in b/m4/Makefile.in
index 9908ee07c..c338bc7cc 100644
--- a/m4/Makefile.in
+++ b/m4/Makefile.in
@@ -135,6 +135,10 @@ distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
distdir: $(DISTFILES)
@for file in $(DISTFILES); do \
d=$(srcdir); \
+ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+ $(mkinstalldirs) "$(distdir)/$$dir"; \
+ fi; \
if test -d $$d/$$file; then \
cp -pR $$d/$$file $(distdir) \
|| exit 1; \
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 5cf16625e..d836663a0 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -2,7 +2,8 @@
AUTOMAKE_OPTIONS = gnits
-XFAIL_TESTS = objc.test subobj2.test yaccvpath.test texinfo10.test subobj6.test
+XFAIL_TESTS = objc.test subobj2.test yaccvpath.test texinfo10.test \
+subobj6.test subdir5.test
TESTS = \
acinclude.test \
@@ -240,6 +241,7 @@ subdir.test \
subdir2.test \
subdir3.test \
subdir4.test \
+subdir5.test \
subdirbuiltsources.test \
subdircond.test \
subobj.test \
diff --git a/tests/Makefile.in b/tests/Makefile.in
index 7b859a1e3..0383a090d 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -75,7 +75,9 @@ install_sh = @install_sh@
AUTOMAKE_OPTIONS = gnits
-XFAIL_TESTS = objc.test subobj2.test yaccvpath.test texinfo10.test subobj6.test
+XFAIL_TESTS = objc.test subobj2.test yaccvpath.test texinfo10.test \
+subobj6.test subdir5.test
+
TESTS = \
acinclude.test \
@@ -313,6 +315,7 @@ subdir.test \
subdir2.test \
subdir3.test \
subdir4.test \
+subdir5.test \
subdirbuiltsources.test \
subdircond.test \
subobj.test \
diff --git a/tests/subdir5.test b/tests/subdir5.test
new file mode 100755
index 000000000..9e7b571d2
--- /dev/null
+++ b/tests/subdir5.test
@@ -0,0 +1,59 @@
+#! /bin/sh
+
+# Test to make sure that adding a new directory works.
+# PR automake/46
+
+. $srcdir/defs || exit 1
+
+cat > configure.in << 'END'
+AC_INIT(a.c)
+AM_INIT_AUTOMAKE(maude, 1.0)
+AM_PROG_CC_C_O
+AC_PROG_CC
+AC_OUTPUT(Makefile)
+END
+
+cat > Makefile.am << 'END'
+bin_PROGRAMS = wish
+wish_SOURCES = a.c
+END
+
+cat > a.c << 'END'
+#include <stdio.h>
+int main ()
+{
+ printf ("hi liver!\n");
+ return 0;
+}
+END
+
+set -e
+
+$needs_autoconf
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE --include-deps --copy --add-missing
+./configure
+$MAKE
+
+# Now add a new directory.
+cat > configure.in << 'END'
+AC_INIT(a.c)
+AM_INIT_AUTOMAKE(maude, 1.0)
+AM_PROG_CC_C_O
+AC_PROG_CC
+AC_OUTPUT(Makefile maude/Makefile)
+END
+
+mkdir maude
+cat > maude/Makefile.am << 'END'
+include_HEADERS = foo.h
+END
+
+: > maude/foo.h
+
+echo 'SUBDIRS = maude' >> Makefile.am
+
+# We want a simple rebuild to create maude/Makefile automatically.
+$MAKE