From 80b99a6dd74c07a1140ab14459b73171b9e681dc Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Mon, 26 Nov 2012 20:56:50 +0100 Subject: [PATCH] assign MAKEFILE even in non-subdirs Makefiles this is necessary for having a clean way to recurse even from leaf makefiles. the location where the variable is written in the makefile is somewhat bizarre, but the code is so convoluted that finding a better place would mean either a lot of duplication or a lot of prior refactoring. Change-Id: I68e4cf7e3814f6c60b2e3421d69775c993dafb23 Reviewed-by: Joerg Bornemann --- qmake/generators/makefile.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp index d6e5eb88987..22772f83920 100644 --- a/qmake/generators/makefile.cpp +++ b/qmake/generators/makefile.cpp @@ -2192,6 +2192,11 @@ MakefileGenerator::writeStubMakefile(QTextStream &t) bool MakefileGenerator::writeMakefile(QTextStream &t) { + QString ofile = Option::fixPathToTargetOS(Option::output.fileName()); + if (ofile.lastIndexOf(Option::dir_sep) != -1) + ofile.remove(0, ofile.lastIndexOf(Option::dir_sep) +1); + t << "MAKEFILE = " << ofile << endl << endl; + t << "####### Compile" << endl << endl; writeObj(t, "SOURCES"); writeObj(t, "GENERATED_SOURCES");