summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOrgad Shaneh <orgad.shaneh@audiocodes.com>2017-06-22 10:49:34 +0300
committerOrgad Shaneh <orgads@gmail.com>2017-07-07 08:11:44 +0000
commite10be52e2144e27d1f9df334de81abf9c57b0af8 (patch)
tree3eb3ba6f2c84be49e37b29a325464438eb19e70b
parentdb404fea64074b353b2f1766dffd26aa24bdbd50 (diff)
qmake: Separate object_script by Makefile name
If several Makefiles are used in the same directory (for example, for multiple projects in the same directory or different build configurations), they all reference the same object_script, which is obviously wrong. Change-Id: I9b499ceb6b6bd6058f54b452fa44bfb2313eec26 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
-rw-r--r--qmake/generators/win32/mingw_make.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/qmake/generators/win32/mingw_make.cpp b/qmake/generators/win32/mingw_make.cpp
index b9895fb10d..c3b876531c 100644
--- a/qmake/generators/win32/mingw_make.cpp
+++ b/qmake/generators/win32/mingw_make.cpp
@@ -292,6 +292,8 @@ void MingwMakefileGenerator::writeObjectsPart(QTextStream &t)
if (!var("BUILD_NAME").isEmpty()) {
ar_script_file += "." + var("BUILD_NAME");
}
+ if (!var("MAKEFILE").isEmpty())
+ ar_script_file += "." + var("MAKEFILE");
// QMAKE_LIB is used for win32, including mingw, whereas QMAKE_AR is used on Unix.
// Strip off any options since the ar commands will be read from file.
QString ar_cmd = var("QMAKE_LIB").section(" ", 0, 0);
@@ -304,6 +306,8 @@ void MingwMakefileGenerator::writeObjectsPart(QTextStream &t)
if (!var("BUILD_NAME").isEmpty()) {
ld_script_file += "." + var("BUILD_NAME");
}
+ if (!var("MAKEFILE").isEmpty())
+ ld_script_file += "." + var("MAKEFILE");
createLdObjectScriptFile(ld_script_file, project->values("OBJECTS"));
objectsLinkLine = escapeFilePath(ld_script_file);
}