summaryrefslogtreecommitdiffstats
path: root/qmake
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>2015-04-22 23:44:20 +0200
committerOswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>2015-04-23 09:50:54 +0000
commitf228404c24975083ada62c2b0bfce2d4527d5a27 (patch)
tree8e499dcfc7ff6070a76c173cf0d076af1bae6e59 /qmake
parent5fb0b71a12e5eade128125f283c9457f25793742 (diff)
untangle handling extra compiler .clean member, take 2
fixes clean targets of (most) extra compilers being empty. amends commit 0812b5b3188. Task-number: QTBUG-45132 Change-Id: I069bca124587df261597a4f8183a4695cd834e29 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Diffstat (limited to 'qmake')
-rw-r--r--qmake/generators/makefile.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp
index 70e7545526..2904f01c5f 100644
--- a/qmake/generators/makefile.cpp
+++ b/qmake/generators/makefile.cpp
@@ -1850,7 +1850,9 @@ MakefileGenerator::writeExtraCompilerTargets(QTextStream &t)
t << endl;
if (config.indexOf("no_clean") == -1) {
- const ProStringList &raw_clean = project->values(ProKey(*it + ".clean"));
+ QStringList raw_clean = project->values(ProKey(*it + ".clean")).toQStringList();
+ if (raw_clean.isEmpty())
+ raw_clean << tmp_out;
QString tmp_clean = escapeFilePaths(raw_clean).join(' ');
QString tmp_clean_cmds = project->values(ProKey(*it + ".clean_commands")).join(' ');
if(!tmp_inputs.isEmpty())
@@ -1863,14 +1865,11 @@ MakefileGenerator::writeExtraCompilerTargets(QTextStream &t)
t << "\n\t" << tmp_clean_cmds;
wrote_clean_cmds = true;
}
- if(tmp_clean.isEmpty())
- tmp_clean = escapeFilePath(tmp_out);
if(tmp_clean.indexOf("${QMAKE_") == -1) {
t << "\n\t-$(DEL_FILE) " << tmp_clean;
wrote_clean = true;
}
if(!wrote_clean_cmds || !wrote_clean) {
- QStringList q_raw_clean = raw_clean.toQStringList();
QStringList cleans;
const QString del_statement("-$(DEL_FILE)");
if(!wrote_clean) {
@@ -1878,7 +1877,7 @@ MakefileGenerator::writeExtraCompilerTargets(QTextStream &t)
for (ProStringList::ConstIterator input = tmp_inputs.begin(); input != tmp_inputs.end(); ++input) {
QString tinp = (*input).toQString();
QString out = replaceExtraCompilerVariables(tmp_out, tinp, QString(), NoShell);
- foreach (const QString &rc, q_raw_clean) {
+ foreach (const QString &rc, raw_clean) {
dels << ' ' + escapeFilePath(Option::fixPathToTargetOS(
replaceExtraCompilerVariables(rc, tinp, out, NoShell), false));
}