write 'all' target later
this allows us to extend its dependencies, which we will make use of later. Change-Id: I8809bdffb435455338e88e97049b10beeab0468a Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
This commit is contained in:
parent
aedfb7e982
commit
b56ff1f394
@ -376,6 +376,7 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
QString allDeps;
|
||||||
if (!project->values("QMAKE_APP_FLAG").isEmpty() || project->first("TEMPLATE") == "aux") {
|
if (!project->values("QMAKE_APP_FLAG").isEmpty() || project->first("TEMPLATE") == "aux") {
|
||||||
QString destdir = project->first("DESTDIR").toQString();
|
QString destdir = project->first("DESTDIR").toQString();
|
||||||
if(!project->isEmpty("QMAKE_BUNDLE")) {
|
if(!project->isEmpty("QMAKE_BUNDLE")) {
|
||||||
@ -436,8 +437,6 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
|
|||||||
deps.prepend(incr_target_dir + " ");
|
deps.prepend(incr_target_dir + " ");
|
||||||
incr_deps = "$(OBJECTS)";
|
incr_deps = "$(OBJECTS)";
|
||||||
}
|
}
|
||||||
t << "all: " << escapeDependencyPath(deps) << " " << valGlue(escapeDependencyPaths(project->values("ALL_DEPS")),""," "," ") << "$(TARGET)"
|
|
||||||
<< endl << endl;
|
|
||||||
|
|
||||||
//real target
|
//real target
|
||||||
t << var("TARGET") << ": " << var("PRE_TARGETDEPS") << " " << incr_deps << " " << target_deps
|
t << var("TARGET") << ": " << var("PRE_TARGETDEPS") << " " << incr_deps << " " << target_deps
|
||||||
@ -451,9 +450,6 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
|
|||||||
t << "\n\t" << var("QMAKE_POST_LINK");
|
t << "\n\t" << var("QMAKE_POST_LINK");
|
||||||
t << endl << endl;
|
t << endl << endl;
|
||||||
} else {
|
} else {
|
||||||
t << "all: " << escapeDependencyPath(deps) << " " << valGlue(escapeDependencyPaths(project->values("ALL_DEPS")),""," "," ") << "$(TARGET)"
|
|
||||||
<< endl << endl;
|
|
||||||
|
|
||||||
t << "$(TARGET): " << var("PRE_TARGETDEPS") << " $(OBJECTS) "
|
t << "$(TARGET): " << var("PRE_TARGETDEPS") << " $(OBJECTS) "
|
||||||
<< target_deps << " " << var("POST_TARGETDEPS") << "\n\t";
|
<< target_deps << " " << var("POST_TARGETDEPS") << "\n\t";
|
||||||
if (project->first("TEMPLATE") != "aux") {
|
if (project->first("TEMPLATE") != "aux") {
|
||||||
@ -467,6 +463,7 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
|
|||||||
}
|
}
|
||||||
t << endl << endl;
|
t << endl << endl;
|
||||||
}
|
}
|
||||||
|
allDeps = " $(TARGET)";
|
||||||
} else if(!project->isActiveConfig("staticlib")) {
|
} else if(!project->isActiveConfig("staticlib")) {
|
||||||
QString destdir = unescapeFilePath(project->first("DESTDIR").toQString()), incr_deps;
|
QString destdir = unescapeFilePath(project->first("DESTDIR").toQString()), incr_deps;
|
||||||
if(!project->isEmpty("QMAKE_BUNDLE")) {
|
if(!project->isEmpty("QMAKE_BUNDLE")) {
|
||||||
@ -526,19 +523,15 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
|
|||||||
incr_deps = "$(OBJECTS)";
|
incr_deps = "$(OBJECTS)";
|
||||||
}
|
}
|
||||||
|
|
||||||
t << "all: " << escapeDependencyPath(deps) << " " << valGlue(escapeDependencyPaths(project->values("ALL_DEPS")),""," "," ")
|
|
||||||
<< " " << destdir << "$(TARGET)\n\n";
|
|
||||||
|
|
||||||
//real target
|
//real target
|
||||||
t << destdir << "$(TARGET): " << var("PRE_TARGETDEPS") << " "
|
t << destdir << "$(TARGET): " << var("PRE_TARGETDEPS") << " "
|
||||||
<< incr_deps << " $(SUBLIBS) " << target_deps << " " << var("POST_TARGETDEPS");
|
<< incr_deps << " $(SUBLIBS) " << target_deps << " " << var("POST_TARGETDEPS");
|
||||||
} else {
|
} else {
|
||||||
t << "all: " << escapeDependencyPath(deps) << " " << valGlue(escapeDependencyPaths(project->values("ALL_DEPS")),""," "," ") << " " <<
|
|
||||||
destdir << "$(TARGET)\n\n";
|
|
||||||
t << destdir << "$(TARGET): " << var("PRE_TARGETDEPS")
|
t << destdir << "$(TARGET): " << var("PRE_TARGETDEPS")
|
||||||
<< " $(OBJECTS) $(SUBLIBS) $(OBJCOMP) " << target_deps
|
<< " $(OBJECTS) $(SUBLIBS) $(OBJCOMP) " << target_deps
|
||||||
<< " " << var("POST_TARGETDEPS");
|
<< " " << var("POST_TARGETDEPS");
|
||||||
}
|
}
|
||||||
|
allDeps = ' ' + destdir + "$(TARGET)";
|
||||||
if(!destdir.isEmpty())
|
if(!destdir.isEmpty())
|
||||||
t << "\n\t" << mkdir_p_asstring(destdir, false);
|
t << "\n\t" << mkdir_p_asstring(destdir, false);
|
||||||
if(!project->isEmpty("QMAKE_PRE_LINK"))
|
if(!project->isEmpty("QMAKE_PRE_LINK"))
|
||||||
@ -641,9 +634,9 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
QString destdir = project->first("DESTDIR").toQString();
|
QString destdir = project->first("DESTDIR").toQString();
|
||||||
t << "all: " << escapeDependencyPath(deps) << " " << valGlue(escapeDependencyPaths(project->values("ALL_DEPS")),""," "," ") << destdir << "$(TARGET) "
|
allDeps = ' ' + destdir + "$(TARGET)"
|
||||||
<< varGlue("QMAKE_AR_SUBLIBS", destdir, " " + destdir, "") << "\n\n"
|
+ varGlue("QMAKE_AR_SUBLIBS", ' ' + destdir, ' ' + destdir, "");
|
||||||
<< "staticlib: " << destdir << "$(TARGET)\n\n";
|
t << "staticlib: " << destdir << "$(TARGET)\n\n";
|
||||||
if(project->isEmpty("QMAKE_AR_SUBLIBS")) {
|
if(project->isEmpty("QMAKE_AR_SUBLIBS")) {
|
||||||
t << destdir << "$(TARGET): " << var("PRE_TARGETDEPS")
|
t << destdir << "$(TARGET): " << var("PRE_TARGETDEPS")
|
||||||
<< " $(OBJECTS) $(OBJCOMP) " << var("POST_TARGETDEPS") << "\n\t";
|
<< " $(OBJECTS) $(OBJCOMP) " << var("POST_TARGETDEPS") << "\n\t";
|
||||||
@ -828,6 +821,10 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
t << endl << "all: " << escapeDependencyPath(deps)
|
||||||
|
<< valGlue(escapeDependencyPaths(project->values("ALL_DEPS")), " ", " ", "")
|
||||||
|
<< allDeps << endl << endl;
|
||||||
|
|
||||||
ProString ddir;
|
ProString ddir;
|
||||||
ProString packageName(project->first("QMAKE_ORIG_TARGET"));
|
ProString packageName(project->first("QMAKE_ORIG_TARGET"));
|
||||||
if(!project->isActiveConfig("no_dist_version"))
|
if(!project->isActiveConfig("no_dist_version"))
|
||||||
|
Loading…
Reference in New Issue
Block a user