Removing PORTNAME from libpq/Makefile
Removing PORTNAME from libpq/Makefile
От:
darrenk@insightdist.com (Darren King)
Дата:
In order to have a shared libpq made automatically for AIX ports, it's necessary to rework the shared lib rules in interfaces/libpq/Makefile. It seems to me that the PORTNAME dependent rules should be in the respective makefiles/Makefile.$(PORTNAME), no? The libpq$(DLSUFFIX) make should be handled by %$(DLSUFFIX) rules for that port. If it needs extra handling, then there should be special rules for libpq$(DLSUFFIX). The various LDFLAGS_SL would be appended to the SHARED_LIB line in the template and $(CFLAGS_SL) would then be used in the make rule for the shared lib. The most basic thing to do for this is to move the $(shlib) rule to each Makefile.$(PORTNAME) and replace it in the libpq Makefile with a simple rule to make libpq.o and then let each port make the shlib in its own way. It's not as complicated or as messy as it reads. I need someone for the linux, bsd, i386-solaris, univel and hpux ports to work with on moving the shlib rule. Better than just moving it over myself and breaking it in the process. :) So to summarize a little, in libpq/Makefile, make a libpq.o and then in Makefile.$(PORTNAME), make the shared libpq. Seem reasonable? Thanks, darrenk
Re: [HACKERS] Removing PORTNAME from libpq/Makefile
От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
darrenk@insightdist.com (Darren King) writes: > So to summarize a little, in libpq/Makefile, make a libpq.o and then > in Makefile.$(PORTNAME), make the shared libpq. Seem reasonable? Close, but no cigar. What happens when we have two, or three, or ten shared libs to make? The right thing to do is to have makefiles/Makefile.PLATFORM contain some sort of generic shared-library-making rule that can then be applied in libpq/Makefile and any other module makefile that wants to produce a shared library. I'm a little out of practice on generic rules in gmakefiles, but since we already assume that gmake is being used, it shouldn't be too hard to do it this way. I'll be glad to help with the HPUX version of the rule. regards, tom lane