author | Eckhart Koeppen <eckhart.koppen@nokia.com> |
Thu, 08 Apr 2010 14:19:33 +0300 | |
branch | RCL_3 |
changeset 7 | 3f74d0d4af4c |
parent 3 | 41300fa6a67c |
permissions | -rw-r--r-- |
0 | 1 |
TEMPLATE = subdirs |
2 |
||
3 |
TOOLS_SUBDIRS = src_tools_bootstrap src_tools_moc src_tools_rcc src_tools_uic |
|
4 |
!cross_compile { |
|
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
5 |
contains(QT_CONFIG, qt3support): SRC_SUBDIRS += src_tools_uic3 |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
6 |
win32:!wince*: SRC_SUBDIRS += src_tools_idc |
0 | 7 |
} |
8 |
||
9 |
# Set subdir and respective target name |
|
10 |
src_tools_bootstrap.subdir = $$QT_SOURCE_TREE/src/tools/bootstrap |
|
11 |
src_tools_bootstrap.target = sub-tools-bootstrap |
|
12 |
src_tools_moc.subdir = $$QT_SOURCE_TREE/src/tools/moc |
|
13 |
src_tools_moc.target = sub-moc |
|
14 |
src_tools_rcc.subdir = $$QT_SOURCE_TREE/src/tools/rcc |
|
15 |
src_tools_rcc.target = sub-rcc |
|
16 |
src_tools_uic.subdir = $$QT_SOURCE_TREE/src/tools/uic |
|
17 |
src_tools_uic.target = sub-uic |
|
18 |
src_tools_uic3.subdir = $$QT_SOURCE_TREE/src/tools/uic3 |
|
19 |
src_tools_uic3.target = sub-uic3 |
|
20 |
src_tools_idc.subdir = $$QT_SOURCE_TREE/src/tools/idc |
|
21 |
src_tools_idc.target = sub-idc |
|
22 |
||
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
23 |
!wince*:!symbian:!ordered { |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
24 |
# Set dependencies for each subdir |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
25 |
src_tools_moc.depends = src_tools_bootstrap |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
26 |
src_tools_rcc.depends = src_tools_bootstrap |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
27 |
src_tools_uic.depends = src_tools_bootstrap |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
28 |
} |
0 | 29 |
|
30 |
# Special handling, depending on type of project, if it used debug/release or only has one configuration |
|
31 |
EXTRA_DEBUG_TARGETS = |
|
32 |
EXTRA_RELEASE_TARGETS = |
|
33 |
!symbian { |
|
34 |
for(subname, TOOLS_SUBDIRS) { |
|
35 |
subdir = $$subname |
|
36 |
!isEmpty($${subname}.subdir):subdir = $$eval($${subname}.subdir) |
|
37 |
subpro = $$subdir/$${basename(subdir)}.pro |
|
38 |
!exists($$subpro):next() |
|
39 |
subtarget = $$replace(subdir, [^A-Za-z0-9], _) |
|
40 |
reg_src = $$replace(QT_SOURCE_TREE, \\\\, \\\\) |
|
41 |
subdir = $$replace(subdir, $$reg_src, $$QT_BUILD_TREE) |
|
42 |
subdir = $$replace(subdir, /, $$QMAKE_DIR_SEP) |
|
43 |
subdir = $$replace(subdir, \\\\, $$QMAKE_DIR_SEP) |
|
44 |
SUB_TEMPLATE = $$list($$fromfile($$subpro, TEMPLATE)) |
|
45 |
!isEqual(subname, src_tools_bootstrap):if(isEqual($$SUB_TEMPLATE, lib) | isEqual($$SUB_TEMPLATE, subdirs) | isEqual(subname, src_tools_idc) | isEqual(subname, src_tools_uic3)):!separate_debug_info { |
|
46 |
#debug |
|
47 |
eval(debug-$${subtarget}.depends = $${subdir}\$${QMAKE_DIR_SEP}$(MAKEFILE) $$EXTRA_DEBUG_TARGETS) |
|
48 |
eval(debug-$${subtarget}.commands = (cd $$subdir && $(MAKE) -f $(MAKEFILE) debug)) |
|
49 |
EXTRA_DEBUG_TARGETS += debug-$${subtarget} |
|
50 |
QMAKE_EXTRA_TARGETS += debug-$${subtarget} |
|
51 |
#release |
|
52 |
eval(release-$${subtarget}.depends = $${subdir}\$${QMAKE_DIR_SEP}$(MAKEFILE) $$EXTRA_RELEASE_TARGETS) |
|
53 |
eval(release-$${subtarget}.commands = (cd $$subdir && $(MAKE) -f $(MAKEFILE) release)) |
|
54 |
EXTRA_RELEASE_TARGETS += release-$${subtarget} |
|
55 |
QMAKE_EXTRA_TARGETS += release-$${subtarget} |
|
56 |
} else { #do not have a real debug target/release |
|
57 |
#debug |
|
58 |
eval(debug-$${subtarget}.depends = $${subdir}\$${QMAKE_DIR_SEP}$(MAKEFILE) $$EXTRA_DEBUG_TARGETS) |
|
59 |
eval(debug-$${subtarget}.commands = (cd $$subdir && $(MAKE) -f $(MAKEFILE) first)) |
|
60 |
EXTRA_DEBUG_TARGETS += debug-$${subtarget} |
|
61 |
QMAKE_EXTRA_TARGETS += debug-$${subtarget} |
|
62 |
#release |
|
63 |
eval(release-$${subtarget}.depends = $${subdir}\$${QMAKE_DIR_SEP}$(MAKEFILE) $$EXTRA_RELEASE_TARGETS) |
|
64 |
eval(release-$${subtarget}.commands = (cd $$subdir && $(MAKE) -f $(MAKEFILE) first)) |
|
65 |
EXTRA_RELEASE_TARGETS += release-$${subtarget} |
|
66 |
QMAKE_EXTRA_TARGETS += release-$${subtarget} |
|
67 |
} |
|
68 |
} |
|
69 |
} |
|
70 |
||
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
71 |
SUBDIRS = $$TOOLS_SUBDIRS $$SUBDIRS |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
72 |
isEqual(TARGET,tools): SUBDIRS += $$SRC_SUBDIRS |