Tom Lane writes:
> The separate-build-tree projects that I've used initialize the build
> tree by doing, for each source directory containing C files (say,
> src/foo/bar/)
> mkdir obj/foo/bar
> ln -s ../../../src/foo/bar/Makefile obj/foo/bar/Makefile
> and then VPATH is set by the Makefile to ../../../src/foo/bar
I think we might be able to do better:
--Makefile--
subdir = src/bin/psql
include ../../Makefile.global
--Makefile.global--
top_srcdir = @top_srcdir@ # provided by autoconf
srcdir = $(top_srcdir)/subdir
VPATH = $(srcdir)
...
--Makefile cont.--
# build stuff
That way you can build in any directory.
Well, that makes things a lot simpler. Then we really don't need any *.in
files at all except for a select few. We'd just dump all @FOO@ things into
Makefile.global.
Of course I somehow have to hack up AC_PROG_INSTALL so it doesn't give a
relative path to install-sh, but that can be done.
--
Peter Eisentraut Sernanders väg 10:115
peter_e@gmx.net 75262 Uppsala
http://yi.org/peter-e/ Sweden