summaryrefslogtreecommitdiffstats
path: root/mkspecs/features
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@nokia.com>2012-07-25 10:51:44 +0200
committerQt by Nokia <qt-info@nokia.com>2012-07-28 00:09:45 +0200
commite07372ff5077e60136451733dab59e46f3e9132d (patch)
tree344620f92442717438206d9f535f100bf9d873f7 /mkspecs/features
parentd9048bef20103ac0c1af3365c8a47f1569a8e529 (diff)
fix host vs. makefile directory separator mess
the system path separator and shell are bound to the host system (system() will use cmd even on mingw with sh.exe in path). the makefiles otoh may depend on what the qmakespec defines. consequently, add $$system_path() and $$system_quote() (for use with system() & $$system()). $$native_path() is renamed to $$shell_path() and should be used with $$shell_quote() to produce command lines in makefiles. $$QMAKE_DIR_SEP needs to be applied to Option::dir_sep right after parsing the spec, so it is available to $$shell_{path,quote}(). Change-Id: If3db4849e7f96068cf03a32348a24f3a72d6292c Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Diffstat (limited to 'mkspecs/features')
-rw-r--r--mkspecs/features/configure.prf4
-rw-r--r--mkspecs/features/default_post.prf4
-rw-r--r--mkspecs/features/incredibuild_xge.prf2
-rw-r--r--mkspecs/features/qt_functions.prf4
-rw-r--r--mkspecs/features/testcocoon.prf2
-rw-r--r--mkspecs/features/win32/embed_manifest_dll.prf2
-rw-r--r--mkspecs/features/win32/embed_manifest_exe.prf2
7 files changed, 10 insertions, 10 deletions
diff --git a/mkspecs/features/configure.prf b/mkspecs/features/configure.prf
index 651f0ad256..ff52c6b373 100644
--- a/mkspecs/features/configure.prf
+++ b/mkspecs/features/configure.prf
@@ -44,7 +44,7 @@ defineTest(qtCompileTest) {
test_dir = $$QMAKE_CONFIG_TESTS_DIR/$$1
test_out_dir = $$shadowed($$test_dir)
- test_cmd_base = "cd $$shell_quote($$native_path($$test_out_dir)) &&"
+ test_cmd_base = "cd $$system_quote($$system_path($$test_out_dir)) &&"
# Disable qmake features which are typically counterproductive for tests
qmake_configs = "\"CONFIG -= qt debug_and_release app_bundle lib_bundle\""
@@ -54,7 +54,7 @@ defineTest(qtCompileTest) {
mkpath($$test_out_dir)|error("Aborting.")
- qtRunLoggedCommand("$$test_cmd_base $$shell_quote($$native_path($$QMAKE_QMAKE)) $$qmake_configs $$shell_quote($$test_dir)") {
+ qtRunLoggedCommand("$$test_cmd_base $$system_quote($$system_path($$QMAKE_QMAKE)) $$qmake_configs $$shell_quote($$test_dir)") {
qtRunLoggedCommand("$$test_cmd_base $$QMAKE_MAKE") {
log("yes$$escape_expand(\\n)")
msg = "test $$1 succeeded"
diff --git a/mkspecs/features/default_post.prf b/mkspecs/features/default_post.prf
index 63daff64bc..d0a2d61607 100644
--- a/mkspecs/features/default_post.prf
+++ b/mkspecs/features/default_post.prf
@@ -31,8 +31,8 @@ breakpad {
load(resolve_target)
win32: QMAKE_CLEAN += $$replace(QMAKE_RESOLVED_TARGET, ...$, pdb) # for the debug case it is hardcoded in qmake
- DEBUGFILENAME = $$shell_quote($$native_path($$QMAKE_RESOLVED_TARGET))
- PROJECTPATH = $$shell_quote($$native_path($$OUT_PWD))
+ DEBUGFILENAME = $$shell_quote($$shell_path($$QMAKE_RESOLVED_TARGET))
+ PROJECTPATH = $$shell_quote($$shell_path($$OUT_PWD))
!isEmpty(QMAKE_POST_LINK):QMAKE_POST_LINK = $$QMAKE_POST_LINK$$escape_expand(\\n\\t)
QMAKE_POST_LINK = $$QMAKE_POST_LINK$$quote($${QT_BREAKPAD_ROOT_PATH}$${QMAKE_DIR_SEP}qtbreakpadsymbols $$DEBUGFILENAME $$PROJECTPATH)
diff --git a/mkspecs/features/incredibuild_xge.prf b/mkspecs/features/incredibuild_xge.prf
index 28a58cafce..028f39d7b6 100644
--- a/mkspecs/features/incredibuild_xge.prf
+++ b/mkspecs/features/incredibuild_xge.prf
@@ -6,6 +6,6 @@ contains(TEMPLATE, "vc.*") {
win32-msvc2*|wince*msvc*: EOC = $$escape_expand(\\r\\h)
for(xge, INCREDIBUILD_XGE) {
- $${xge}.commands = Rem IncrediBuild_AllowRemote $$EOC Rem IncrediBuild_OutputFile $$native_path($${xge}.output) $$EOC $$eval($${xge}.commands)
+ $${xge}.commands = Rem IncrediBuild_AllowRemote $$EOC Rem IncrediBuild_OutputFile $$shell_path($${xge}.output) $$EOC $$eval($${xge}.commands)
}
}
diff --git a/mkspecs/features/qt_functions.prf b/mkspecs/features/qt_functions.prf
index 649bea0f80..b6a3b0ada4 100644
--- a/mkspecs/features/qt_functions.prf
+++ b/mkspecs/features/qt_functions.prf
@@ -137,12 +137,12 @@ defineTest(qtPrepareTool) {
}
}
}
- $$1 = $$native_path($$eval($$1))
+ $$1 = $$shell_path($$eval($$1))
deps = $$resolve_depends(QT_TOOL.$${2}.depends, "QT.")
!isEmpty(deps) {
for(dep, deps): \
- deppath += $$native_path($$eval(QT.$${dep}.libs))
+ deppath += $$shell_path($$eval(QT.$${dep}.libs))
deppath = $$unique(deppath)
equals(QMAKE_DIR_SEP, /) {
equals(QMAKE_HOST.os, Windows): \
diff --git a/mkspecs/features/testcocoon.prf b/mkspecs/features/testcocoon.prf
index bf7e3dd463..efa33ecb08 100644
--- a/mkspecs/features/testcocoon.prf
+++ b/mkspecs/features/testcocoon.prf
@@ -25,7 +25,7 @@ TESTCOCOON_COVERAGE_OPTIONS = \
# is built directly in target.path and there is no need to move the csmes.
!isEmpty(DESTDIR):contains(TEMPLATE, lib) {
!isEmpty(QMAKE_POST_LINK):QMAKE_POST_LINK = $$escape_expand(\\n\\t)$$QMAKE_POST_LINK
- QMAKE_POST_LINK = -$(MOVE) $${TARGET_BASENAME}.csmes $$native_path($${QMAKE_RESOLVED_TARGET}.csmes)$$QMAKE_POST_LINK
+ QMAKE_POST_LINK = -$(MOVE) $${TARGET_BASENAME}.csmes $$shell_path($${QMAKE_RESOLVED_TARGET}.csmes)$$QMAKE_POST_LINK
}
QMAKE_CLEAN += *.csexe *.csmes
diff --git a/mkspecs/features/win32/embed_manifest_dll.prf b/mkspecs/features/win32/embed_manifest_dll.prf
index 783dc6708d..e50783d20a 100644
--- a/mkspecs/features/win32/embed_manifest_dll.prf
+++ b/mkspecs/features/win32/embed_manifest_dll.prf
@@ -7,6 +7,6 @@
NOPATH_TARGET ~= s,^(.*/)+,, # Remove all paths
QMAKE_LFLAGS += /MANIFEST $$quote(/MANIFESTFILE:\"$${MANIFEST_DIR}\\$${NOPATH_TARGET}.intermediate.manifest\")
!isEmpty(QMAKE_POST_LINK):QMAKE_POST_LINK = $$escape_expand(\\n\\t)$$QMAKE_POST_LINK
- QMAKE_POST_LINK = $$quote(mt.exe -nologo -manifest $$shell_quote($$native_path($$MANIFEST_DIR/$${NOPATH_TARGET}.intermediate.manifest)) -outputresource:$(DESTDIR_TARGET);2)$$QMAKE_POST_LINK
+ QMAKE_POST_LINK = $$quote(mt.exe -nologo -manifest $$shell_quote($$shell_path($$MANIFEST_DIR/$${NOPATH_TARGET}.intermediate.manifest)) -outputresource:$(DESTDIR_TARGET);2)$$QMAKE_POST_LINK
QMAKE_CLEAN += $$MANIFEST_DIR/$${NOPATH_TARGET}.intermediate.manifest
}
diff --git a/mkspecs/features/win32/embed_manifest_exe.prf b/mkspecs/features/win32/embed_manifest_exe.prf
index c496a53f91..526fc009d9 100644
--- a/mkspecs/features/win32/embed_manifest_exe.prf
+++ b/mkspecs/features/win32/embed_manifest_exe.prf
@@ -7,6 +7,6 @@ if(win32-msvc2005*|win32-msvc2008*|win32-msvc2010*):equals(TEMPLATE, "app") {
NOPATH_TARGET ~= s,^(.*/)+,, # Remove all paths
QMAKE_LFLAGS += /MANIFEST $$quote(/MANIFESTFILE:\"$${MANIFEST_DIR}\\$${NOPATH_TARGET}.intermediate.manifest\")
!isEmpty(QMAKE_POST_LINK):QMAKE_POST_LINK = $$escape_expand(\\n\\t)$$QMAKE_POST_LINK
- QMAKE_POST_LINK = $$quote(mt.exe -nologo -manifest $$shell_quote($$native_path($$MANIFEST_DIR/$${NOPATH_TARGET}.intermediate.manifest)) -outputresource:$(DESTDIR_TARGET);1)$$QMAKE_POST_LINK
+ QMAKE_POST_LINK = $$quote(mt.exe -nologo -manifest $$shell_quote($$shell_path($$MANIFEST_DIR/$${NOPATH_TARGET}.intermediate.manifest)) -outputresource:$(DESTDIR_TARGET);1)$$QMAKE_POST_LINK
QMAKE_CLEAN += $$MANIFEST_DIR/$${NOPATH_TARGET}.intermediate.manifest
}