From 48ef124047eed9d6278b5766516c471bdc0f13f3 Mon Sep 17 00:00:00 2001 From: Orgad Shaneh Date: Tue, 17 Nov 2020 08:34:20 +0200 Subject: [PATCH] qmake: Suppress built-in suffixes for make MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit They cause make to run much slower, and qmake writes everything explicitly, so they're not really needed. Change-Id: Ia47674eec8309e120c8264b7b6687677a520d5b9 Reviewed-by: Qt CI Bot Reviewed-by: Jörg Bornemann --- qmake/generators/makefile.cpp | 9 +++++++++ qmake/generators/makefile.h | 1 + qmake/generators/win32/msvc_nmake.cpp | 4 ++++ qmake/generators/win32/msvc_nmake.h | 1 + 4 files changed, 15 insertions(+) diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp index c9c45990f4..e16082e62c 100644 --- a/qmake/generators/makefile.cpp +++ b/qmake/generators/makefile.cpp @@ -2243,6 +2243,7 @@ MakefileGenerator::writeDummyMakefile(QTextStream &t) << "@echo \"Skipped.\"\n\n"; writeMakeQmake(t); t << "FORCE:\n\n"; + suppressBuiltinRules(t); return true; } @@ -2257,6 +2258,7 @@ MakefileGenerator::writeMakefile(QTextStream &t) writeInstalls(t); t << "FORCE:\n\n"; + suppressBuiltinRules(t); return true; } @@ -2778,6 +2780,13 @@ MakefileGenerator::writeSubTargets(QTextStream &t, QList subtargets, int flags); diff --git a/qmake/generators/win32/msvc_nmake.cpp b/qmake/generators/win32/msvc_nmake.cpp index 50666215c6..efba1f1e83 100644 --- a/qmake/generators/win32/msvc_nmake.cpp +++ b/qmake/generators/win32/msvc_nmake.cpp @@ -174,6 +174,10 @@ QString NmakeMakefileGenerator::var(const ProKey &value) const return MakefileGenerator::var(value); } +void NmakeMakefileGenerator::suppressBuiltinRules(QTextStream &t) const +{ +} + void NmakeMakefileGenerator::init() { /* this should probably not be here, but I'm using it to wrap the .t files */ diff --git a/qmake/generators/win32/msvc_nmake.h b/qmake/generators/win32/msvc_nmake.h index 3064f06521..23172c9230 100644 --- a/qmake/generators/win32/msvc_nmake.h +++ b/qmake/generators/win32/msvc_nmake.h @@ -52,6 +52,7 @@ protected: QString defaultInstall(const QString &t) override; QStringList &findDependencies(const QString &file) override; QString var(const ProKey &value) const override; + void suppressBuiltinRules(QTextStream &t) const override; QString precompH, precompObj, precompPch; QString precompObjC, precompPchC; bool usePCH = false;