diff options
author | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2013-06-25 13:52:19 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-06-25 14:31:00 +0200 |
commit | 851fae6dbe08785ebb8be3732c40fbe1a5a280a0 (patch) | |
tree | f3422ef7eadff27175ba11d6b9f2ae784280ce80 /mkspecs/features/qt_functions.prf | |
parent | 6f0d258424a6c95a30ad63ae563f38e38ef47d7c (diff) | |
parent | 533820320c30fca6028415321d1a3b937a261088 (diff) |
Merge "Merge remote-tracking branch 'origin/release' into stable" into refs/staging/stable
Diffstat (limited to 'mkspecs/features/qt_functions.prf')
-rw-r--r-- | mkspecs/features/qt_functions.prf | 45 |
1 files changed, 33 insertions, 12 deletions
diff --git a/mkspecs/features/qt_functions.prf b/mkspecs/features/qt_functions.prf index b043f4dae7..2f5deb8e43 100644 --- a/mkspecs/features/qt_functions.prf +++ b/mkspecs/features/qt_functions.prf @@ -187,9 +187,9 @@ defineTest(qtAddRpathLink) { export(QMAKE_RPATHLINKDIR) } -# variable, default +# variable, default, [suffix for variable for system() use] defineTest(qtPrepareTool) { - $$1 = $$eval(QT_TOOL.$${2}.command) + $$1 = $$eval(QT_TOOL.$${2}.binary) isEmpty($$1) { $$1 = $$[QT_HOST_BINS]/$$2 exists($$eval($$1).pl) { @@ -202,17 +202,26 @@ defineTest(qtPrepareTool) { $$1 = $$BUNDLENAME } } - $$1 = $$shell_path($$eval($$1)) } - export($$1) + !isEmpty(3) { + $$1$$3 = $$system_path($$eval($$1)) + qtAddTargetEnv($$1$$3, QT_TOOL.$${2}.depends, system) + } + $$1 = $$shell_path($$eval($$1)) + qtAddTargetEnv($$1, QT_TOOL.$${2}.depends, ) } +# target variable, list of env var names, [non-empty: prepare for system(), not make] defineTest(qtAddToolEnv) { + isEmpty(3): \ + ds = $$QMAKE_DIR_SEP + else: \ + ds = $$DIR_SEPARATOR for(env, 2) { value = $$eval($${env}.value) !isEmpty(value) { name = $$eval($${env}.name) - equals(QMAKE_DIR_SEP, /) { + equals(ds, /) { contains($${env}.CONFIG, prepend): infix = \${$$name:+:\$$$name} else: infix = val = "$$name=$$join(value, :)$$infix" @@ -222,20 +231,27 @@ defineTest(qtAddToolEnv) { else: infix = val = "(set $$name=$$join(value, ;)$$infix) &" } - contains(MAKEFILE_GENERATOR, MS.*): val ~= s,%,%%,g - else: val ~= s,\\\$,\$\$,g + isEmpty(3): !contains(TEMPLATE, vc.*) { + contains(MAKEFILE_GENERATOR, MS.*): val ~= s,%,%%,g + val ~= s,\\\$,\$\$,g + } $$1 = "$$val $$eval($$1)" } } export($$1) } +# target variable, dependency var name, [non-empty: prepare for system(), not make] defineTest(qtAddTargetEnv) { - deps = $$replace(QT, -private$, ) + deps = $$replace($$2, -private$, ) deps = $$resolve_depends(deps, "QT.", ".depends" ".private_depends" ".run_depends") !isEmpty(deps) { - for(dep, deps): \ - deppath += $$shell_path($$eval(QT.$${dep}.libs)) + for(dep, deps) { + isEmpty(3): \ + deppath += $$shell_path($$eval(QT.$${dep}.libs)) + else: \ + deppath += $$system_path($$eval(QT.$${dep}.libs)) + } equals(QMAKE_HOST.os, Windows) { deppath.name = PATH } else:contains(QMAKE_HOST.os, Linux|FreeBSD|OpenBSD|NetBSD|DragonFly|SunOS|HP-UX|QNX|GNU) { @@ -256,13 +272,18 @@ defineTest(qtAddTargetEnv) { pluginpath.value = for(qmod, QMAKEMODULES) { qmod = $$section(qmod, /, 0, -3)/plugins - exists($$qmod): pluginpath.value += $$shell_path($$qmod) + exists($$qmod) { + isEmpty(3): \ + pluginpath.value += $$shell_path($$qmod) + else: \ + pluginpath.value += $$system_path($$qmod) + } } pluginpath.name = QT_PLUGIN_PATH QT_TOOL_ENV += deppath pluginpath } - qtAddToolEnv($$1, $$QT_TOOL_ENV) + qtAddToolEnv($$1, $$QT_TOOL_ENV, $$3) } defineReplace(pkgConfigExecutable) { |