[Qt-interest] setting makefile variable from .pro file

andrew.m.goth at l-3com.com andrew.m.goth at l-3com.com
Thu Feb 5 02:04:51 CET 2009


Pete Black wrote:
> I'm just calling qmake on the .pro files I have and there isn't that 
> much fancy stuff in.

Can you post an example?  We don't need to see the source file names.

> Looks like I might have to create a custom make target that sets 
> INSTALL_ROOT or script it.

I don't think it's possible for a target to set a variable.  Well, one
way you could do it (if you were the one writing the makefile, which you
aren't!) is with conditional expressions:

ifneq ($(filter magic_target,$(MAKECMDGOALS)),)
MAGIC_VARIABLE := 42
endif
magic_target:

This will set MAGIC_VARIABLE to 42 if magic_target is one of the targets
specified on the command line.

-- 
Andy Goth
<amgoth at link.com>




More information about the Qt-interest-old mailing list