diff options
author | Liang Qi <liang.qi@theqtcompany.com> | 2015-10-23 14:01:35 +0200 |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> | 2015-10-23 14:45:03 +0200 |
commit | 790aef362fd195adf97d8c780a7cbbbade27d51f (patch) | |
tree | 8be464687ab21806cfe9f7ada27098b563aa41b2 /qmake/generators/unix | |
parent | 9720efbd1035c2e939b0581163e6d804c713dd96 (diff) | |
parent | 07475c662eb73c833da2d461b8ef2702ca1e2cfb (diff) |
Merge remote-tracking branch 'origin/5.6' into dev
Conflicts:
.qmake.conf
configure
src/corelib/global/qglobal.h
src/tools/qdoc/node.cpp
src/tools/qdoc/qdocdatabase.cpp
tests/auto/corelib/io/qsettings/tst_qsettings.cpp
tools/configure/configureapp.cpp
Change-Id: I66028ae5e441a06b73ee85ba72a03a3af3e8593f
Diffstat (limited to 'qmake/generators/unix')
-rw-r--r-- | qmake/generators/unix/unixmake.cpp | 19 | ||||
-rw-r--r-- | qmake/generators/unix/unixmake2.cpp | 12 |
2 files changed, 23 insertions, 8 deletions
diff --git a/qmake/generators/unix/unixmake.cpp b/qmake/generators/unix/unixmake.cpp index 1d9ebb35e3..57c0a97228 100644 --- a/qmake/generators/unix/unixmake.cpp +++ b/qmake/generators/unix/unixmake.cpp @@ -125,10 +125,23 @@ UnixMakefileGenerator::init() const ProStringList &rpathdirs = project->values("QMAKE_RPATHDIR"); for (int i = 0; i < rpathdirs.size(); ++i) { QString rpathdir = rpathdirs[i].toQString(); - if (rpathdir.length() > 1 && rpathdir.at(0) == '$' && rpathdir.at(1) != '(') + if (rpathdir.length() > 1 && rpathdir.at(0) == '$' && rpathdir.at(1) != '(') { rpathdir.replace(0, 1, "\\$$"); // Escape from make and the shell - else if (!rpathdir.startsWith('@')) - rpathdir = QFileInfo(rpathdir).absoluteFilePath(); + } else if (!rpathdir.startsWith('@') && fileInfo(rpathdir).isRelative()) { + QString rpathbase = project->first("QMAKE_REL_RPATH_BASE").toQString(); + if (rpathbase.isEmpty()) { + fprintf(stderr, "Error: This platform does not support relative paths in QMAKE_RPATHDIR (%s)\n", + rpathdir.toLatin1().constData()); + continue; + } + if (rpathbase.startsWith('$')) + rpathbase.replace(0, 1, "\\$$"); // Escape from make and the shell + if (rpathdir == ".") + rpathdir = rpathbase; + else + rpathdir.prepend(rpathbase + '/'); + project->values("QMAKE_LFLAGS").insertUnique(project->values("QMAKE_LFLAGS_REL_RPATH")); + } project->values("QMAKE_LFLAGS") += var("QMAKE_LFLAGS_RPATH") + escapeFilePath(rpathdir); } } diff --git a/qmake/generators/unix/unixmake2.cpp b/qmake/generators/unix/unixmake2.cpp index d0cd5d2354..9db64bebee 100644 --- a/qmake/generators/unix/unixmake2.cpp +++ b/qmake/generators/unix/unixmake2.cpp @@ -262,11 +262,13 @@ 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; - // The comment is important for mingw32-make.exe on Windows as otherwise trailing slashes - // would be interpreted as line continuation. The lack of spacing between the value and the - // comment is also important as otherwise quoted use of "$(DESTDIR)" would include this - // spacing. - t << "DESTDIR = " << fileVar("DESTDIR") << "#avoid trailing-slash linebreak\n"; + 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 << "TARGET = " << fileVar("TARGET") << endl; // ### mixed use! if(project->isActiveConfig("plugin")) { t << "TARGETD = " << fileVar("TARGET") << endl; |