unbreak "aux" template for mingw & msvc
authorOswald Buddenhagen <oswald.buddenhagen@nokia.com>
Wed, 15 Aug 2012 17:42:42 +0000 (19:42 +0200)
committerQt by Nokia <qt-info@nokia.com>
Fri, 17 Aug 2012 10:27:05 +0000 (12:27 +0200)
we cannot just completely stub it out, as then there are no dependencies
on whatever targets we actually *want* to be built.

Change-Id: I32a92fa937d099c153a0082feae5d23e3998ba48
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
qmake/generators/win32/mingw_make.cpp
qmake/generators/win32/msvc_nmake.cpp

index 6d24e24..4328106 100644 (file)
@@ -383,12 +383,6 @@ void MingwMakefileGenerator::writeObjectsPart(QTextStream &t)
 
 void MingwMakefileGenerator::writeBuildRulesPart(QTextStream &t)
 {
-    if (project->first("TEMPLATE") == "aux") {
-        t << "first:" << endl;
-        t << "all:" << endl;
-        return;
-    }
-
     t << "first: all" << endl;
     t << "all: " << escapeDependencyPath(fileFixify(Option::output.fileName())) << " " << valGlue(escapeDependencyPaths(project->values("ALL_DEPS"))," "," "," ") << " $(DESTDIR_TARGET)" << endl << endl;
     t << "$(DESTDIR_TARGET): " << var("PRE_TARGETDEPS") << " $(OBJECTS) " << var("POST_TARGETDEPS");
@@ -400,7 +394,7 @@ void MingwMakefileGenerator::writeBuildRulesPart(QTextStream &t)
         } else {
             t << "\n\t" << objectsLinkLine << " " ;
         }
-    } else {
+    } else if (project->first("TEMPLATE") != "aux") {
         t << "\n\t" << "$(LINK) $(LFLAGS) -o $(DESTDIR_TARGET) " << objectsLinkLine << " " << " $(LIBS)";
     }
     if(!project->isEmpty("QMAKE_POST_LINK"))
index a5c215a..5f9dd76 100644 (file)
@@ -358,11 +358,6 @@ void NmakeMakefileGenerator::writeImplicitRulesPart(QTextStream &t)
 void NmakeMakefileGenerator::writeBuildRulesPart(QTextStream &t)
 {
     const QString templateName = project->first("TEMPLATE");
-    if (templateName == "aux") {
-        t << "first:" << endl;
-        t << "all:" << endl;
-        return;
-    }
 
     t << "first: all" << endl;
     t << "all: " << fileFixify(Option::output.fileName()) << " " << varGlue("ALL_DEPS"," "," "," ") << "$(DESTDIR_TARGET)" << endl << endl;
@@ -374,7 +369,7 @@ void NmakeMakefileGenerator::writeBuildRulesPart(QTextStream &t)
         t << "\n\t" << "$(LIBAPP) $(LIBFLAGS) /OUT:$(DESTDIR_TARGET) @<<" << "\n\t  "
           << "$(OBJECTS)"
           << "\n<<";
-    } else {
+    } else if (templateName != "aux") {
         const bool embedManifest = ((templateName == "app" && project->isActiveConfig("embed_manifest_exe"))
                                     || (templateName == "lib" && project->isActiveConfig("embed_manifest_dll")
                                         && !(project->isActiveConfig("plugin") && project->isActiveConfig("no_plugin_manifest"))