[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: vpath and make dist newbie problem
From: |
Paul Davis |
Subject: |
Re: vpath and make dist newbie problem |
Date: |
Mon, 22 Oct 2012 17:21:08 -0400 |
On Mon, Oct 22, 2012 at 5:10 PM, Dan Kegel <address@hidden> wrote:
> I don't understand automake's "make dist" support, and could use a clue.
> I've boiled my problem down to the following tiny test case, in which
> "./configure; make" works, but "make dist" fails. It seems that
> make dist is unable to follow vpath. Is this a known problem?
>
> To reproduce the problem, do
> wget http://kegel.com/pathprob.tgz
> tar -xzvf pathprob.tgz
> cd pathprob
> touch NEWS README AUTHORS ChangeLog
> aclocal
> autoconf
> automake --add-missing
> ./configure
> make dist
>
> This outputs
> { test ! -d "foo-0.1" || { find "foo-0.1" -type d ! -perm -200 -exec
> chmod u+w {} ';' && rm -fr "foo-0.1"; }; }
> test -d "foo-0.1" || mkdir "foo-0.1"
> (cd foobar && make top_distdir=../foo-0.1 distdir=../foo-0.1/foobar \
> am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)
> make[1]: Entering directory `/home/dank/pathprob/foobar'
> cp: cannot stat `./george.c': No such file or directory
> make[1]: *** [distdir] Error 1
> make[1]: Leaving directory `/home/dank/pathprob/foobar'
> make: *** [distdir] Error 1
>
> The test case consists of the four files
> pathprob/Makefile.am pathprob/foobar/Makefile.am
> pathprob/foobar/blah/george.c pathprob/configure.ac
> with contents
>
> ::::::::::::::
> pathprob/Makefile.am
> ::::::::::::::
> SUBDIRS = foobar
> ::::::::::::::
> pathprob/foobar/Makefile.am
> ::::::::::::::
> AUTOMAKE_OPTIONS = \
> foreign \
> 1.9 \
> --warnings=no-portability
>
> lib_LIBRARIES = libfoobar.a
>
> vpath %.c @abs_srcdir@/blah
>
I've never seen a line like this and it looks to be the part that's
not working. The first thing I'd try is to move george.c to
pathprob/foobar/george.c and if that works, either put sources next to
this Makefile.am or move the guts of it to
pathprob/foobar/blah/Makefile.am
> libfoobar_a_SOURCES = george.c
> ::::::::::::::
> pathprob/foobar/blah/george.c
> ::::::::::::::
> int x = 1;
> ::::::::::::::
> pathprob/configure.ac
> ::::::::::::::
> AC_PREREQ(2.61)
> AC_INIT([foo],
> [0.1],
> address@hidden,
> [foo])
> AC_PROG_CC
> AC_PROG_RANLIB
> AM_INIT_AUTOMAKE
>
> AC_CONFIG_FILES([
> Makefile
> foobar/Makefile
> ])
> AC_OUTPUT
>
> This is with automake 1.11.1 and autoconf 2.65.
>