[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: simple distcheck fails
From: |
Ralf Wildenhues |
Subject: |
Re: simple distcheck fails |
Date: |
Fri, 28 Nov 2008 20:05:51 +0100 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
Hello Jan,
* Jan Engelhardt wrote on Fri, Nov 28, 2008 at 02:06:57PM CET:
> `make distcheck` from an obj dir fails, e.g.
>
> 14:04 yaguchi:/dev/shm/test > l
> total 256
> drwxr-xr-x 2 jengelh users 260 Nov 28 14:04 .
> drwxrwxrwt 4 root root 80 Nov 28 14:01 ..
> -rw-r--r-- 1 jengelh users 65 Nov 28 14:01 Makefile.am
> -rw-r--r-- 1 jengelh users 19388 Nov 28 14:03 Makefile.in
> -rw-r--r-- 1 jengelh users 32266 Nov 28 14:03 aclocal.m4
> -rwxr-xr-x 1 jengelh users 52 Nov 28 14:02 autogen.sh
> -rwxr-xr-x 1 jengelh users 130473 Nov 28 14:03 configure
> -rw-r--r-- 1 jengelh users 111 Nov 28 14:02 configure.ac
> -rwxr-xr-x 1 jengelh users 17867 Nov 28 14:03 depcomp
> -rw-r--r-- 1 jengelh users 68 Nov 28 14:04 foo.c
> -rw-r--r-- 1 jengelh users 23 Nov 28 14:03 foo.h
> -rwxr-xr-x 1 jengelh users 13620 Nov 28 14:03 install-sh
> -rwxr-xr-x 1 jengelh users 11135 Nov 28 14:03 missing
> 14:04 yaguchi:/dev/shm/test > md obj
> 14:04 yaguchi:/dev/shm/test > cd obj
> 14:04 yaguchi:../test/obj > ../configure >/dev/null
> 14:04 yaguchi:../test/obj > make
> CC foo.o
> CCLD foo
> 14:04 yaguchi:../test/obj > make distcheck V=2
> [...]
> make[1]: Entering directory `/dev/shm/test/obj/foo-0/_build'
> depbase=`echo foo.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
> gcc -DPACKAGE_NAME=\"foo\" -DPACKAGE_TARNAME=\"foo\"
> -DPACKAGE_VERSION=\"0\" -DPACKAGE_STRING=\"foo\ 0\" -DPACKAGE_BUGREPORT=\"\"
> -DPACKAGE=\"foo\" -DVERSION=\"0\" -I. -I.. -g -O2 -MT foo.o -MD -MP -MF
> -$depbase.Tpo -c -o foo.o ../foo.c &&\
> mv -f $depbase.Tpo $depbase.Po
> ../foo.c:1:17: error: foo.h: No such file or directory
> make[1]: *** [foo.o] Error 1
> make[1]: Leaving directory `/dev/shm/test/obj/foo-0/_build'
> make: *** [distcheck] Error 2
>
> That is because it uses "/dev/shm/test/obj/foo-0/_build/../.." as
> $srcdir (which however is the $builddir) instead of
> "/dev/shm/test/obj/foo-0/_build/.."
This seems to be a misunderstanding. What distcheck does here is the
following:
- first create a distribution tarball,
- then, extract this tarball into a subdirectory foo-0/,
- then, configure the sources in that subdirectory, in a VPATH setup,
i.e., using a relative build directory named _build/.
The most likely reason for the failure is that foo.h is not packaged.
Solution then is to list it in *_SOURCES as well:
bin_PROGRAMS = foo
foo_SOURCES = foo.c foo.h
Cheers,
Ralf