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

From Peter Eisentraut
Subject Makefile.global is kind of a pain
Date
Msg-id Pine.LNX.4.21.0006220026460.1681-100000@localhost.localdomain
Whole thread Raw
Responses Re: Makefile.global is kind of a pain  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Just a notice:

I tried really hard but Makefile.global as we know it can't work together
with a fancy autoconf build system. We already know of the install-sh
relative path problem. The next problem is that the automatic makefile
remaking rules (see bottom of top GNUmakefile.in) can't be put into
Makefile.global, so it really fails to do its job that is "include common
stuff". What's worse, by including another makefile, each makefile would
really have to worry about remaking Makefile.global as well. So as it is
it's doing really little good. There are also several other more technical
problems regarding relative paths and build vs source paths getting out of
order, etc.

So I thought I'd do the next best thing and apply the features that
Autoconf bestowed upon us: output file concatenation. Instead of each
Makefile including Makefile.global, each makefile is pasted together with
a global makefile of sorts when it's created by config.status. That would
look like this in configure.in:

AC_OUTPUT(   ...   src/bin/psql/Makefile:config/top.mk:src/bin/psql/Makefile.in:config/bottom.mk   ...
)

(For various reasons a "top" global and a "bottom" global work best.) This
approach seems to solve all of the mentioned problems.

If you have no idea what I just meant, good. :) I'm currently plowing
through the bin/ subtree, then you'll see. If you did, also good, feel
free to comment.


-- 
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: "Randall Parker"
Date:
Subject: tablespace managed by system vs managed by database
Next
From: "Randall Parker"
Date:
Subject: Re: Big 7.1 open items