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