[Top][All Lists]

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

Re: make distcheck not finding custom code generation script

From: Brian Dessent
Subject: Re: make distcheck not finding custom code generation script
Date: Sat, 13 May 2006 00:54:02 -0700

Andreas Ntaflos wrote:

> So to translate to and
> foo.hh I need to run (in my $(topdir)/src subdirectory)
> ../tools/ /path/to/foo2cpp
> In src/ there is a target that does just that:
> foo.hh:
>         $(ICE_FOO2CPP)
> [...]
> make[1]: Entering directory `/path/to/foo_project/foo-1.0/_build'
> make  all-recursive
> make[2]: Entering directory `/path/to/foo_project/foo-1.0/_build'
> Making all in src
> make[3]: Entering directory `/path/to/foo_project/foo-1.0/_build/src'
> ../tools/ /usr/bin/foo2cpp
> make[3]: ../tools/ Command not found
> Which is correct, there is no script from where make
> distcheck is looking (i.e. from
> inside /path/to/foo_project/foo-1.0/_build/src). Also there are no

Among the things that 'distcheck' checks is whether building in a
directory outside of the source directory (sometimes referred to as a
"VPATH build") works.  This is a convenient and important feature to
support, as many developers and users expect for this to work --
especially since you typically get this functionality for free without
having to do anything explicit if you use automake.

One might want to use a VPATH build because it keeps all of the built
files in a different tree from the source files, which generally is very
tidy since you can just "rm -rf" this dir and get back to the initial
pristine state, without having to use "make distclean" which can take
longer (and in some cases requires a bunch of needless work like
rerunning configure.)

It also allows for having multiple builds from the same source tree
(such as an optimized build and a debug build) without having to copy
any source files around.  And it allows for the source files to be on a
remote read-only NFS mount, with built files stored locally, a situation
which some organizations use for build farms or other such
automated/distributed setups.

So the answer to your question is that you shouldn't assume that you are
in the source tree when referring to files.  Try having your macro
expand the path as "$(srcdir)/tools/" instead of
"../tools/".  I'm not entirely sure of the correct quoting
here, but I'm pretty sure you want it to expand as $(srcdir) in the
final generated Makefile rule, so this might involve quoting the ('s and
)'s in m4, I don't know.


reply via email to

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