]> sourceware.org Git - automake.git/commitdiff
* lib/am/distdir.am (distcheck): Strip $(srcdir) prefix on
authorAlexandre Duret-Lutz <adl@gnu.org>
Thu, 5 Sep 2002 14:29:44 +0000 (14:29 +0000)
committerAlexandre Duret-Lutz <adl@gnu.org>
Thu, 5 Sep 2002 14:29:44 +0000 (14:29 +0000)
distributed files, to workaround Sun make VPATH munging.
This fixes subdircond2.test, subdircond3.test, and subpkg.test
on Solaris.
* tests/extra6.test, tests/lex3.test, tests/pr87.test,
tests/pr9.test, tests/target-cflags.test, tests/texinfo13.test,
tests/texinfo16.test, tests/yacc7.test, tests/yaccvpath.test:
Don't require GNU make.

ChangeLog
lib/am/distdir.am
tests/extra6.test
tests/lex3.test
tests/pr87.test
tests/pr9.test
tests/target-cflags.test
tests/texinfo13.test
tests/texinfo16.test
tests/yacc7.test
tests/yaccvpath.test

index 0c4d8648d95dae8e72b4b7724bd166e98dc6af4b..5ba0c727cb2bbe486006af1df9c637476bef1dce 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,15 @@
 2002-09-05  Alexandre Duret-Lutz  <duret_g@epita.fr>
 
-       * lib/am/distdir.am: Add missing `;'.
+       * lib/am/distdir.am (distcheck): Strip $(srcdir) prefix on
+       distributed files, to workaround Sun make VPATH munging.
+       This fixes subdircond2.test, subdircond3.test, and subpkg.test
+       on Solaris.
+       * tests/extra6.test, tests/lex3.test, tests/pr87.test,
+       tests/pr9.test, tests/target-cflags.test, tests/texinfo13.test,
+       tests/texinfo16.test, tests/yacc7.test, tests/yaccvpath.test:
+       Don't require GNU make.
+
+       * lib/am/distdir.am (distcheck): Add missing `;'.
 
        * lib/am/scripts.am (installcheck-%DIR%SCRIPTS): Account for
        Sun make rewriting rules in VPATH builds.  (Fixes gnits3.test.)
index c0e38367e8c047d377e4a9ffa6e09b4fa4dac22a..c3ff3362939f7fbac90f533fe7e12f6c8a693f6a 100644 (file)
@@ -62,7 +62,35 @@ endif %?TOPDIR_P%
 ?DISTDIRS?     $(mkinstalldirs) %DISTDIRS%
 ##
 ##
-       @list='$(DISTFILES)'; for file in $$list; do \
+       @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+       list='$(DISTFILES)'; for file in $$list; do \
+##
+## Yet another hack to support SUN make.
+##
+## Let's assume `foo' appears in DISTFILES and is not a built file.
+## When building with VPATH=$(srcdir), SUN make will rewrite `foo' as
+## `$(srcdir)/foo'.  An attempt to install the file with
+##    cp $file $(distdir)/$file
+## will thus install $(srcdir)/foo as $(distdir)/$(srcdir)/foo
+## instead of $(distdir)/foo.
+##
+## So let's strip this leading $(srcdir)/ when it exists.  (As far we
+## know, only SUN make adds it.)  Searching whether the file is to be
+## found in the source or build directory will be done latter.
+##
+## In case we are _not_ using SUN make, how can we be sure we are
+## not stripping a legitimate filename that starts with the same
+## pattern as $(srcdir)?
+## Well, it can't happen without the Makefile author distributing
+## something out of the distribution (which is bad).   As an example,
+## consider `EXTRA_DIST = ../bar'.  This is an issue if $srcdir is `..',
+## however getting this value for srcdir is impossible: `EXTRA_DIST = ../bar'
+## implies we are in a subdirectory (so `../bar' is within the package),
+## hence `$srcdir' is something like `../../subdir'.
+##
+         case $$file in \
+           $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+         esac; \
 ##
 ## 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 ed4a9fcc6f6c61b27f66e901f6bad42d0f5e17a2..0380dec4ca56051353591b6b30d92579df7826ba 100755 (executable)
@@ -3,8 +3,6 @@
 # Check to make sure EXTRA_DIST can contain a directory or
 # a subdirectory, in $(builddir) or $(srcdir).
 
-# 'make distdir' + VPATH does not work with Solaris make.
-required=GNUmake
 . $srcdir/defs || exit 1
 
 set -e
index f92f8599dfa308605cffd311b343a1ea894fe583..633044c6095052e571e2305b07c6f374e6603644 100755 (executable)
@@ -3,7 +3,7 @@
 # Test associated with PR 19.
 # From Matthew D. Langston.
 
-required='GNUmake gcc gzip'
+required='gcc gzip'
 . $srcdir/defs || exit 1
 
 # Ignore user CFLAGS.
index 798ad52e0de5988c1db0f0999156920454b2409c..9beffb01f1d5755ea649cde8642e1a1baad0aa5e 100755 (executable)
@@ -2,8 +2,7 @@
 
 # Test for PR automake/87.
 
-# Require GNU make for `make distcheck'
-required='GNUmake gcc'
+required=gcc
 . $srcdir/defs || exit 1
 
 subdirs="foo bar"
index 9a9455fa553e850e5c45417d0797814a1ec71267..e2c100ef50f1642bcd5b5b780d276069176cc699 100755 (executable)
@@ -2,8 +2,7 @@
 
 # Test for bug in PR 9.
 
-# `distcheck' requires GNU make.
-required='GNUmake gzip'
+required=gzip
 . $srcdir/defs || exit 1
 
 cat > configure.in << 'END'
index 59850da18e84d8391db93a5da01d0f7f59db901a..40f9f30466028974939e139756b296ba888f2ad4 100755 (executable)
@@ -3,7 +3,7 @@
 # Test to make sure target specific CFLAGS work
 # Assar Westerlund <assar@sics.se>
 
-required='GNUmake gcc'
+required=gcc
 . $srcdir/defs || exit 1
 
 cat > configure.in << 'END'
index 737ef0b6fa85c37cac5ec07d2992e28396123fa6..9b8530b576f6c6cb4949a76b26b44ec7c8ecb66d 100755 (executable)
@@ -3,7 +3,7 @@
 # Check for subdir Texinfo.
 # PR/343
 
-required='GNUmake makeinfo'
+required='makeinfo'
 . $srcdir/defs || exit 1
 
 set -e
index ac928513b0963e53adfb7f84f4092be6776450d6..e519c0c74145374aa6c1a1c2ecd8c3558fc83c40 100755 (executable)
@@ -2,7 +2,7 @@
 
 # Check that info files are built in $(srcdir).
 
-required='GNUmake makeinfo'
+required='makeinfo'
 . $srcdir/defs || exit 1
 
 set -e
index 66828fa7ee5c5460a46c87f954730c71b59a1064..771726d73e3af7dba09390484786937b29a1fec8 100755 (executable)
@@ -6,7 +6,6 @@
 # Also check that the sources of the generated parser are distributed.
 # PR/47.
 
-required=GNUmake
 . $srcdir/defs || exit 1
 
 cat >> configure.in << 'END'
index b7b275fd459eb7593a2a7c7b661caa2150e0df28..ef7ee6626abfb8249d93f0df211d4420bf7ed87a 100755 (executable)
@@ -6,8 +6,7 @@
 # `make' and `make distdir' and check whether the version of `parse.c'
 # to be distributed is up to date.
 
-# Require GNU make for `make distdir'
-required='GNUmake gcc bison'
+required='gcc bison'
 . $srcdir/defs || exit 1
 
 cat > configure.in << 'END'
This page took 0.037765 seconds and 5 git commands to generate.