Re: win32 version info - Mailing list pgsql-patches

From Tom Lane
Subject Re: win32 version info
Date
Msg-id 9620.1090875690@sss.pgh.pa.us
Whole thread Raw
In response to Re: win32 version info  ("Magnus Hagander" <mha@sollentuna.net>)
Responses Re: win32 version info
List pgsql-patches
"Magnus Hagander" <mha@sollentuna.net> writes:
> All that is then needed is to teach each binary to link in "win32ver.o".
> For initdb, I've done this like:
> ifeq ($(PORTNAME), win32)
> FILEDESC=initdb - initialize a new database cluster
> OBJS+=win32ver.o
> endif

> I assume what you would like is to have just the FILEDESC row in there?

That would be ideal, but this is probably close enough if no one has a
great idea about how to get rid of the manual addition to $(OBJS).

> One way would be to just add something like $(PORTOBJ) and have
> Makefile.global add whatever special .o files are required for the
> current port. That way we wouldn't teach it specifically about the win32
> version stuff, but we'd still have to teach it to look somewhere...

Yeah, that's not a bad idea.  If anyone can think of plausible reasons
why we might end up with other things needing to be built for every
executable, it would be quite reasonable to go this route.

I was originally thinking of somehow migrating the executable build
rules into a single pattern rule, but given the lack of any suffix on
executable names it's not clear how to use a pattern rule for the
purpose.  And the existing rules are diverse enough that it might be
a real pain to construct such a pattern rule anyway.

            regards, tom lane

pgsql-patches by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: win32 version info
Next
From: Oliver Jowett
Date:
Subject: Re: [HACKERS] Function to kill backend