automake
[Top][All Lists]
Advanced

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

Re: advice for pre-generating documentation


From: Steffen Dettmer
Subject: Re: advice for pre-generating documentation
Date: Fri, 12 Feb 2010 12:37:16 +0100

On Thu, Feb 11, 2010 at 6:06 PM, Andreas Jellinghaus <address@hidden> wrote:
> also I wonder:
> what about builddir vs. sourcedir? how do you handle that?
> does automake handle that automaticaly?

make does handle it (at least GNU Make, I don't know others):

If you have in Makefile.am let's say:

EXTRA_DIST = sourcefile.c sourcefile.o
test: sourcefile.c sourcefile.o
        @echo "$^"

it will work even if sourcefile.o is generated from sourcefile.c;
both will be in srcdist. Make will set things like $^ correctly
because VPATH is considered, that means `make test' tells e.g.:

address@hidden:/tmp/steffen/.../build/i386-gnulinux/test # make test
../../../../ccomm/test/sourcefile.c sourcefile.o

                                          -- cool aint??? :-)

but I would ever put generated sources to EXTRA_DIST, because in
the dist in this example file you would find:

.../test/sourcefile.c
.../test/sourcefile.o

then if you compile from that dist with builddir != srcdir and
deps enforce generation of sourcefile.o you end up with 2
sourcefile.o files: one in srcdir and other in builddir, which
(IMHO) must never ever happen.

oki,

Steffen




reply via email to

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