qmake: prepare TARGET/VERSION/DISTFILES for sub targets
This is a preparation step for 'make dist' target for subdir projects. UnixMakefileGenerator needs these variables while extending writeSubTargets() and writeDefaultVariables() for 'make dist'. Partial cherry-pick of https://qt.gitorious.org/qt/jpnurmi-qt/commit/8c4ef19 Task-number: QTBUG-21910 Change-Id: I02a616a98448bc3041ef0f4fd034bfb4c2199e41 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
This commit is contained in:
parent
9d4d18a3a8
commit
24634002e3
@ -94,6 +94,25 @@ UnixMakefileGenerator::init()
|
||||
if(project->isEmpty("QMAKE_SYMBOLIC_LINK"))
|
||||
project->values("QMAKE_SYMBOLIC_LINK").append("ln -f -s");
|
||||
|
||||
if (!project->isEmpty("TARGET"))
|
||||
project->values("TARGET") = escapeFilePaths(project->values("TARGET"));
|
||||
project->values("QMAKE_ORIG_TARGET") = project->values("TARGET");
|
||||
|
||||
//version handling
|
||||
if (project->isEmpty("VERSION")) {
|
||||
project->values("VERSION").append(
|
||||
"1.0." + (project->isEmpty("VER_PAT") ? QString("0") : project->first("VER_PAT")));
|
||||
}
|
||||
QStringList l = project->first("VERSION").toQString().split('.');
|
||||
l << "0" << "0"; //make sure there are three
|
||||
project->values("VER_MAJ").append(l[0]);
|
||||
project->values("VER_MIN").append(l[1]);
|
||||
project->values("VER_PAT").append(l[2]);
|
||||
|
||||
project->values("DISTFILES") += project->projectFile();
|
||||
if (!project->isEmpty("QMAKE_INTERNAL_INCLUDED_FILES"))
|
||||
project->values("DISTFILES") += project->values("QMAKE_INTERNAL_INCLUDED_FILES");
|
||||
|
||||
/* this should probably not be here, but I'm using it to wrap the .t files */
|
||||
if(project->first("TEMPLATE") == "app")
|
||||
project->values("QMAKE_APP_FLAG").append("1");
|
||||
@ -106,10 +125,6 @@ UnixMakefileGenerator::init()
|
||||
return; /* subdirs is done */
|
||||
}
|
||||
|
||||
if (!project->isEmpty("TARGET"))
|
||||
project->values("TARGET") = escapeFilePaths(project->values("TARGET"));
|
||||
|
||||
project->values("QMAKE_ORIG_TARGET") = project->values("TARGET");
|
||||
project->values("QMAKE_ORIG_DESTDIR") = project->values("DESTDIR");
|
||||
project->values("QMAKE_LIBS") += escapeFilePaths(project->values("LIBS"));
|
||||
project->values("QMAKE_LIBS_PRIVATE") += escapeFilePaths(project->values("LIBS_PRIVATE"));
|
||||
@ -304,10 +319,6 @@ UnixMakefileGenerator::init()
|
||||
project->values("QMAKE_BUNDLE_LOCATION").clear();
|
||||
}
|
||||
|
||||
if(!project->isEmpty("QMAKE_INTERNAL_INCLUDED_FILES"))
|
||||
project->values("DISTFILES") += project->values("QMAKE_INTERNAL_INCLUDED_FILES");
|
||||
project->values("DISTFILES") += project->projectFile();
|
||||
|
||||
init2();
|
||||
project->values("QMAKE_INTERNAL_PRL_LIBS") << "QMAKE_LIBS";
|
||||
if(!project->isEmpty("QMAKE_MAX_FILES_PER_AR")) {
|
||||
|
@ -1015,16 +1015,6 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
|
||||
|
||||
void UnixMakefileGenerator::init2()
|
||||
{
|
||||
//version handling
|
||||
if(project->isEmpty("VERSION"))
|
||||
project->values("VERSION").append("1.0." +
|
||||
(project->isEmpty("VER_PAT") ? QString("0") :
|
||||
project->first("VER_PAT")));
|
||||
QStringList l = project->first("VERSION").toQString().split('.');
|
||||
l << "0" << "0"; //make sure there are three
|
||||
project->values("VER_MAJ").append(l[0]);
|
||||
project->values("VER_MIN").append(l[1]);
|
||||
project->values("VER_PAT").append(l[2]);
|
||||
if(project->isEmpty("QMAKE_FRAMEWORK_VERSION"))
|
||||
project->values("QMAKE_FRAMEWORK_VERSION").append(project->values("VER_MAJ").first());
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user