summaryrefslogtreecommitdiff
path: root/qmake
diff options
context:
space:
mode:
authorMiikka Heikkinen <miikka.heikkinen@digia.com>2010-08-06 12:44:12 +0300
committerMiikka Heikkinen <miikka.heikkinen@digia.com>2010-08-06 14:33:34 +0300
commit5988d0dfcca6374f7bc06bad3ec9e3a3b8ebc22f (patch)
treebbac9315bc9f1d8fccf1b7f07fc2566302327cf8 /qmake
parent0210bbbd7bf8254be5f7f19f524068cd39fc34c2 (diff)
downloadqt4-tools-5988d0dfcca6374f7bc06bad3ec9e3a3b8ebc22f.tar.gz
Rename Symbian generated mmp/mk files to include target in filename
Mmp and mk files previously contained UID3 as unique identifier in the filename. However, this was not particularly useful for building subprojects in massive project trees such as Qt, as it was difficult to remember UID for each subproject. Now with intuitive naming of mmps, it is possible to build a subproject like this: sbs -c armv6_urel -p qtcore_dll.mmp Task-number: QTBUG-12715 Reviewed-by: Jason Barron
Diffstat (limited to 'qmake')
-rw-r--r--qmake/generators/symbian/symmake.cpp33
-rw-r--r--qmake/generators/symbian/symmake.h2
-rw-r--r--qmake/generators/symbian/symmake_abld.cpp9
-rw-r--r--qmake/generators/symbian/symmake_abld.h2
4 files changed, 19 insertions, 27 deletions
diff --git a/qmake/generators/symbian/symmake.cpp b/qmake/generators/symbian/symmake.cpp
index ff58270e40..cf6bd1388e 100644
--- a/qmake/generators/symbian/symmake.cpp
+++ b/qmake/generators/symbian/symmake.cpp
@@ -241,13 +241,8 @@ bool SymbianMakefileGenerator::writeMakefile(QTextStream &t)
writeMkFile(wrapperFileName, false);
- QString shortProFilename = project->projectFile();
- shortProFilename.replace(0, shortProFilename.lastIndexOf("/") + 1, QString(""));
- shortProFilename.replace(Option::pro_ext, QString(""));
-
- QString mmpFilename = Option::output_dir + QLatin1Char('/') + shortProFilename + QLatin1Char('_')
- + uid3 + Option::mmp_ext;
- writeMmpFile(mmpFilename, symbianLangCodes);
+ QString absoluteMmpFileName = Option::output_dir + QLatin1Char('/') + mmpFileName;
+ writeMmpFile(absoluteMmpFileName, symbianLangCodes);
if (targetType == TypeExe) {
if (!project->isActiveConfig("no_icon")) {
@@ -281,6 +276,15 @@ void SymbianMakefileGenerator::init()
project->values("MAKEFILE") += BLD_INF_FILENAME;
// .mmp
+ mmpFileName = fixedTarget;
+ if (targetType == TypeExe)
+ mmpFileName.append("_exe");
+ else if (targetType == TypeDll || targetType == TypePlugin)
+ mmpFileName.append("_dll");
+ else if (targetType == TypeLib)
+ mmpFileName.append("_lib");
+ mmpFileName.append(Option::mmp_ext);
+
initMmpVariables();
uid2 = project->first("TARGET.UID2");
@@ -480,7 +484,7 @@ void SymbianMakefileGenerator::writeMmpFileHeader(QTextStream &t)
t << QDateTime::currentDateTime().toString(Qt::ISODate) << endl;
t << "// This file is generated by qmake and should not be modified by the" << endl;
t << "// user." << endl;
- t << "// Name : " << escapeFilePath(fileFixify(project->projectFile().remove(project->projectFile().length() - 4, 4))) << Option::mmp_ext << endl;
+ t << "// Name : " << mmpFileName << endl;
t << "// ==============================================================================" << endl << endl;
}
@@ -890,8 +894,6 @@ void SymbianMakefileGenerator::writeBldInfContent(QTextStream &t, bool addDeploy
// Add includes of subdirs bld.inf files
- QString mmpfilename = escapeFilePath(fileFixify(project->projectFile()));
- mmpfilename = mmpfilename.replace(mmpfilename.lastIndexOf("."), 4, Option::mmp_ext);
QString currentPath = qmake_getpwd();
QDir directory(currentPath);
@@ -973,15 +975,8 @@ void SymbianMakefileGenerator::writeBldInfContent(QTextStream &t, bool addDeploy
t << endl << mmpTag << endl << endl;
writeBldInfMkFilePart(t, addDeploymentExtension);
- if (targetType != TypeSubdirs) {
- QString shortProFilename = project->projectFile();
- shortProFilename.replace(0, shortProFilename.lastIndexOf("/") + 1, QString(""));
- shortProFilename.replace(Option::pro_ext, QString(""));
-
- QString mmpFilename = shortProFilename + QString("_") + uid3 + Option::mmp_ext;
-
- t << mmpFilename << endl;
- }
+ if (targetType != TypeSubdirs)
+ t << mmpFileName << endl;
userItems = userBldInfRules.value(mmpTag);
foreach(QString item, userItems)
diff --git a/qmake/generators/symbian/symmake.h b/qmake/generators/symbian/symmake.h
index 9853790511..a1a8e887c1 100644
--- a/qmake/generators/symbian/symmake.h
+++ b/qmake/generators/symbian/symmake.h
@@ -59,6 +59,7 @@ class SymbianMakefileGenerator : public MakefileGenerator, public SymbianCommonG
protected:
QString platform;
QString uid2;
+ QString mmpFileName;
QMap<QString, QStringList> sources;
QMap<QString, QStringList> systeminclude;
QMap<QString, QStringList> library;
@@ -78,6 +79,7 @@ protected:
QString generateUID3();
void initMmpVariables();
+ void generateMmpFileName();
void handleMmpRulesOverrides(QString &checkString,
bool &inResourceBlock,
QStringList &restrictedMmpKeywords,
diff --git a/qmake/generators/symbian/symmake_abld.cpp b/qmake/generators/symbian/symmake_abld.cpp
index d60528bd2f..c896ac641d 100644
--- a/qmake/generators/symbian/symmake_abld.cpp
+++ b/qmake/generators/symbian/symmake_abld.cpp
@@ -70,10 +70,6 @@ SymbianAbldMakefileGenerator::~SymbianAbldMakefileGenerator() { }
void SymbianAbldMakefileGenerator::writeMkFile(const QString& wrapperFileName, bool deploymentOnly)
{
- QString gnuMakefileName = QLatin1String("Makefile_") + uid3;
- removeEpocSpecialCharacters(gnuMakefileName);
- gnuMakefileName.append(".mk");
-
QFile ft(gnuMakefileName);
if (ft.open(QIODevice::WriteOnly)) {
generatedFiles << ft.fileName();
@@ -471,9 +467,8 @@ void SymbianAbldMakefileGenerator::writeBldInfMkFilePart(QTextStream& t, bool ad
// Normally emulator deployment gets done via regular makefile, but since subdirs
// do not get that, special deployment only makefile is generated for them if needed.
if (targetType != TypeSubdirs || addDeploymentExtension) {
- QString gnuMakefileName = QLatin1String("Makefile_") + uid3;
- removeEpocSpecialCharacters(gnuMakefileName);
- gnuMakefileName.append(".mk");
+ gnuMakefileName = QLatin1String("Makefile_") + fileInfo(mmpFileName).completeBaseName()
+ + QLatin1String(".mk");
t << "gnumakefile " << gnuMakefileName << endl;
}
}
diff --git a/qmake/generators/symbian/symmake_abld.h b/qmake/generators/symbian/symmake_abld.h
index f998b28bde..214e0c5206 100644
--- a/qmake/generators/symbian/symmake_abld.h
+++ b/qmake/generators/symbian/symmake_abld.h
@@ -58,7 +58,7 @@ protected:
virtual void appendAbldTempDirs(QStringList& sysincspaths, QString includepath);
bool writeDeploymentTargets(QTextStream &t, bool isRom);
-
+ QString gnuMakefileName;
public:
SymbianAbldMakefileGenerator();