Proposed patch to remove .so pattern rules from platform Makefiles

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-patches(at)postgreSQL(dot)org
Subject: Proposed patch to remove .so pattern rules from platform Makefiles
Date: 2005-07-24 22:00:15
Message-ID: 14717.1122242415@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

I've wanted for a long time to get rid of the pattern rules in the
port-specific Makefiles that generate shared libraries from single
object files. These patterns duplicate (or, more often, fail to
completely duplicate) the knowledge in Makefile.shlib. So from
a maintenance point of view centralizing that knowledge is a good
thing.

The stumbling block has been partly that the regression-test makefile
depended on the pattern rules (easily fixed by using Makefile.shlib)
and partly that pgxs.mk (and its predecessor contrib-global.mk) depended
on the pattern rules to handle Makefiles that wanted to build multiple
.so files. Since Makefile.shlib is designed to handle only one shlib
per build, there wasn't any obvious way to fix that.

The attached proposed patch gets around this by invoking Makefile.shlib
in a way that produces a pattern rule "lib%.so : %.o". This is
moderately ugly but it gets the job done without changing Makefile.shlib
itself. Possibly it could be done more cleanly if we were willing
to introduce pattern rules inside Makefile.shlib.

I am not sure if the patch works on non-Unix platforms --- could someone
test on Win32 and Cygwin, in particular? AIX is weird enough to need
testing too.

Any other comments?

regards, tom lane

Attachment Content-Type Size
unknown_filename text/plain 15.2 KB

Browse pgsql-patches by date

  From Date Subject
Next Message Jamie Deppeler 2005-07-24 22:58:44 Re: Problems compiling Postgresql 8.0.3 on 10.4
Previous Message Alvaro Herrera 2005-07-24 20:06:51 Re: [HACKERS] Autovacuum loose ends