automake
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

`make dist' with srcdir != builddir


From: Alexandre Duret-Lutz
Subject: `make dist' with srcdir != builddir
Date: 25 Feb 2001 20:23:44 +0100
User-agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7

Some weeks ago Bruno Haible reported (in private mail) that
running `make dist' with srcdir != builddir could produce
distributions which are not up-to-date, especially if you have
generated files like bison parsers: $builddir/parser.c would be
updated whenever $srcdir/parser.y is changed but the
distribution would ship with an old $srcdir/parser.c instead of
the fresh $builddir/parser.c.  Fortunately, this is detected if
you run `make distcheck' instead of `make dist', because the
buildir is non empty after `make distclean' (parser.c is left).

This can be easily fixed by changing the distdir code to look
for files in the builddir first and failling back to look in the
srcdir if needed.  But maybe this is not the right fix; maybe
bison should not output its parsers in the builddir but in the
srcdir instead (actually, this is what the GNU Standards ask
for).

I have attempted to build a testcase that demonstrates the
failure, but unfortunately it fails before this error!  (it is
expected to fail at the end of `make distcheck', where the build
directory is listed to see if there are any file left).

On Automake 1.4d it fails in `make distcheck' with:

make[3]: Entering directory 
`/home/adl/projs/automake-1.4d/tests/testSubDir/sub/foo-0.1/=build'
chmod -R a+w foo-0.1 > /dev/null 2>&1; rm -rf foo-0.1
mkdir foo-0.1
/bin/sh ../../../mkinstalldirs foo-0.1/../.. ../..
cp: cannot create regular file `foo-0.1/../../install-sh': Permission denied
make[3]: *** [distdir] Error 1
make[3]: Leaving directory 
`/home/adl/projs/automake-1.4d/tests/testSubDir/sub/foo-0.1/=build'
make[2]: *** [distcheck] Error 2
make[2]: Leaving directory `/home/adl/projs/automake-1.4d/tests/testSubDir/sub'
FAIL: yaccvpath.test

Today's CVS Automake fails likewise on another file.

I assume this is related to
...utomake-1.4d/tests/testSubDir % grep \^DIST_COMMON Makefile.in
DIST_COMMON =  ../../depcomp ../../install-sh ../../missing \


I don't understand where these `../../' come from, I whish
someone could shed some light on this.  It looks like the
Makefile uses the tools installed in Automake's directory
instead of those installed locally.  If I run the test manually,
with Autoconf-1.4d installed in my PATH, it runs fine (i.e. it's
stop at the expected place and don't add those annoying
`../../').

Here is the file.

Attachment: yaccvpath.test
Description: yaccvpath.test

-- 
Alexandre Duret-Lutz

reply via email to

[Prev in Thread] Current Thread [Next in Thread]