summaryrefslogtreecommitdiffstats
path: root/src/tools/tools.pro
diff options
context:
space:
mode:
authorMarius Storm-Olsen <marius.storm-olsen@nokia.com>2009-11-04 14:01:49 (GMT)
committerMarius Storm-Olsen <marius.storm-olsen@nokia.com>2009-11-04 14:28:57 (GMT)
commit030b19f36e82cc005d21fab56e26c8b76c811ae7 (patch)
tree26558f5f03ffeb88c8dd50defeef322956c2ba31 /src/tools/tools.pro
parent135710b1fa38f72a934c542d196af9eff066d908 (diff)
downloadQt-030b19f36e82cc005d21fab56e26c8b76c811ae7.zip
Qt-030b19f36e82cc005d21fab56e26c8b76c811ae7.tar.gz
Qt-030b19f36e82cc005d21fab56e26c8b76c811ae7.tar.bz2
Add src/tools/tools.pro, and use when building host tools for xcompiling
Configure.exe would simply initiate a build for each of the tools in order. However, this would break certain distributed build systems, since they would return right away after initiating the make. Thus, sometimes moc et al. would try to link before bootstrap lib was built. Reviewed-by: Jason McDonald
Diffstat (limited to 'src/tools/tools.pro')
-rw-r--r--src/tools/tools.pro71
1 files changed, 71 insertions, 0 deletions
diff --git a/src/tools/tools.pro b/src/tools/tools.pro
new file mode 100644
index 0000000..798bd0b
--- /dev/null
+++ b/src/tools/tools.pro
@@ -0,0 +1,71 @@
+TEMPLATE = subdirs
+
+TOOLS_SUBDIRS = src_tools_bootstrap src_tools_moc src_tools_rcc src_tools_uic
+!cross_compile {
+ contains(QT_CONFIG, qt3support): TOOLS_SUBDIRS += src_tools_uic3
+ win32:!wince*: TOOLS_SUBDIRS += src_tools_idc
+}
+
+# Set subdir and respective target name
+src_tools_bootstrap.subdir = $$QT_SOURCE_TREE/src/tools/bootstrap
+src_tools_bootstrap.target = sub-tools-bootstrap
+src_tools_moc.subdir = $$QT_SOURCE_TREE/src/tools/moc
+src_tools_moc.target = sub-moc
+src_tools_rcc.subdir = $$QT_SOURCE_TREE/src/tools/rcc
+src_tools_rcc.target = sub-rcc
+src_tools_uic.subdir = $$QT_SOURCE_TREE/src/tools/uic
+src_tools_uic.target = sub-uic
+src_tools_uic3.subdir = $$QT_SOURCE_TREE/src/tools/uic3
+src_tools_uic3.target = sub-uic3
+src_tools_idc.subdir = $$QT_SOURCE_TREE/src/tools/idc
+src_tools_idc.target = sub-idc
+
+# Set dependencies for each subdir
+src_tools_moc.depends = src_tools_bootstrap
+src_tools_rcc.depends = src_tools_bootstrap
+src_tools_uic.depends = src_tools_bootstrap
+src_tools_idc.depends = src_corelib # defined in parent pro, in any, if not ignored
+src_tools_uic3.depends = src_qt3support src_xml # defined in parent pro, in any, if not ignored
+
+# Special handling, depending on type of project, if it used debug/release or only has one configuration
+EXTRA_DEBUG_TARGETS =
+EXTRA_RELEASE_TARGETS =
+!symbian {
+ for(subname, TOOLS_SUBDIRS) {
+ subdir = $$subname
+ !isEmpty($${subname}.subdir):subdir = $$eval($${subname}.subdir)
+ subpro = $$subdir/$${basename(subdir)}.pro
+ !exists($$subpro):next()
+ subtarget = $$replace(subdir, [^A-Za-z0-9], _)
+ reg_src = $$replace(QT_SOURCE_TREE, \\\\, \\\\)
+ subdir = $$replace(subdir, $$reg_src, $$QT_BUILD_TREE)
+ subdir = $$replace(subdir, /, $$QMAKE_DIR_SEP)
+ subdir = $$replace(subdir, \\\\, $$QMAKE_DIR_SEP)
+ SUB_TEMPLATE = $$list($$fromfile($$subpro, TEMPLATE))
+ !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 {
+ #debug
+ eval(debug-$${subtarget}.depends = $${subdir}\$${QMAKE_DIR_SEP}$(MAKEFILE) $$EXTRA_DEBUG_TARGETS)
+ eval(debug-$${subtarget}.commands = (cd $$subdir && $(MAKE) -f $(MAKEFILE) debug))
+ EXTRA_DEBUG_TARGETS += debug-$${subtarget}
+ QMAKE_EXTRA_TARGETS += debug-$${subtarget}
+ #release
+ eval(release-$${subtarget}.depends = $${subdir}\$${QMAKE_DIR_SEP}$(MAKEFILE) $$EXTRA_RELEASE_TARGETS)
+ eval(release-$${subtarget}.commands = (cd $$subdir && $(MAKE) -f $(MAKEFILE) release))
+ EXTRA_RELEASE_TARGETS += release-$${subtarget}
+ QMAKE_EXTRA_TARGETS += release-$${subtarget}
+ } else { #do not have a real debug target/release
+ #debug
+ eval(debug-$${subtarget}.depends = $${subdir}\$${QMAKE_DIR_SEP}$(MAKEFILE) $$EXTRA_DEBUG_TARGETS)
+ eval(debug-$${subtarget}.commands = (cd $$subdir && $(MAKE) -f $(MAKEFILE) first))
+ EXTRA_DEBUG_TARGETS += debug-$${subtarget}
+ QMAKE_EXTRA_TARGETS += debug-$${subtarget}
+ #release
+ eval(release-$${subtarget}.depends = $${subdir}\$${QMAKE_DIR_SEP}$(MAKEFILE) $$EXTRA_RELEASE_TARGETS)
+ eval(release-$${subtarget}.commands = (cd $$subdir && $(MAKE) -f $(MAKEFILE) first))
+ EXTRA_RELEASE_TARGETS += release-$${subtarget}
+ QMAKE_EXTRA_TARGETS += release-$${subtarget}
+ }
+ }
+}
+
+SUBDIRS += $$TOOLS_SUBDIRS