summaryrefslogtreecommitdiffstats
path: root/qmake/generators
diff options
context:
space:
mode:
Diffstat (limited to 'qmake/generators')
-rw-r--r--qmake/generators/makefile.cpp41
-rw-r--r--qmake/generators/symbian/symbiancommon.cpp14
-rw-r--r--qmake/generators/win32/msvc_objectmodel.cpp3
-rw-r--r--qmake/generators/win32/winmakefile.cpp9
4 files changed, 54 insertions, 13 deletions
diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp
index 49fc3e7..6214d33 100644
--- a/qmake/generators/makefile.cpp
+++ b/qmake/generators/makefile.cpp
@@ -466,14 +466,37 @@ MakefileGenerator::init()
if(!project->isEmpty("QMAKE_SUBSTITUTES")) {
const QStringList &subs = v["QMAKE_SUBSTITUTES"];
for(int i = 0; i < subs.size(); ++i) {
- if(!subs.at(i).endsWith(".in")) {
- warn_msg(WarnLogic, "Substitute '%s' does not end with '.in'",
- subs.at(i).toLatin1().constData());
- continue;
+ QString inn = subs.at(i) + ".input", outn = subs.at(i) + ".output";
+ if (v.contains(inn) || v.contains(outn)) {
+ if (!v.contains(inn) || !v.contains(outn)) {
+ warn_msg(WarnLogic, "Substitute '%s' has only one of .input and .output",
+ subs.at(i).toLatin1().constData());
+ continue;
+ }
+ const QStringList &tinn = v[inn], &toutn = v[outn];
+ if (tinn.length() != 1) {
+ warn_msg(WarnLogic, "Substitute '%s.input' does not have exactly one value",
+ subs.at(i).toLatin1().constData());
+ continue;
+ }
+ if (toutn.length() != 1) {
+ warn_msg(WarnLogic, "Substitute '%s.output' does not have exactly one value",
+ subs.at(i).toLatin1().constData());
+ continue;
+ }
+ inn = tinn.first();
+ outn = toutn.first();
+ } else {
+ inn = subs.at(i);
+ if(!inn.endsWith(".in")) {
+ warn_msg(WarnLogic, "Substitute '%s' does not end with '.in'",
+ inn.toLatin1().constData());
+ continue;
+ }
+ outn = inn.left(inn.length()-3);
}
- QFile in(fileFixify(subs.at(i)));
- QFile out(fileFixify(subs.at(i).left(subs.at(i).length()-3),
- qmake_getpwd(), Option::output_dir));
+ QFile in(fileFixify(inn));
+ QFile out(fileFixify(outn, qmake_getpwd(), Option::output_dir));
if(in.open(QFile::ReadOnly)) {
QString contents;
QStack<int> state;
@@ -528,7 +551,7 @@ MakefileGenerator::init()
if(out.exists() && out.open(QFile::ReadOnly)) {
QString old = QString::fromUtf8(out.readAll());
if(contents == old) {
- v["QMAKE_INTERNAL_INCLUDED_FILES"].append(subs.at(i));
+ v["QMAKE_INTERNAL_INCLUDED_FILES"].append(in.fileName());
continue;
}
out.close();
@@ -540,7 +563,7 @@ MakefileGenerator::init()
}
mkdir(QFileInfo(out).absolutePath());
if(out.open(QFile::WriteOnly)) {
- v["QMAKE_INTERNAL_INCLUDED_FILES"].append(subs.at(i));
+ v["QMAKE_INTERNAL_INCLUDED_FILES"].append(in.fileName());
out.write(contents.toUtf8());
} else {
warn_msg(WarnLogic, "Cannot open substitute for output '%s'",
diff --git a/qmake/generators/symbian/symbiancommon.cpp b/qmake/generators/symbian/symbiancommon.cpp
index d124b02..155dbc9 100644
--- a/qmake/generators/symbian/symbiancommon.cpp
+++ b/qmake/generators/symbian/symbiancommon.cpp
@@ -275,6 +275,20 @@ void SymbianCommonGenerator::generatePkgFile(const QString &iconFile, bool epocB
if (success)
applicationVersion = QString("%1,%2,%3").arg(major).arg(minor).arg(patch);
+ // Append package build version number if it is set
+ QString pkgBuildVersion = project->first("DEPLOYMENT.pkg_build_version");
+ if (!pkgBuildVersion.isEmpty()) {
+ success = false;
+ uint build = pkgBuildVersion.toUInt(&success);
+ if (success && build < 100) {
+ if (pkgBuildVersion.size() == 1)
+ pkgBuildVersion.prepend(QLatin1Char('0'));
+ applicationVersion.append(pkgBuildVersion);
+ } else {
+ fprintf(stderr, "Warning: Invalid DEPLOYMENT.pkg_build_version (%s), must be a number between 0 - 99\n", qPrintable(pkgBuildVersion));
+ }
+ }
+
// Package header
QString sisHeader = "; SIS header: name, uid, version\n#{\"%1\"},(%2),%3\n\n";
QString visualTarget = generator->escapeFilePath(project->first("TARGET"));
diff --git a/qmake/generators/win32/msvc_objectmodel.cpp b/qmake/generators/win32/msvc_objectmodel.cpp
index e001884..b1de302 100644
--- a/qmake/generators/win32/msvc_objectmodel.cpp
+++ b/qmake/generators/win32/msvc_objectmodel.cpp
@@ -1499,7 +1499,8 @@ bool VCLinkerTool::parseOption(const char* option)
break;
case 0x0034160: // /MAP[:filename]
GenerateMapFile = _True;
- MapFileName = option+5;
+ if (option[4] == ':')
+ MapFileName = option+5;
break;
case 0x164e1ef: // /MAPINFO:{EXPORTS|LINES}
if(*(option+9) == 'E')
diff --git a/qmake/generators/win32/winmakefile.cpp b/qmake/generators/win32/winmakefile.cpp
index 64aaf34..ecb20c7 100644
--- a/qmake/generators/win32/winmakefile.cpp
+++ b/qmake/generators/win32/winmakefile.cpp
@@ -472,10 +472,13 @@ void Win32MakefileGenerator::processRcFileVar()
resFile.replace(".rc", Option::res_ext);
project->values("RES_FILE").prepend(fileInfo(resFile).fileName());
if (!project->values("OBJECTS_DIR").isEmpty()) {
- if(project->isActiveConfig("staticlib"))
- project->values("RES_FILE").first().prepend(fileInfo(project->values("DESTDIR").first()).absoluteFilePath() + Option::dir_sep);
+ QString resDestDir;
+ if (project->isActiveConfig("staticlib"))
+ resDestDir = fileInfo(project->first("DESTDIR")).absoluteFilePath();
else
- project->values("RES_FILE").first().prepend(project->values("OBJECTS_DIR").first() + Option::dir_sep);
+ resDestDir = project->first("OBJECTS_DIR");
+ resDestDir.append(Option::dir_sep);
+ project->values("RES_FILE").first().prepend(resDestDir);
}
project->values("RES_FILE").first() = Option::fixPathToTargetOS(project->values("RES_FILE").first(), false, false);
project->values("POST_TARGETDEPS") += project->values("RES_FILE");