From e10be52e2144e27d1f9df334de81abf9c57b0af8 Mon Sep 17 00:00:00 2001 From: Orgad Shaneh Date: Thu, 22 Jun 2017 10:49:34 +0300 Subject: 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 --- qmake/generators/win32/mingw_make.cpp | 4 ++++ 1 file changed, 4 insertions(+) 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); } -- cgit v1.2.3