qmake nmake generator: pass MAKEFLAGS to sub-make calls
Unlike other make tools nmake doesn't do this automatically. Reviewed-by: ossi
This commit is contained in:
parent
1287361f64
commit
c04b7a55d1
@ -2376,6 +2376,14 @@ MakefileGenerator::writeSubDirs(QTextStream &t)
|
|||||||
qDeleteAll(targets);
|
qDeleteAll(targets);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MakefileGenerator::writeSubMakeCall(QTextStream &t, const QString &callPrefix,
|
||||||
|
const QString &makeArguments, const QString &callPostfix)
|
||||||
|
{
|
||||||
|
t << callPrefix
|
||||||
|
<< "$(MAKE)" << makeArguments
|
||||||
|
<< callPostfix << endl;
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
MakefileGenerator::writeSubTargets(QTextStream &t, QList<MakefileGenerator::SubTarget*> targets, int flags)
|
MakefileGenerator::writeSubTargets(QTextStream &t, QList<MakefileGenerator::SubTarget*> targets, int flags)
|
||||||
{
|
{
|
||||||
@ -2499,9 +2507,7 @@ MakefileGenerator::writeSubTargets(QTextStream &t, QList<MakefileGenerator::SubT
|
|||||||
t << " " << valList(subtarget->depends);
|
t << " " << valList(subtarget->depends);
|
||||||
if(project->isEmpty("QMAKE_NOFORCE"))
|
if(project->isEmpty("QMAKE_NOFORCE"))
|
||||||
t << " FORCE";
|
t << " FORCE";
|
||||||
t << out_directory_cdin
|
writeSubMakeCall(t, out_directory_cdin, makefilein, out_directory_cdout);
|
||||||
<< "$(MAKE)" << makefilein
|
|
||||||
<< out_directory_cdout << endl;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for(int suffix = 0; suffix < targetSuffixes.size(); ++suffix) {
|
for(int suffix = 0; suffix < targetSuffixes.size(); ++suffix) {
|
||||||
@ -2521,9 +2527,7 @@ MakefileGenerator::writeSubTargets(QTextStream &t, QList<MakefileGenerator::SubT
|
|||||||
t << " " << targets.at(target-1)->target << "-" << targetSuffixes.at(suffix) << "-ordered ";
|
t << " " << targets.at(target-1)->target << "-" << targetSuffixes.at(suffix) << "-ordered ";
|
||||||
if(project->isEmpty("QMAKE_NOFORCE"))
|
if(project->isEmpty("QMAKE_NOFORCE"))
|
||||||
t << " FORCE";
|
t << " FORCE";
|
||||||
t << out_directory_cdin
|
writeSubMakeCall(t, out_directory_cdin, makefilein, out_directory_cdout);
|
||||||
<< "$(MAKE)" << makefilein << " " << s
|
|
||||||
<< out_directory_cdout << endl;
|
|
||||||
}
|
}
|
||||||
t << subtarget->target << "-" << targetSuffixes.at(suffix) << ": " << mkfile;
|
t << subtarget->target << "-" << targetSuffixes.at(suffix) << ": " << mkfile;
|
||||||
if(!subtarget->depends.isEmpty())
|
if(!subtarget->depends.isEmpty())
|
||||||
@ -2531,9 +2535,7 @@ MakefileGenerator::writeSubTargets(QTextStream &t, QList<MakefileGenerator::SubT
|
|||||||
"-"+targetSuffixes.at(suffix));
|
"-"+targetSuffixes.at(suffix));
|
||||||
if(project->isEmpty("QMAKE_NOFORCE"))
|
if(project->isEmpty("QMAKE_NOFORCE"))
|
||||||
t << " FORCE";
|
t << " FORCE";
|
||||||
t << out_directory_cdin
|
writeSubMakeCall(t, out_directory_cdin, makefilein, out_directory_cdout);
|
||||||
<< "$(MAKE)" << makefilein << " " << s
|
|
||||||
<< out_directory_cdout << endl;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
t << endl;
|
t << endl;
|
||||||
@ -2671,12 +2673,10 @@ MakefileGenerator::writeSubTargets(QTextStream &t, QList<MakefileGenerator::SubT
|
|||||||
|
|
||||||
//write the commands
|
//write the commands
|
||||||
if(!out_directory.isEmpty()) {
|
if(!out_directory.isEmpty()) {
|
||||||
t << out_directory_cdin
|
writeSubMakeCall(t, out_directory_cdin, makefilein + " " + sub_targ,
|
||||||
<< "$(MAKE)" << makefilein << " " << sub_targ
|
out_directory_cdout);
|
||||||
<< out_directory_cdout << endl;
|
|
||||||
} else {
|
} else {
|
||||||
t << "\n\t"
|
writeSubMakeCall(t, "\n\t", makefilein + " " + sub_targ, QString());
|
||||||
<< "$(MAKE)" << makefilein << " " << sub_targ << endl;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -127,6 +127,8 @@ protected:
|
|||||||
SubTargetsNoFlags=0x00
|
SubTargetsNoFlags=0x00
|
||||||
};
|
};
|
||||||
QList<MakefileGenerator::SubTarget*> findSubDirsSubTargets() const;
|
QList<MakefileGenerator::SubTarget*> findSubDirsSubTargets() const;
|
||||||
|
virtual void writeSubMakeCall(QTextStream &t, const QString &outDirectory_cdin,
|
||||||
|
const QString &makeFileIn, const QString &outDirectory_cdout);
|
||||||
void writeSubTargets(QTextStream &t, QList<SubTarget*> subtargets, int flags);
|
void writeSubTargets(QTextStream &t, QList<SubTarget*> subtargets, int flags);
|
||||||
|
|
||||||
//extra compiler interface
|
//extra compiler interface
|
||||||
|
@ -85,6 +85,15 @@ NmakeMakefileGenerator::writeMakefile(QTextStream &t)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void NmakeMakefileGenerator::writeSubMakeCall(QTextStream &t, const QString &callPrefix,
|
||||||
|
const QString &makeArguments, const QString &callPostfix)
|
||||||
|
{
|
||||||
|
// Pass MAKEFLAGS as environment variable to sub-make calls.
|
||||||
|
// Unlike other make tools nmake doesn't do this automatically.
|
||||||
|
t << "\n\t@set MAKEFLAGS=$(MAKEFLAGS)";
|
||||||
|
Win32MakefileGenerator::writeSubMakeCall(t, callPrefix, makeArguments, callPostfix);
|
||||||
|
}
|
||||||
|
|
||||||
QString NmakeMakefileGenerator::getPdbTarget()
|
QString NmakeMakefileGenerator::getPdbTarget()
|
||||||
{
|
{
|
||||||
return QString(project->first("TARGET") + project->first("TARGET_VERSION_EXT") + ".pdb");
|
return QString(project->first("TARGET") + project->first("TARGET_VERSION_EXT") + ".pdb");
|
||||||
|
@ -57,6 +57,8 @@ class NmakeMakefileGenerator : public Win32MakefileGenerator
|
|||||||
void init();
|
void init();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
virtual void writeSubMakeCall(QTextStream &t, const QString &callPrefix,
|
||||||
|
const QString &makeArguments, const QString &callPostfix);
|
||||||
virtual QString getPdbTarget();
|
virtual QString getPdbTarget();
|
||||||
virtual QString defaultInstall(const QString &t);
|
virtual QString defaultInstall(const QString &t);
|
||||||
virtual QStringList &findDependencies(const QString &file);
|
virtual QStringList &findDependencies(const QString &file);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user