summaryrefslogtreecommitdiffstats
path: root/mkspecs
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2016-04-29 16:09:54 +0200
committerLiang Qi <liang.qi@qt.io>2016-04-29 17:55:20 +0200
commitb894a8def5d9107663e4968d2d395f5ef3059125 (patch)
treef894c50c9e5cbdd7ec102291eb94979977ce5b37 /mkspecs
parentd2304a28ca657634253af26ad803c7f292e6f4cc (diff)
parent002112e80516a29efbb6cef721d74c5fc39fc19d (diff)
Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts: mkspecs/features/qml_module.prf mkspecs/features/qt_common.prf src/gui/text/qzip.cpp src/plugins/platforms/cocoa/qnsview.mm src/plugins/platforms/windows/array.h src/testlib/qtestcase.cpp src/widgets/dialogs/qfilesystemmodel.h Change-Id: Ie41c5868415b81f7693c80e045497035504bb210
Diffstat (limited to 'mkspecs')
-rw-r--r--mkspecs/features/file_copies.prf41
-rw-r--r--mkspecs/features/qml_module.prf20
-rw-r--r--mkspecs/features/qt_common.prf4
-rw-r--r--mkspecs/features/spec_pre.prf2
4 files changed, 48 insertions, 19 deletions
diff --git a/mkspecs/features/file_copies.prf b/mkspecs/features/file_copies.prf
new file mode 100644
index 0000000000..f679129e03
--- /dev/null
+++ b/mkspecs/features/file_copies.prf
@@ -0,0 +1,41 @@
+isEmpty(COPIES): return()
+contains(TEMPLATE, .*subdirs): error("COPIES does not work with TEMPLATE=subdirs")
+
+build_pass:build_all: \
+ debug_and_release:debug {
+ # Avoid that multiple build passes race with each other.
+ # This will fail to copy anything if the user explicitly invokes
+ # only the non-primary build. This is unfixable, as at qmake time
+ # we cannot possibly know how make will be invoked, yet we must
+ # predict it here.
+ return()
+}
+
+defineReplace(qtStripProPwd) {
+ return($$relative_path($$1, $$_PRO_FILE_PWD_))
+}
+
+for (cp, COPIES) {
+ isEmpty($${cp}.files): next()
+ pfx = copy_$${cp}
+ for (f, $${cp}.files): \
+ $${pfx}.files += $$absolute_path($$f, $$_PRO_FILE_PWD_)
+ path = $$eval($${cp}.path)
+ isEmpty(path): error("COPY $cp defines no .path")
+ base = $$eval($${cp}.base)
+ isEmpty(base) {
+ $${pfx}.output = $$path/${QMAKE_FILE_BASE}${QMAKE_FILE_EXT}
+ } else: isEqual(base, $$_PRO_FILE_PWD_) {
+ $${pfx}.output = $$path/${QMAKE_FUNC_FILE_IN_qtStripProPwd}
+ } else {
+ eval(defineReplace(qtStripSrcDir_$$cp) { \
+ return(\$\$relative_path(\$\$1, $$val_escape(base))) \
+ })
+ $${pfx}.output = $$path/${QMAKE_FUNC_FILE_IN_qtStripSrcDir_$$cp}
+ }
+ $${pfx}.input = $${pfx}.files
+ $${pfx}.commands = $$QMAKE_COPY ${QMAKE_FILE_IN} ${QMAKE_FILE_OUT}
+ $${pfx}.name = COPY ${QMAKE_FILE_IN}
+ $${pfx}.CONFIG = no_link no_clean target_predeps
+ QMAKE_EXTRA_COMPILERS += $${pfx}
+}
diff --git a/mkspecs/features/qml_module.prf b/mkspecs/features/qml_module.prf
index 2115b39c04..6b3ad81953 100644
--- a/mkspecs/features/qml_module.prf
+++ b/mkspecs/features/qml_module.prf
@@ -28,24 +28,6 @@ else: \
!qml1_target:static: CONFIG += builtin_resources
-!force_independent:if(!debug_and_release|!build_all|CONFIG(release, debug|release)) {
- # These bizarre rules copy the files to the qtbase build directory
-
- defineReplace(qmlModStripSrcDir) {
- return($$relative_path($$1, $$_PRO_FILE_PWD_))
- }
-
- !builtin_resources: qmlfiles2build.input = fq_qml_files
- else: qmlfiles2build.input = qmldir_file
- qmlfiles2build.output = $$instbase/$$TARGETPATH/${QMAKE_FUNC_FILE_IN_qmlModStripSrcDir}
- !contains(TEMPLATE, vc.*): qmlfiles2build.variable_out = PRE_TARGETDEPS
- qmlfiles2build.commands = $$QMAKE_COPY ${QMAKE_FILE_IN} ${QMAKE_FILE_OUT}
- qmlfiles2build.name = COPY ${QMAKE_FILE_IN}
- qmlfiles2build.CONFIG = no_link no_clean
-
- QMAKE_EXTRA_COMPILERS += qmlfiles2build
-}
-
builtin_resources {
URITARGET = $$replace(URI, "\\.", "_")
# Ensure the qml files are included in the resources
@@ -61,3 +43,5 @@ qmldir.base = $$_PRO_FILE_PWD_
else: qmldir.files = $$qmldir_file
qmldir.path = $$instbase/$$TARGETPATH
INSTALLS += qmldir
+
+!prefix_build: COPIES += qmldir
diff --git a/mkspecs/features/qt_common.prf b/mkspecs/features/qt_common.prf
index 39e6163967..bc661f4dd7 100644
--- a/mkspecs/features/qt_common.prf
+++ b/mkspecs/features/qt_common.prf
@@ -44,6 +44,10 @@ contains(TEMPLATE, .*lib) {
QMAKE_PRL_INSTALL_REPLACE += lib_replace
}
+# The remainder of this file must not apply to bootstrapped tools,
+# as the host compiler's version and capabilities are not checked.
+host_build:force_bootstrap: return()
+
# Extra warnings for Qt non-example code, to ensure cleanliness of the sources.
# The block below may turn these warnings into errors for some Qt targets.
# -Wdate-time: warn if we use __DATE__ or __TIME__ (we want to be able to reproduce the exact same binary)
diff --git a/mkspecs/features/spec_pre.prf b/mkspecs/features/spec_pre.prf
index ff310d9793..090f348ebf 100644
--- a/mkspecs/features/spec_pre.prf
+++ b/mkspecs/features/spec_pre.prf
@@ -51,5 +51,5 @@ equals(QMAKE_HOST.os, Windows) {
QMAKE_SH = sh
}
-CONFIG = qt warn_on release link_prl
+CONFIG = file_copies qt warn_on release link_prl
QT = core gui