ChrisW67
7th September 2009, 09:08
Hi All,
I wanted to roll building my Assistant-based help into the general qmake build process so I thought I'd just shoehorn it into the pro file. I looked at the usually very clear docs and found them somewhat lacking. Nothing I did seem to generate an extra target. This is the session where I created a basic empty project and pasted the example from the docs:
chrisw@newton ~/workspace/zzbug $ cat test.pro
TARGET = test
TEMPLATE = app
CONFIG += qt warn_on
SOURCES += main.cpp
mytarget.target = .buildfile
mytarget.commands = touch $$mytarget.target
mytarget.depends = mytarget2
mytarget2.commands = @echo Building $$mytarget.target
QMAKE_EXTRA_TARGETS += mytarget mytarget2
chrisw@newton ~/workspace/zzbug $ qmake test.pro
chrisw@newton ~/workspace/zzbug $ make mytarget2
Building .buildfile
chrisw@newton ~/workspace/zzbug $ make mytarget
make: *** No rule to make target `mytarget'. Stop.
chrisw@newton ~/workspace/zzbug $
Nothing I do generates a target "mytarget" in the Makefile although "mytarget2" does get inserted. What obvious step am I missing?
The example is on Linux/Qt 4.5.2 but I get the same (non-) result on Windows(2009.3 SDK).
Chris
I wanted to roll building my Assistant-based help into the general qmake build process so I thought I'd just shoehorn it into the pro file. I looked at the usually very clear docs and found them somewhat lacking. Nothing I did seem to generate an extra target. This is the session where I created a basic empty project and pasted the example from the docs:
chrisw@newton ~/workspace/zzbug $ cat test.pro
TARGET = test
TEMPLATE = app
CONFIG += qt warn_on
SOURCES += main.cpp
mytarget.target = .buildfile
mytarget.commands = touch $$mytarget.target
mytarget.depends = mytarget2
mytarget2.commands = @echo Building $$mytarget.target
QMAKE_EXTRA_TARGETS += mytarget mytarget2
chrisw@newton ~/workspace/zzbug $ qmake test.pro
chrisw@newton ~/workspace/zzbug $ make mytarget2
Building .buildfile
chrisw@newton ~/workspace/zzbug $ make mytarget
make: *** No rule to make target `mytarget'. Stop.
chrisw@newton ~/workspace/zzbug $
Nothing I do generates a target "mytarget" in the Makefile although "mytarget2" does get inserted. What obvious step am I missing?
The example is on Linux/Qt 4.5.2 but I get the same (non-) result on Windows(2009.3 SDK).
Chris