qmake: Suppress built-in suffixes for make

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 <qt_ci_bot@qt-project.org>
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
This commit is contained in:
Orgad Shaneh 2020-11-17 08:34:20 +02:00
parent 4114a0ea75
commit 48ef124047
4 changed files with 15 additions and 0 deletions

View File

@ -2243,6 +2243,7 @@ MakefileGenerator::writeDummyMakefile(QTextStream &t)
<< "@echo \"Skipped.\"\n\n"; << "@echo \"Skipped.\"\n\n";
writeMakeQmake(t); writeMakeQmake(t);
t << "FORCE:\n\n"; t << "FORCE:\n\n";
suppressBuiltinRules(t);
return true; return true;
} }
@ -2257,6 +2258,7 @@ MakefileGenerator::writeMakefile(QTextStream &t)
writeInstalls(t); writeInstalls(t);
t << "FORCE:\n\n"; t << "FORCE:\n\n";
suppressBuiltinRules(t);
return true; return true;
} }
@ -2778,6 +2780,13 @@ MakefileGenerator::writeSubTargets(QTextStream &t, QList<MakefileGenerator::SubT
writeInstalls(t, true); writeInstalls(t, true);
} }
t << "FORCE:\n\n"; t << "FORCE:\n\n";
suppressBuiltinRules(t);
}
void
MakefileGenerator::suppressBuiltinRules(QTextStream &t) const
{
t << ".SUFFIXES:\n\n";
} }
void void

View File

@ -121,6 +121,7 @@ protected:
void writeSubTargetCall(QTextStream &t, void writeSubTargetCall(QTextStream &t,
const QString &in_directory, const QString &in, const QString &out_directory, const QString &out, const QString &in_directory, const QString &in, const QString &out_directory, const QString &out,
const QString &out_directory_cdin, const QString &makefilein); const QString &out_directory_cdin, const QString &makefilein);
virtual void suppressBuiltinRules(QTextStream &t) const;
virtual void writeSubMakeCall(QTextStream &t, const QString &outDirectory_cdin, virtual void writeSubMakeCall(QTextStream &t, const QString &outDirectory_cdin,
const QString &makeFileIn); const QString &makeFileIn);
virtual void writeSubTargets(QTextStream &t, QList<SubTarget*> subtargets, int flags); virtual void writeSubTargets(QTextStream &t, QList<SubTarget*> subtargets, int flags);

View File

@ -174,6 +174,10 @@ QString NmakeMakefileGenerator::var(const ProKey &value) const
return MakefileGenerator::var(value); return MakefileGenerator::var(value);
} }
void NmakeMakefileGenerator::suppressBuiltinRules(QTextStream &t) const
{
}
void NmakeMakefileGenerator::init() void NmakeMakefileGenerator::init()
{ {
/* this should probably not be here, but I'm using it to wrap the .t files */ /* this should probably not be here, but I'm using it to wrap the .t files */

View File

@ -52,6 +52,7 @@ protected:
QString defaultInstall(const QString &t) override; QString defaultInstall(const QString &t) override;
QStringList &findDependencies(const QString &file) override; QStringList &findDependencies(const QString &file) override;
QString var(const ProKey &value) const override; QString var(const ProKey &value) const override;
void suppressBuiltinRules(QTextStream &t) const override;
QString precompH, precompObj, precompPch; QString precompH, precompObj, precompPch;
QString precompObjC, precompPchC; QString precompObjC, precompPchC;
bool usePCH = false; bool usePCH = false;