diff options
author | Oswald Buddenhagen <oswald.buddenhagen@digia.com> | 2013-06-13 18:12:07 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-06-15 21:39:34 +0200 |
commit | 17c38b25f432767e533d1612df3bcee0d15a4de8 (patch) | |
tree | 1e59cfd10ecd67c5be85bccdf79f7173915e8066 /mkspecs/features/qt_functions.prf | |
parent | 9d48f14a3cdaee24fb41d192c648b1263edeb70d (diff) |
fix rcc & uic .depend_commands
unlike the .command, the .depend_command is not executed by make via its
chosen shell, but qmake itself via the system's native shell.
consequently, it needs different path separators and no make-escaping.
Task-number: QTBUG-31289
Change-Id: I480f815753632db6e8d4725f463f8a1fc59680a6
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Diffstat (limited to 'mkspecs/features/qt_functions.prf')
-rw-r--r-- | mkspecs/features/qt_functions.prf | 33 |
1 files changed, 26 insertions, 7 deletions
diff --git a/mkspecs/features/qt_functions.prf b/mkspecs/features/qt_functions.prf index ca8391b65a..63ae62c42e 100644 --- a/mkspecs/features/qt_functions.prf +++ b/mkspecs/features/qt_functions.prf @@ -189,7 +189,7 @@ defineTest(qtAddRpathLink) { export(QMAKE_RPATHLINKDIR) } -# variable, default +# variable, default, [suffix for variable for system() use] defineTest(qtPrepareTool) { $$1 = $$eval(QT_TOOL.$${2}.binary) isEmpty($$1) { @@ -205,16 +205,25 @@ defineTest(qtPrepareTool) { } } } + !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" @@ -224,7 +233,7 @@ defineTest(qtAddToolEnv) { else: infix = val = "(set $$name=$$join(value, ;)$$infix) &" } - !contains(TEMPLATE, vc.*) { + isEmpty(3): !contains(TEMPLATE, vc.*) { contains(MAKEFILE_GENERATOR, MS.*): val ~= s,%,%%,g val ~= s,\\\$,\$\$,g } @@ -234,12 +243,17 @@ defineTest(qtAddToolEnv) { export($$1) } +# target variable, dependency var name, [non-empty: prepare for system(), not make] defineTest(qtAddTargetEnv) { 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) { @@ -258,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) { |