summaryrefslogtreecommitdiffstats
path: root/qmake/generators/makefile.cpp
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@nokia.com>2012-07-12 12:08:42 +0200
committerQt by Nokia <qt-info@nokia.com>2012-07-16 01:06:51 +0200
commit9651738f2d53c70fcb96cc7baa8a8c9dceb64562 (patch)
treeed96ebe60bfdd7bf383c495048cbba6552f976b8 /qmake/generators/makefile.cpp
parent4499a911c4c5f73fe9556f918766e6f377411b73 (diff)
automatically fix separators in QMAKE_{DIST,}CLEAN
it's a tad insane to expect the user to do that Change-Id: I75c68f2a28656c9ba2e3fabcc79718b899b29ce7 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Diffstat (limited to 'qmake/generators/makefile.cpp')
-rw-r--r--qmake/generators/makefile.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp
index 3a29c5588d..c961528a5c 100644
--- a/qmake/generators/makefile.cpp
+++ b/qmake/generators/makefile.cpp
@@ -1436,6 +1436,15 @@ MakefileGenerator::varGlue(const QString &var, const QString &before, const QStr
}
QString
+MakefileGenerator::fileVarGlue(const QString &var, const QString &before, const QString &glue, const QString &after)
+{
+ QStringList varList;
+ foreach (const QString &val, project->values(var))
+ varList << escapeFilePath(Option::fixPathToTargetOS(val));
+ return valGlue(varList, before, glue, after);
+}
+
+QString
MakefileGenerator::valGlue(const QStringList &varList, const QString &before, const QString &glue, const QString &after)
{
QString ret;
@@ -2595,12 +2604,12 @@ MakefileGenerator::writeSubTargets(QTextStream &t, QList<MakefileGenerator::SubT
t << " FORCE";
t << endl;
if(suffix == "clean") {
- t << varGlue("QMAKE_CLEAN","\t-$(DEL_FILE) ","\n\t-$(DEL_FILE) ", "\n");
+ t << fileVarGlue("QMAKE_CLEAN", "\t-$(DEL_FILE) ", "\n\t-$(DEL_FILE) ", "\n");
} else if(suffix == "distclean") {
QString ofile = Option::fixPathToTargetOS(fileFixify(Option::output.fileName()));
if(!ofile.isEmpty())
t << "\t-$(DEL_FILE) " << ofile << endl;
- t << varGlue("QMAKE_DISTCLEAN","\t-$(DEL_FILE) "," ","\n");
+ t << fileVarGlue("QMAKE_DISTCLEAN", "\t-$(DEL_FILE) ", " ", "\n");
} else if(project->isActiveConfig("no_empty_targets")) {
t << "\t" << "@cd ." << endl;
}