windres: -U

Dimitrie O. Paun dimi at intelliware.ca
Fri Mar 21 01:03:57 CST 2003


[This is a message I've posted to the Mozilla people
 regarding windres. Comments appreciated]

Folks, we have the following uglifying construct:

ifdef GNU_CC
	$(RC) $(RCFLAGS) $(filter-out -U%,$(DEFINES)) \
		$(INCLUDES:-I%=--include-dir %) $(OUTOPTION)$@ $<
else
	$(RC) $(RCFLAGS) -r $(DEFINES) $(INCLUDES) $(OUTOPTION)$@ $<
endif

As I mentioned already, I've already submitted a patch to windres
(http://sources.redhat.com/ml/binutils/2003-03/msg00313.html)
to accept -I for include dirs. Given that the windres maintainers
like the idea, it's just a matter of time (few days, until I get
the stupid FSF copyright assignment papers signed) until it goes in.

Idealy, I'd like to completely remove the annoying ifdef. So what's
left? 

First, the -r in the !GNU_CC case. This seems to be simply
ignored by the MS rc, for backwards compatibility:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tools/tools/using_rc_the_rc_command_line_.asp

Do we _need_ to keep it around?

Second, it seems that windres does not support the -U option.
It should, and I'm considering submitting a patch to do just that.

With that, the monster will collapse to simply:

 	$(RC) $(RCFLAGS) $(DEFINES) $(INCLUDES) $(OUTOPTION)$@ $<

which is so much easier on the eye.

-- 
Dimi.




More information about the wine-devel mailing list