Re: win32 version info

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Magnus Hagander <mha(at)sollentuna(dot)net>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: win32 version info
Date: 2004-07-26 19:40:40
Message-ID: 41055E38.6050000@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

Magnus Hagander wrote:

>
>
>>Can't you localize this into a single build rule somewhere? And surely
>>we do not need to maintain a boilerplate .rc file for every executable.
>>
>>
>
>There is a field in the RC file that is "file description". It's pretty
>much different for every file. (There is also a "product description" in
>there which is the same).
>
>As for putting it in a single build rule - I don't know if that can be
>done. I thought it over and didn't come up with a way, but there may be
>other who are better at writing Makefiles... I guess a script could be
>written that generates the file, but the per-binary information has to
>be somewhere. Not sure how that method would be cleaner.
>
>

We would not need to generate it at all. Maybe something like this would
work:

In the makefile, symlink each .rc file to the boilerplate version
somewhere, and put a definition like this:

FILEDESC="\"whatever you like\""

and also conditionally include the *rc.o file in its objects list.

The rc file would, of course, have this line:

VALUE "FileDescription", FILEDESC

Makefile.global or similar could define the build rule once, like

%.o: %.rc
windres -DFILEDESC=$(FILEDESC) $< -o $@
--include-dir=$(top_builddir)/src/include

I hope you get the idea.

cheers

andrew

In response to

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Peter Eisentraut 2004-07-26 19:42:13 Re: win32 version info
Previous Message Sean Chittenden 2004-07-26 19:25:18 pg_ctl -o option dumps core when processing postmaster arguments...