diff options
author | Liang Qi <liang.qi@qt.io> | 2019-06-11 10:30:48 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2019-06-11 10:30:48 +0200 |
commit | 3c662bf13cdc509c1f40c59ad30711c909006b06 (patch) | |
tree | 8d20ff8e1aaf0f15c768e1f289bcabeed449a4cb /qmake/generators/unix/unixmake2.cpp | |
parent | 17790dd030cf05951c6bc886362e5645bb4eb686 (diff) | |
parent | 2ea3e133c369deefeae0605ad2f32aaea52c9e97 (diff) |
Merge remote-tracking branch 'origin/5.13.0' into 5.13
Conflicts:
src/plugins/platforms/wasm/qwasmintegration.cpp
src/plugins/platforms/wasm/qwasmintegration.h
Change-Id: Idf4c7936513fb1f21daa8f6105b8545f13447bb8
Diffstat (limited to 'qmake/generators/unix/unixmake2.cpp')
-rw-r--r-- | qmake/generators/unix/unixmake2.cpp | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/qmake/generators/unix/unixmake2.cpp b/qmake/generators/unix/unixmake2.cpp index aafdcf1582..731821020b 100644 --- a/qmake/generators/unix/unixmake2.cpp +++ b/qmake/generators/unix/unixmake2.cpp @@ -172,6 +172,16 @@ static QString rfc1034Identifier(const QString &str) return s; } +static QString escapeDir(const QString &dir) +{ + // When building on non-MSys MinGW, the path ends with a backslash, which + // GNU make will interpret that as a line continuation. Doubling the backslash + // avoids the problem, at the cost of the variable containing *both* backslashes. + if (dir.endsWith('\\')) + return dir + '\\'; + return dir; +} + void UnixMakefileGenerator::writeMakeParts(QTextStream &t) { @@ -234,7 +244,7 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t) t << "####### Output directory\n\n"; // This is used in commands by some .prf files. if (! project->values("OBJECTS_DIR").isEmpty()) - t << "OBJECTS_DIR = " << fileVar("OBJECTS_DIR") << endl; + t << "OBJECTS_DIR = " << escapeDir(fileVar("OBJECTS_DIR")) << endl; else t << "OBJECTS_DIR = ./\n"; t << endl; @@ -280,13 +290,7 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t) t << "DIST = " << valList(fileFixify(project->values("DISTFILES").toQStringList())) << " " << fileVarList("HEADERS") << ' ' << fileVarList("SOURCES") << endl; t << "QMAKE_TARGET = " << fileVar("QMAKE_ORIG_TARGET") << endl; - QString destd = fileVar("DESTDIR"); - // When building on non-MSys MinGW, the path ends with a backslash, which - // GNU make will interpret that as a line continuation. Doubling the backslash - // avoids the problem, at the cost of the variable containing *both* backslashes. - if (destd.endsWith('\\')) - destd += '\\'; - t << "DESTDIR = " << destd << endl; + t << "DESTDIR = " << escapeDir(fileVar("DESTDIR")) << endl; t << "TARGET = " << fileVar("TARGET") << endl; if(project->isActiveConfig("plugin")) { t << "TARGETD = " << fileVar("TARGET") << endl; |