Skip site navigation (1) Skip section navigation (2)

Re: Proposed patch to remove .so pattern rules from platform Makefiles

From: "Rocco Altier" <RoccoA(at)Routescape(dot)com>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: <pgsql-patches(at)postgresql(dot)org>
Subject: Re: Proposed patch to remove .so pattern rules from platform Makefiles
Date: 2005-07-26 18:39:42
Message-ID: 6E0907A94904D94B99D7F387E08C4F5730EDFD@FALCON.INSIGHT (view raw or flat)
Thread:
Lists: pgsql-patches
> -----Original Message-----
> From: Tom Lane [mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us] 
> 
> "Rocco Altier" <RoccoA(at)Routescape(dot)com> writes:
> > Please disregard this patch.  I have a ton of lib%.exp and 
> > similar files created currently.
> 
> Yeah, that was one of the reasons I called it ugly :-(.  I 
> had put in an
> "rm" step to get rid of lib%.so, you could probably fix the extraneous
> .exp files similarly.
> 
If they are part of the rule, they get expanded, but if its part of the
commands to run, they don't, which is where I was getting the lib%.exp
from.

I have gotten them to where they will be expanded for the .exp, so that
there are the multiple files correctly, instead of just the one
lib%.exp.  I will look at doing the same for lib%.so, etc.

> Alternatively we could look at expanding Makefile.shlib to 
> provide %.so pattern rules directly. 
>
If I am reading the affect on the makefiles correctly, that is basically
what is happening.  We get a bunch of pattern rules...

From gmake -p (in contrib/spi - a multiple MODULES rule):
lib%.a: %.o
#  commands to execute (from `../../src/Makefile.shlib', line 281):
    $(LINK.static) $@ $^
    $(RANLIB) $@


lib%.so: lib%.a
#  commands to execute (from `../../src/Makefile.shlib', line 313):
    $(MKLDEXPORT) $< > $(subst .a,$(EXPSUFF),$<)
    $(COMPILER) $(LDFLAGS_SL) -o $@ $< $(LDFLAGS) $(SHLIB_LINK)
-Wl,-bI:$(top_builddir)/src/backend/$(POSTGRES_IMP) -Wl,-bE:$(subst
.a,$(EXPSUFF),$<)


%.so: lib%.so
#  commands to execute (from `../../src/makefiles/pgxs.mk', line 85):
    rm -f $@
    ln $< $@
    rm -f $(shlib_major)
...
(Substituted rules with autoinc later..)


> My patch was more intended as proof of concept
> than anything we necessarily wanted to apply as-is.
> 
I have been trying to iron out some of the wrinkles, but over all its
definitely a good place to start.

Thanks,
	-rocco


pgsql-patches by date

Next:From: Neil ConwayDate: 2005-07-27 01:41:30
Subject: pg_dump: fix crash on error
Previous:From: Tom LaneDate: 2005-07-26 17:48:31
Subject: Re: Proposed patch to remove .so pattern rules from platform Makefiles

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group