> -----Original Message-----
> From: Tom Lane [mailto:tgl@sss.pgh.pa.us]
>
> "Rocco Altier" <RoccoA@Routescape.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