don't generate make_default targets

make_first really means the same, as the default target is 'first'
which immediately invokes make_first.

as a nice side effect, this fixes ALL_DEPS not being used by the subdirs
template's default target - make_default wasn't special-cased in the
right place, while make_first is.

Change-Id: I946cea3b2dae198eda61d31dbd19c6ccd15deac7
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
This commit is contained in:
Oswald Buddenhagen 2010-02-01 18:16:39 +01:00
parent c85dc033dc
commit b35d8e651b

View File

@ -2362,7 +2362,7 @@ void
MakefileGenerator::writeSubDirs(QTextStream &t)
{
QList<SubTarget*> targets = findSubDirsSubTargets();
t << "first: make_default" << endl;
t << "first: make_first" << endl;
int flags = SubTargetInstalls;
if(project->isActiveConfig("ordered"))
flags |= SubTargetOrdered;
@ -2419,7 +2419,7 @@ MakefileGenerator::writeSubTargets(QTextStream &t, QList<MakefileGenerator::SubT
QStringList targetSuffixes;
const QString abs_source_path = project->first("QMAKE_ABSOLUTE_SOURCE_PATH");
if (!(flags & SubTargetSkipDefaultTargets)) {
targetSuffixes << "make_default" << "make_first" << "all" << "clean" << "distclean"
targetSuffixes << "make_first" << "all" << "clean" << "distclean"
<< QString((flags & SubTargetInstalls) ? "install_subtargets" : "install")
<< QString((flags & SubTargetInstalls) ? "uninstall_subtargets" : "uninstall");
}
@ -2511,8 +2511,6 @@ MakefileGenerator::writeSubTargets(QTextStream &t, QList<MakefileGenerator::SubT
else if(s == "uninstall_subtargets")
s = "uninstall";
else if(s == "make_first")
s = "first";
else if(s == "make_default")
s = QString();
if(flags & SubTargetOrdered) {
@ -2562,7 +2560,7 @@ MakefileGenerator::writeSubTargets(QTextStream &t, QList<MakefileGenerator::SubT
t << suffix << ":";
for(int target = 0; target < targets.size(); ++target) {
SubTarget *subTarget = targets.at(target);
if((suffix == "make_first" || suffix == "make_default")
if (suffix == "make_first"
&& project->values(subTarget->name + ".CONFIG").indexOf("no_default_target") != -1) {
continue;
}