[Qt-interest] Changing QMAKE_RCC?

R. Reucher rene.reucher at batcom-it.net
Wed Jan 7 17:19:52 CET 2009


Hi list,

I already brought that question up a few month ago - see this archived thread:
http://lists.trolltech.com/qt-interest/2008-11/msg00955.html

But as I didn't find a solution yet, I'm asking here again in the hope someone 
has an idea / hint for me :)!

Summary / Description:
----------------------

To provide something I call "pretty compilation output" I use the following 
setup in the *.pro files of my Qt projects:

...
!isEmpty(QMAKE_CXX):QMAKE_CXX = @echo [C++ ] $< && $$QMAKE_CXX
!isEmpty(QMAKE_CC):QMAKE_CC = @echo [CC\ \ ] $< && $$QMAKE_CC
!isEmpty(QMAKE_LINK):QMAKE_LINK = @echo [LINK] $@ && $$QMAKE_LINK
!isEmpty(QMAKE_UIC):QMAKE_UIC = @echo [UIC ] $< && $$QMAKE_UIC
...

This works nicely for all of the above, but unfortunately not for QMAKE_RCC.

Results on trying to do the same for QMAKE_RCC:
-----------------------------------------------

If I use something like this for QMAKE_RCC in the .pro file

QMAKE_RCC = @echo [RCC ] $< && $$QMAKE_RCC

qmake produces the following command in the Makefile:

@echo\ [RCC\ ]\ $<\ &&\ /usr/bin/rcc -name myprj myprj.qrc -o qrc_myprj.cpp

which in incorrect and results in an error upon calling make:

/bin/sh: echo [RCC ] myprj.qrc : command not found

If I manually edit this line in the Makefile to look like (removing the 
backslashes):

@echo [RCC ] $< && /usr/bin/rcc -name myprj myprj.qrc -o qrc_myprj.cpp

it works as it should!

So either I'm doing something completely wrong here... or it is a qmake bug 
(which I'm meanwhile mostly sure of). Could anyone please check / confirm 
this and/or provide any insights on it?!

Thanks in advance for any feedback!

Have fun, René
-- 
René Reucher
rene.reucher at batcom-it.net
http://www.batcom-it.net/

Razors pain you;
Rivers are damp;
Acids stain you;
And drugs cause cramp.
Guns aren't lawful;
Nooses give;
Gas smells awful;
You might as well live.
		-- Dorothy Parker




More information about the Qt-interest-old mailing list