qmake: Introduce new template type
The template type "aux" is intended for projects that do not require building anything, but may need to install stuff (e.g. applications with QML entry point). Reviewed-by: Joerg Bornemann (cherry picked from commit 56443421cb5e537e60abd7ced42c9ebf587683fe)
This commit is contained in:
parent
5a7409a423
commit
bc88f528dc
@ -96,7 +96,8 @@ UnixMakefileGenerator::writeMakefile(QTextStream &t)
|
||||
}
|
||||
|
||||
if (project->values("TEMPLATE").first() == "app" ||
|
||||
project->values("TEMPLATE").first() == "lib") {
|
||||
project->values("TEMPLATE").first() == "lib" ||
|
||||
project->values("TEMPLATE").first() == "aux") {
|
||||
if(Option::mkfile::do_stub_makefile && MakefileGenerator::writeStubMakefile(t))
|
||||
return true;
|
||||
writeMakeParts(t);
|
||||
@ -1017,6 +1018,9 @@ void UnixMakefileGenerator::init2()
|
||||
if(project->isEmpty("QMAKE_FRAMEWORK_VERSION"))
|
||||
project->values("QMAKE_FRAMEWORK_VERSION").append(project->values("VER_MAJ").first());
|
||||
|
||||
if (project->values("TEMPLATE").first() == "aux")
|
||||
return;
|
||||
|
||||
if (!project->values("QMAKE_APP_FLAG").isEmpty()) {
|
||||
if(!project->isEmpty("QMAKE_BUNDLE")) {
|
||||
QString bundle_loc = project->first("QMAKE_BUNDLE_LOCATION");
|
||||
|
@ -68,7 +68,8 @@ BorlandMakefileGenerator::writeMakefile(QTextStream &t)
|
||||
}
|
||||
|
||||
if(project->first("TEMPLATE") == "app" ||
|
||||
project->first("TEMPLATE") == "lib") {
|
||||
project->first("TEMPLATE") == "lib" ||
|
||||
project->first("TEMPLATE") == "aux") {
|
||||
writeBorlandParts(t);
|
||||
return MakefileGenerator::writeMakefile(t);
|
||||
}
|
||||
@ -136,6 +137,11 @@ BorlandMakefileGenerator::init()
|
||||
|
||||
void BorlandMakefileGenerator::writeBuildRulesPart(QTextStream &t)
|
||||
{
|
||||
if (project->first("TEMPLATE") == "aux") {
|
||||
t << "first:" << endl;
|
||||
return;
|
||||
}
|
||||
|
||||
t << "first: all" << endl;
|
||||
t << "all: " << fileFixify(Option::output.fileName()) << " " << varGlue("ALL_DEPS"," "," "," ") << " $(DESTDIR_TARGET)" << endl << endl;
|
||||
t << "$(DESTDIR_TARGET): " << var("PRE_TARGETDEPS") << " $(OBJECTS) " << var("POST_TARGETDEPS");
|
||||
|
@ -141,7 +141,8 @@ bool MingwMakefileGenerator::writeMakefile(QTextStream &t)
|
||||
}
|
||||
|
||||
if(project->first("TEMPLATE") == "app" ||
|
||||
project->first("TEMPLATE") == "lib") {
|
||||
project->first("TEMPLATE") == "lib" ||
|
||||
project->first("TEMPLATE") == "aux") {
|
||||
if(project->isActiveConfig("create_pc") && project->first("TEMPLATE") == "lib")
|
||||
writePkgConfigFile();
|
||||
|
||||
@ -436,6 +437,11 @@ void MingwMakefileGenerator::writeObjectsPart(QTextStream &t)
|
||||
|
||||
void MingwMakefileGenerator::writeBuildRulesPart(QTextStream &t)
|
||||
{
|
||||
if (project->first("TEMPLATE") == "aux") {
|
||||
t << "first:" << 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");
|
||||
|
@ -70,7 +70,8 @@ NmakeMakefileGenerator::writeMakefile(QTextStream &t)
|
||||
}
|
||||
|
||||
if(project->first("TEMPLATE") == "app" ||
|
||||
project->first("TEMPLATE") == "lib") {
|
||||
project->first("TEMPLATE") == "lib" ||
|
||||
project->first("TEMPLATE") == "aux") {
|
||||
#if 0
|
||||
if(Option::mkfile::do_stub_makefile)
|
||||
return MakefileGenerator::writeStubMakefile(t);
|
||||
@ -341,6 +342,11 @@ void NmakeMakefileGenerator::writeImplicitRulesPart(QTextStream &t)
|
||||
|
||||
void NmakeMakefileGenerator::writeBuildRulesPart(QTextStream &t)
|
||||
{
|
||||
if (project->first("TEMPLATE") == "aux") {
|
||||
t << "first:" << endl;
|
||||
return;
|
||||
}
|
||||
|
||||
t << "first: all" << endl;
|
||||
t << "all: " << fileFixify(Option::output.fileName()) << " " << varGlue("ALL_DEPS"," "," "," ") << "$(DESTDIR_TARGET)" << endl << endl;
|
||||
t << "$(DESTDIR_TARGET): " << var("PRE_TARGETDEPS") << " $(OBJECTS) " << var("POST_TARGETDEPS");
|
||||
|
Loading…
x
Reference in New Issue
Block a user