Re: Makefile.global is kind of a pain - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: Makefile.global is kind of a pain
Date
Msg-id Pine.LNX.4.21.0006232357170.484-100000@localhost.localdomain
Whole thread Raw
In response to Re: Makefile.global is kind of a pain  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
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



pgsql-hackers by date:

Previous
From: Kovacs Zoltan Sandor
Date:
Subject: Re: refint/acl problem
Next
From: Peter Eisentraut
Date:
Subject: Re: About the pid and opts files