From 6ee25d14004fa3d6a2d4e876cc2e606133cd13a2 Mon Sep 17 00:00:00 2001 From: Alexandre Duret-Lutz Date: Fri, 9 Nov 2001 17:39:45 +0000 Subject: [PATCH] * lib/am/distdir.am (distdir): Also look for directory in build directory first. (See 2001-05-14.) * tests/Makefile.am (TESTS): Add extra5.test. * tests/extra5.test: New file. From Dean Povey. --- ChangeLog | 8 ++++++++ NEWS | 1 + THANKS | 1 + lib/am/distdir.am | 5 +++-- tests/Makefile.am | 1 + tests/Makefile.in | 3 ++- tests/extra5.test | 26 ++++++++++++++++++++++++++ 7 files changed, 42 insertions(+), 3 deletions(-) create mode 100755 tests/extra5.test diff --git a/ChangeLog b/ChangeLog index eb022a13..4899d203 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2001-11-09 Alexandre Duret-Lutz + + * lib/am/distdir.am (distdir): Also look for directory in build + directory first. (See 2001-05-14.) + * tests/Makefile.am (TESTS): Add extra5.test. + * tests/extra5.test: New file. + From Dean Povey. + 2001-11-09 Alexandre Duret-Lutz Fix for distcommon2.test: diff --git a/NEWS b/NEWS index 8c8dfe64..1570615a 100644 --- a/NEWS +++ b/NEWS @@ -8,6 +8,7 @@ New in 1.5a: are no longer shipped, since Autoconf 2.52 provides them (both as AM_ and AC_). * `#line' of Lex and Yacc files are properly set. +* EXTRA_DIST can contain generated directories. * Fixed CDPATH portability problems, in particular for MacOS X. * Fixed handling of nobase_ targets. * Fixed support of implicit rules leading to .lo objects. diff --git a/THANKS b/THANKS index 90274228..c8677438 100644 --- a/THANKS +++ b/THANKS @@ -33,6 +33,7 @@ Dave Brolley brolley@redhat.com Dave Morrison dave@bnl.gov David A. Swierczek swiercze@mr.med.ge.com David Zaroski cz253@cleveland.Freenet.Edu +Dean Povey dpovey@wedgetail.com Derek R. Price derek.price@openavenue.com Dieter Baron dillo@stieltjes.smc.univie.ac.at Dmitry Mikhin dmitrym@acres.com.au diff --git a/lib/am/distdir.am b/lib/am/distdir.am index e519df2e..24183b66 100644 --- a/lib/am/distdir.am +++ b/lib/am/distdir.am @@ -65,9 +65,10 @@ endif %?TOPDIR_P% ## ## Always look for the file in the build directory first. That way ## for something like yacc output we will correctly pick up the latest -## version. +## version. Also check for directories in the build directory first, +## so one can ship generated directories. ## - if test -f $$file; then d=.; else d=$(srcdir); fi; \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ ## ## Make the subdirectory for the file. This is going to make `dist' ## really crawl, but it seems like the only way to do it, given that diff --git a/tests/Makefile.am b/tests/Makefile.am index 759e5d91..3dc3433d 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -138,6 +138,7 @@ ext.test \ extra.test \ extra3.test \ extra4.test \ +extra5.test \ flibs.test \ fnoc.test \ fo.test \ diff --git a/tests/Makefile.in b/tests/Makefile.in index a3260711..cbdf2182 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -211,6 +211,7 @@ ext.test \ extra.test \ extra3.test \ extra4.test \ +extra5.test \ flibs.test \ fnoc.test \ fo.test \ @@ -486,7 +487,7 @@ distdir = $(top_distdir)/$(PACKAGE)-$(VERSION) distdir: $(DISTFILES) @for file in $(DISTFILES); do \ - if test -f $$file; then d=.; else d=$(srcdir); fi; \ + 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"; \ diff --git a/tests/extra5.test b/tests/extra5.test new file mode 100755 index 00000000..58f7b99e --- /dev/null +++ b/tests/extra5.test @@ -0,0 +1,26 @@ +#! /bin/sh + +# Check to make sure EXTRA_DIST can contain a directory from $buildir. +# From Dean Povey. + +. $srcdir/defs || exit 1 + +echo AC_OUTPUT >> configure.in + +cat > Makefile.am << 'END' +EXTRA_DIST=foo + +foo: + mkdir foo + touch foo/bar +END + +set -e + +$ACLOCAL +$AUTOMAKE +$AUTOCONF +mkdir build +cd build +../configure +make distdir -- 2.43.5