Re: Makefile.global is kind of a pain

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Makefile.global is kind of a pain
Date: 2000-06-24 11:58:03
Message-ID: Pine.LNX.4.21.0006232357170.484-100000@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)gmx(dot)net 75262 Uppsala
http://yi.org/peter-e/ Sweden

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2000-06-24 12:10:22 Re: About the pid and opts files
Previous Message Kovacs Zoltan Sandor 2000-06-24 11:48:22 Re: refint/acl problem