source: tests/common.pri@ 328

Last change on this file since 328 was 328, checked in by Dmitry A. Kuminov, 16 years ago

tests: Support RUN_SHELL qmake variable for overriding the shell for debug-run and release-run targets (defaults to $(RUN_SHELL)).

File size: 1.2 KB
RevLine 
[205]1isEmpty(DEPTH):DEPTH = .
2
[209]3os2:PLATFORM = os2
4else:win32:PLATFORM = win
5else:x11:PLATFORM = x11
[303]6else:PLATFORM = unknown
[209]7
8# in debug_and_release, we need a -debug or -release suffix to get separate
9# output paths (it will be replaced with the correct one at runtime)
10debug_and_release:OUTPATH_SUFFIX = -debug
11else:OUTPATH_SUFFIX =
12
13OBJECTS_DIR = $$DEPTH/obj/$${PLATFORM}$${OUTPATH_SUFFIX}
[205]14MOC_DIR = $$OBJECTS_DIR
15DESTDIR = $$OBJECTS_DIR
16
[209]17# target.path isn't there by default
[205]18QMAKE_DIR_REPLACE = OBJECTS_DIR MOC_DIR RCC_DIR target.path
19
[209]20target.path = $$DEPTH/bin/$${PLATFORM}$${OUTPATH_SUFFIX}
[205]21INSTALLS += target
[303]22
23!build_pass {
24 debug-run.target = debug-run
25 debug-run.commands = $(MAKE) -f $(MAKEFILE).Debug run
26 release-run.target = release-run
27 release-run.commands = $(MAKE) -f $(MAKEFILE).Release run
28 QMAKE_EXTRA_TARGETS += debug-run release-run
29} else {
[328]30 isEmpty(RUN_SHELL):RUN_SHELL = $(RUN_SHELL)
31 isEmpty(RUN_ARGS):RUN_ARGS = $(RUN_ARGS)
[303]32 run.target = run
[328]33 run.commands = $$RUN_SHELL $(DESTDIR_TARGET) $$RUN_ARGS
[303]34 run.depends = $(DESTDIR_TARGET)
35 QMAKE_EXTRA_TARGETS += run
36}
37
38win32 {
39 CONFIG(release, debug|release):CONFIG(qt):contains(QT, gui) {
40 CONFIG -= console
41 CONFIG *= windows
42 } else {
43 CONFIG -= windows
44 CONFIG *= console
45 }
46}
Note: See TracBrowser for help on using the repository browser.