0
|
1 |
TEMPLATE = subdirs
|
|
2 |
|
|
3 |
TOOLS_SUBDIRS = src_tools_bootstrap src_tools_moc src_tools_rcc src_tools_uic
|
|
4 |
!cross_compile {
|
|
5 |
contains(QT_CONFIG, qt3support): TOOLS_SUBDIRS += src_tools_uic3
|
|
6 |
win32:!wince*: TOOLS_SUBDIRS += src_tools_idc
|
|
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 |
|
|
23 |
# Set dependencies for each subdir
|
|
24 |
src_tools_moc.depends = src_tools_bootstrap
|
|
25 |
src_tools_rcc.depends = src_tools_bootstrap
|
|
26 |
src_tools_uic.depends = src_tools_bootstrap
|
|
27 |
src_tools_idc.depends = src_corelib # defined in parent pro, in any, if not ignored
|
|
28 |
src_tools_uic3.depends = src_qt3support src_xml # defined in parent pro, in any, if not ignored
|
|
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 |
|
|
71 |
SUBDIRS += $$TOOLS_SUBDIRS
|