don't generate make_default targets
authorOswald Buddenhagen <oswald.buddenhagen@nokia.com>
Mon, 1 Feb 2010 17:16:39 +0000 (18:16 +0100)
committerOswald Buddenhagen <oswald.buddenhagen@nokia.com>
Tue, 19 Jun 2012 14:39:58 +0000 (16:39 +0200)
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>
qmake/generators/makefile.cpp

index 97370f0..6d82461 100644 (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;
             }