On Thu, Feb 11, 2010 at 6:06 PM, Andreas Jellinghaus <a...@dungeon.inka.de> 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.: stef...@host:/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