summaryrefslogtreecommitdiffstats
path: root/qmake/generators
diff options
context:
space:
mode:
Diffstat (limited to 'qmake/generators')
-rw-r--r--qmake/generators/mac/pbuilder_pbx.cpp1
-rw-r--r--qmake/generators/metamakefile.cpp1
-rw-r--r--qmake/generators/symbian/initprojectdeploy_symbian.cpp10
-rw-r--r--qmake/generators/symbian/symbian_makefile.h4
-rw-r--r--qmake/generators/symbian/symbiancommon.cpp4
-rw-r--r--qmake/generators/symbian/symmake.cpp4
-rw-r--r--qmake/generators/symbian/symmake_abld.cpp20
-rw-r--r--qmake/generators/symbian/symmake_sbsv2.cpp2
-rw-r--r--qmake/generators/unix/unixmake.cpp45
-rw-r--r--qmake/generators/unix/unixmake2.cpp28
-rw-r--r--qmake/generators/win32/msvc_nmake.cpp2
-rw-r--r--qmake/generators/win32/msvc_objectmodel.cpp2
-rw-r--r--qmake/generators/win32/msvc_vcproj.cpp12
-rw-r--r--qmake/generators/win32/winmakefile.cpp2
14 files changed, 102 insertions, 35 deletions
diff --git a/qmake/generators/mac/pbuilder_pbx.cpp b/qmake/generators/mac/pbuilder_pbx.cpp
index aa55f51..c659adb 100644
--- a/qmake/generators/mac/pbuilder_pbx.cpp
+++ b/qmake/generators/mac/pbuilder_pbx.cpp
@@ -167,6 +167,7 @@ ProjectBuilderMakefileGenerator::writeSubDirs(QTextStream &t)
}
if(tmp_proj.read(fn)) {
if(Option::debug_level) {
+ debug_msg(1, "Dumping all variables:");
QMap<QString, QStringList> &vars = tmp_proj.variables();
for(QMap<QString, QStringList>::Iterator it = vars.begin();
it != vars.end(); ++it) {
diff --git a/qmake/generators/metamakefile.cpp b/qmake/generators/metamakefile.cpp
index e98831d..df05550 100644
--- a/qmake/generators/metamakefile.cpp
+++ b/qmake/generators/metamakefile.cpp
@@ -217,6 +217,7 @@ BuildsMetaMakefileGenerator::write(const QString &oldpwd)
// debugging
if(Option::debug_level) {
+ debug_msg(1, "Dumping all variables:");
QMap<QString, QStringList> &vars = project->variables();
for(QMap<QString, QStringList>::Iterator it = vars.begin(); it != vars.end(); ++it) {
if(!it.key().startsWith(".") && !it.value().isEmpty())
diff --git a/qmake/generators/symbian/initprojectdeploy_symbian.cpp b/qmake/generators/symbian/initprojectdeploy_symbian.cpp
index 5a6f66f..eb45b10 100644
--- a/qmake/generators/symbian/initprojectdeploy_symbian.cpp
+++ b/qmake/generators/symbian/initprojectdeploy_symbian.cpp
@@ -59,7 +59,12 @@
static QString fixPathToEpocOS(const QString &src)
{
QString ret = Option::fixPathToTargetOS(src);
- return ret.replace('/', '\\');
+
+ bool pathHasDriveLetter = false;
+ if (ret.size() > 1)
+ pathHasDriveLetter = (ret.at(1) == QLatin1Char(':'));
+
+ return pathHasDriveLetter ? ret.replace('/', '\\') : QDir::toNativeSeparators(ret);
}
static bool isPlugin(const QFileInfo& info, const QString& devicePath)
@@ -250,7 +255,8 @@ void initProjectDeploySymbian(QMakeProject* project,
QStringList flags = project->values(item + ".flags");
- foreach(QString source, project->values(item + ".sources")) {
+ // ### Qt 5: remove .sources, inconsistent with INSTALLS
+ foreach(QString source, project->values(item + ".sources") + project->values(item + ".files")) {
source = Option::fixPathToLocalOS(source);
QString nameFilter;
QFileInfo info(source);
diff --git a/qmake/generators/symbian/symbian_makefile.h b/qmake/generators/symbian/symbian_makefile.h
index 94f0145..63cede2 100644
--- a/qmake/generators/symbian/symbian_makefile.h
+++ b/qmake/generators/symbian/symbian_makefile.h
@@ -72,7 +72,9 @@ public:
} else {
const QStringList deployments = this->project->values("DEPLOYMENT");
for (int i = 0; i < deployments.count(); ++i) {
- if (!this->project->values(deployments.at(i) + ".sources").isEmpty()) {
+ // ### Qt 5: remove .sources, inconsistent with INSTALLS
+ if (!this->project->values(deployments.at(i) + ".sources").isEmpty() ||
+ !this->project->values(deployments.at(i) + ".files").isEmpty()) {
generatePkg = true;
break;
}
diff --git a/qmake/generators/symbian/symbiancommon.cpp b/qmake/generators/symbian/symbiancommon.cpp
index 0938b58..9d4f27e 100644
--- a/qmake/generators/symbian/symbiancommon.cpp
+++ b/qmake/generators/symbian/symbiancommon.cpp
@@ -699,7 +699,7 @@ void SymbianCommonGenerator::readRssRules(QString &numberOfIcons,
newValues << itemList.join("\n");
}
}
- // Verify thet there is exactly one value in RSS_TAG_NBROFICONS
+ // Verify that there is exactly one value in RSS_TAG_NBROFICONS
if (newKey == RSS_TAG_NBROFICONS) {
if (newValues.count() == 1) {
numberOfIcons = newValues[0];
@@ -708,7 +708,7 @@ void SymbianCommonGenerator::readRssRules(QString &numberOfIcons,
RSS_RULES_BASE, RSS_TAG_NBROFICONS);
continue;
}
- // Verify thet there is exactly one value in RSS_TAG_ICONFILE
+ // Verify that there is exactly one value in RSS_TAG_ICONFILE
} else if (newKey == RSS_TAG_ICONFILE) {
if (newValues.count() == 1) {
iconFile = newValues[0];
diff --git a/qmake/generators/symbian/symmake.cpp b/qmake/generators/symbian/symmake.cpp
index 09a3fc8..0d63cdf 100644
--- a/qmake/generators/symbian/symmake.cpp
+++ b/qmake/generators/symbian/symmake.cpp
@@ -197,7 +197,9 @@ bool SymbianMakefileGenerator::writeMakefile(QTextStream &t)
generatePkg = true;
} else {
foreach(QString item, project->values("DEPLOYMENT")) {
- if (!project->values(item + ".sources").isEmpty()) {
+ // ### Qt 5: remove .sources, inconsistent with INSTALLS
+ if (!project->values(item + ".sources").isEmpty() ||
+ !project->values(item + ".files").isEmpty()) {
generatePkg = true;
break;
}
diff --git a/qmake/generators/symbian/symmake_abld.cpp b/qmake/generators/symbian/symmake_abld.cpp
index 7416cbe..f895109 100644
--- a/qmake/generators/symbian/symmake_abld.cpp
+++ b/qmake/generators/symbian/symmake_abld.cpp
@@ -205,8 +205,11 @@ void SymbianAbldMakefileGenerator::writeWrapperMakefile(QFile& wrapperFile, bool
#ifdef Q_OS_WIN32
t << "XCOPY = xcopy /d /f /h /r /y /i" << endl;
t << "ABLD = ABLD.BAT" << endl;
+#elif defined(Q_OS_MAC)
+ t << "XCOPY = cp -R -v" << endl;
+ t << "ABLD = abld" << endl;
#else
- t << "XCOPY = cp -u -v" << endl;
+ t << "XCOPY = cp -R -u -v" << endl;
t << "ABLD = abld" << endl;
#endif
t << "DEBUG_PLATFORMS = " << debugPlatforms.join(" ") << endl;
@@ -427,7 +430,8 @@ bool SymbianAbldMakefileGenerator::writeDeploymentTargets(QTextStream &t, bool i
t << WINSCW_DEPLOYMENT_TARGET ":" << endl;
QString remoteTestPath = epocRoot()
- + QLatin1String(isRom ? "epoc32\\data\\z\\private\\" : "epoc32\\winscw\\c\\private\\")
+ + QDir::toNativeSeparators(QLatin1String(isRom ? "epoc32/data/z/private/"
+ : "epoc32/winscw/c/private/"))
+ privateDirUid;
DeploymentList depList;
@@ -439,11 +443,21 @@ bool SymbianAbldMakefileGenerator::writeDeploymentTargets(QTextStream &t, bool i
t << "\t-echo Deploying changed files..." << endl;
for (int i = 0; i < depList.size(); ++i) {
+#ifdef Q_OS_WIN32
// Xcopy prompts for selecting file or directory if target doesn't exist,
// and doesn't provide switch to force file selection. It does provide dir forcing, though,
// so strip the last part of the destination.
t << "\t-$(XCOPY) \"" << depList.at(i).from << "\" \""
<< depList.at(i).to.left(depList.at(i).to.lastIndexOf("\\") + 1) << "\"" << endl;
+#else
+ QString dirExists = var("QMAKE_CHK_DIR_EXISTS");
+ QString mkdir = var("QMAKE_MKDIR");
+ QString dir = QFileInfo(depList.at(i).to).dir().path();
+ t << "\t-@ " << dirExists << " \"" << dir << "\" || "
+ << mkdir << " \"" << dir << "\"" << endl;
+ t << "\t-$(XCOPY) \"" << QDir::toNativeSeparators(depList.at(i).from) << "\" \""
+ << QDir::toNativeSeparators(depList.at(i).to) << "\"" << endl;
+#endif
}
t << endl;
@@ -455,7 +469,7 @@ bool SymbianAbldMakefileGenerator::writeDeploymentTargets(QTextStream &t, bool i
QStringList cleanList;
for (int i = 0; i < depList.size(); ++i) {
- cleanList.append(depList.at(i).to);
+ cleanList.append(QDir::toNativeSeparators(depList.at(i).to));
}
generateCleanCommands(t, cleanList, "$(DEL_FILE)", "", "", "");
diff --git a/qmake/generators/symbian/symmake_sbsv2.cpp b/qmake/generators/symbian/symmake_sbsv2.cpp
index 32c31ee..d650e08 100644
--- a/qmake/generators/symbian/symmake_sbsv2.cpp
+++ b/qmake/generators/symbian/symmake_sbsv2.cpp
@@ -120,7 +120,7 @@ void SymbianSbsv2MakefileGenerator::findInstalledCompilerVersions(const QString
&& fileInfo(matcher.cap(matcher.captureCount())).exists()) {
// First capture (index 0) is the whole match, which is skipped.
// Next n captures are version numbers, which are interesting.
- // Final capture is the env var value, which we alrady used, so that is skipped, too.
+ // Final capture is the env var value, which we already used, so that is skipped, too.
int capture = 1;
int finalCapture = matcher.captureCount() - 1;
QString version = versionPrefix;
diff --git a/qmake/generators/unix/unixmake.cpp b/qmake/generators/unix/unixmake.cpp
index 71a6061..43543a1 100644
--- a/qmake/generators/unix/unixmake.cpp
+++ b/qmake/generators/unix/unixmake.cpp
@@ -206,6 +206,33 @@ UnixMakefileGenerator::init()
// icc style
pchFlags = pchFlags.replace("${QMAKE_PCH_OUTPUT}",
pchBaseName + project->first("QMAKE_PCH_OUTPUT_EXT"));
+ } else {
+ // gcc style (including clang_pch_style)
+ QString headerPrefix = project->first("QMAKE_PRECOMP_PREFIX");
+ QString headerSuffix;
+ if (project->isActiveConfig("clang_pch_style"))
+ headerSuffix = project->first("QMAKE_PCH_OUTPUT_EXT");
+ else
+ pchBaseName += project->first("QMAKE_PCH_OUTPUT_EXT");
+
+ pchBaseName += Option::dir_sep;
+ QString pchOutputFile;
+
+ if(comps[i] == "C") {
+ pchOutputFile = "c";
+ } else if(comps[i] == "CXX") {
+ pchOutputFile = "c++";
+ } else if(project->isActiveConfig("objective_c")) {
+ if(comps[i] == "OBJC")
+ pchOutputFile = "objective-c";
+ else if(comps[i] == "OBJCXX")
+ pchOutputFile = "objective-c++";
+ }
+
+ if(!pchOutputFile.isEmpty()) {
+ pchFlags = pchFlags.replace("${QMAKE_PCH_OUTPUT}",
+ pchBaseName + pchOutputFile + headerSuffix);
+ }
}
if (!pchFlags.isEmpty())
@@ -379,7 +406,9 @@ QStringList
QString header_prefix;
if(!project->isEmpty("PRECOMPILED_DIR"))
header_prefix = project->first("PRECOMPILED_DIR");
- header_prefix += project->first("QMAKE_ORIG_TARGET") + project->first("QMAKE_PCH_OUTPUT_EXT");
+ header_prefix += project->first("QMAKE_ORIG_TARGET");
+ if (!project->isActiveConfig("clang_pch_style"))
+ header_prefix += project->first("QMAKE_PCH_OUTPUT_EXT");
if (project->isActiveConfig("icc_pch_style")) {
// icc style
for(QStringList::Iterator it = Option::cpp_ext.begin(); it != Option::cpp_ext.end(); ++it) {
@@ -389,23 +418,25 @@ QStringList
}
}
} else {
- // gcc style
+ // gcc style (including clang_pch_style)
+ QString header_suffix = project->isActiveConfig("clang_pch_style")
+ ? project->first("QMAKE_PCH_OUTPUT_EXT") : "";
header_prefix += Option::dir_sep + project->first("QMAKE_PRECOMP_PREFIX");
for(QStringList::Iterator it = Option::c_ext.begin(); it != Option::c_ext.end(); ++it) {
if(file.endsWith(*it)) {
if(!project->isEmpty("QMAKE_CFLAGS_PRECOMPILE")) {
- QString precomp_c_h = header_prefix + "c";
+ QString precomp_c_h = header_prefix + "c" + header_suffix;
if(!ret.contains(precomp_c_h))
ret += precomp_c_h;
}
if(project->isActiveConfig("objective_c")) {
if(!project->isEmpty("QMAKE_OBJCFLAGS_PRECOMPILE")) {
- QString precomp_objc_h = header_prefix + "objective-c";
+ QString precomp_objc_h = header_prefix + "objective-c" + header_suffix;
if(!ret.contains(precomp_objc_h))
ret += precomp_objc_h;
}
if(!project->isEmpty("QMAKE_OBJCXXFLAGS_PRECOMPILE")) {
- QString precomp_objcpp_h = header_prefix + "objective-c++";
+ QString precomp_objcpp_h = header_prefix + "objective-c++" + header_suffix;
if(!ret.contains(precomp_objcpp_h))
ret += precomp_objcpp_h;
}
@@ -416,13 +447,13 @@ QStringList
for(QStringList::Iterator it = Option::cpp_ext.begin(); it != Option::cpp_ext.end(); ++it) {
if(file.endsWith(*it)) {
if(!project->isEmpty("QMAKE_CXXFLAGS_PRECOMPILE")) {
- QString precomp_cpp_h = header_prefix + "c++";
+ QString precomp_cpp_h = header_prefix + "c++" + header_suffix;
if(!ret.contains(precomp_cpp_h))
ret += precomp_cpp_h;
}
if(project->isActiveConfig("objective_c")) {
if(!project->isEmpty("QMAKE_OBJCXXFLAGS_PRECOMPILE")) {
- QString precomp_objcpp_h = header_prefix + "objective-c++";
+ QString precomp_objcpp_h = header_prefix + "objective-c++" + header_suffix;
if(!ret.contains(precomp_objcpp_h))
ret += precomp_objcpp_h;
}
diff --git a/qmake/generators/unix/unixmake2.cpp b/qmake/generators/unix/unixmake2.cpp
index d16cd6b..7c68316 100644
--- a/qmake/generators/unix/unixmake2.cpp
+++ b/qmake/generators/unix/unixmake2.cpp
@@ -835,7 +835,9 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
if(!project->isEmpty("PRECOMPILED_DIR"))
precomph_out_dir = project->first("PRECOMPILED_DIR");
- precomph_out_dir += project->first("QMAKE_ORIG_TARGET") + project->first("QMAKE_PCH_OUTPUT_EXT");
+ precomph_out_dir += project->first("QMAKE_ORIG_TARGET");
+ if (!project->isActiveConfig("clang_pch_style"))
+ precomph_out_dir += project->first("QMAKE_PCH_OUTPUT_EXT");
if (project->isActiveConfig("icc_pch_style")) {
// icc style
@@ -849,19 +851,22 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
precomp_files << precomph_out_dir << sourceFile << objectFile;
} else {
- // gcc style
+ // gcc style (including clang_pch_style)
precomph_out_dir += Option::dir_sep;
QString header_prefix = project->first("QMAKE_PRECOMP_PREFIX");
+ QString header_suffix = project->isActiveConfig("clang_pch_style")
+ ? project->first("QMAKE_PCH_OUTPUT_EXT") : "";
+
if(!project->isEmpty("QMAKE_CFLAGS_PRECOMPILE"))
- precomp_files += precomph_out_dir + header_prefix + "c";
+ precomp_files += precomph_out_dir + header_prefix + "c" + header_suffix;
if(!project->isEmpty("QMAKE_CXXFLAGS_PRECOMPILE"))
- precomp_files += precomph_out_dir + header_prefix + "c++";
+ precomp_files += precomph_out_dir + header_prefix + "c++" + header_suffix;
if(project->isActiveConfig("objective_c")) {
if(!project->isEmpty("QMAKE_OBJCFLAGS_PRECOMPILE"))
- precomp_files += precomph_out_dir + header_prefix + "objective-c";
+ precomp_files += precomph_out_dir + header_prefix + "objective-c" + header_suffix;
if(!project->isEmpty("QMAKE_OBJCXXFLAGS_PRECOMPILE"))
- precomp_files += precomph_out_dir + header_prefix + "objective-c++";
+ precomp_files += precomph_out_dir + header_prefix + "objective-c++" + header_suffix;
}
}
t << "-$(DEL_FILE) " << precomp_files.join(" ") << "\n\t";
@@ -930,7 +935,9 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
QString pchOutput;
if(!project->isEmpty("PRECOMPILED_DIR"))
pchOutput = project->first("PRECOMPILED_DIR");
- pchOutput += pchBaseName + project->first("QMAKE_PCH_OUTPUT_EXT");
+ pchOutput += pchBaseName;
+ if (!project->isActiveConfig("clang_pch_style"))
+ pchOutput += project->first("QMAKE_PCH_OUTPUT_EXT");
if (project->isActiveConfig("icc_pch_style")) {
// icc style
@@ -943,9 +950,10 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
pchFlags = pchFlags.replace("${QMAKE_PCH_TEMP_SOURCE}", sourceFile)
.replace("${QMAKE_PCH_TEMP_OBJECT}", objectFile);
} else {
- // gcc style
+ // gcc style (including clang_pch_style)
QString header_prefix = project->first("QMAKE_PRECOMP_PREFIX");
-
+ QString header_suffix = project->isActiveConfig("clang_pch_style")
+ ? project->first("QMAKE_PCH_OUTPUT_EXT") : "";
pchOutput += Option::dir_sep;
QString pchOutputDir = pchOutput, pchOutputFile;
@@ -961,7 +969,7 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
}
if(pchOutputFile.isEmpty())
continue;
- pchOutput += header_prefix + pchOutputFile;
+ pchOutput += header_prefix + pchOutputFile + header_suffix;
t << pchOutput << ": " << pchInput << " " << findDependencies(pchInput).join(" \\\n\t\t")
<< "\n\t" << mkdir_p_asstring(pchOutputDir);
diff --git a/qmake/generators/win32/msvc_nmake.cpp b/qmake/generators/win32/msvc_nmake.cpp
index d32b888..0678d86 100644
--- a/qmake/generators/win32/msvc_nmake.cpp
+++ b/qmake/generators/win32/msvc_nmake.cpp
@@ -215,7 +215,7 @@ void NmakeMakefileGenerator::init()
project->values("QMAKE_CLEAN").append(project->first("DESTDIR") + project->first("TARGET") + version + ".exp");
}
if(project->isActiveConfig("debug")) {
- project->values("QMAKE_CLEAN").append(project->first("DESTDIR") + project->first("TARGET") + version + ".pdb");
+ project->values("QMAKE_DISTCLEAN").append(project->first("DESTDIR") + project->first("TARGET") + version + ".pdb");
project->values("QMAKE_CLEAN").append(project->first("DESTDIR") + project->first("TARGET") + version + ".ilk");
project->values("QMAKE_CLEAN").append("vc*.pdb");
project->values("QMAKE_CLEAN").append("vc*.idb");
diff --git a/qmake/generators/win32/msvc_objectmodel.cpp b/qmake/generators/win32/msvc_objectmodel.cpp
index b20d2b7..834e5fd 100644
--- a/qmake/generators/win32/msvc_objectmodel.cpp
+++ b/qmake/generators/win32/msvc_objectmodel.cpp
@@ -2288,7 +2288,7 @@ bool VCFilter::addExtraCompiler(const VCFilterFile &info)
// Output in info.additionalFile -----------
if (!CustomBuildTool.Description.isEmpty())
- CustomBuildTool.Description += " & ";
+ CustomBuildTool.Description += ", ";
CustomBuildTool.Description += cmd_name;
CustomBuildTool.CommandLine += VCToolBase::fixCommandLine(cmd.trimmed());
int space = cmd.indexOf(' ');
diff --git a/qmake/generators/win32/msvc_vcproj.cpp b/qmake/generators/win32/msvc_vcproj.cpp
index 06b726f..fbaa6c2 100644
--- a/qmake/generators/win32/msvc_vcproj.cpp
+++ b/qmake/generators/win32/msvc_vcproj.cpp
@@ -459,6 +459,7 @@ void VcprojGenerator::writeSubDirs(QTextStream &t)
tmp_vcproj.setProjectFile(&tmp_proj);
Option::qmake_mode = old_mode;
if(Option::debug_level) {
+ debug_msg(1, "Dumping all variables:");
QMap<QString, QStringList> &vars = tmp_proj.variables();
for(QMap<QString, QStringList>::Iterator it = vars.begin();
it != vars.end(); ++it) {
@@ -1174,7 +1175,8 @@ void VcprojGenerator::initDeploymentTool()
devicePath = Option::fixPathToLocalOS(QDir::cleanPath(targetPath + QLatin1Char('\\') + devicePath));
}
// foreach d in item.sources
- foreach(QString source, project->values(item + ".sources")) {
+ // ### Qt 5: remove .sources, inconsistent with INSTALLS
+ foreach(QString source, project->values(item + ".sources") + project->values(item + ".files")) {
QString itemDevicePath = devicePath;
source = Option::fixPathToLocalOS(source);
QString nameFilter;
@@ -1551,10 +1553,10 @@ QString VcprojGenerator::fixFilename(QString ofile) const
if(slashfind == -1) {
ofile = ofile.replace('-', '_');
} else {
- int hypenfind = ofile.indexOf('-', slashfind);
- while (hypenfind != -1 && slashfind < hypenfind) {
- ofile = ofile.replace(hypenfind, 1, '_');
- hypenfind = ofile.indexOf('-', hypenfind + 1);
+ int hyphenfind = ofile.indexOf('-', slashfind);
+ while (hyphenfind != -1 && slashfind < hyphenfind) {
+ ofile = ofile.replace(hyphenfind, 1, '_');
+ hyphenfind = ofile.indexOf('-', hyphenfind + 1);
}
}
return ofile;
diff --git a/qmake/generators/win32/winmakefile.cpp b/qmake/generators/win32/winmakefile.cpp
index 58f21cb..ddfe399 100644
--- a/qmake/generators/win32/winmakefile.cpp
+++ b/qmake/generators/win32/winmakefile.cpp
@@ -651,7 +651,7 @@ void Win32MakefileGenerator::writeStandardParts(QTextStream &t)
t << "DIST = " << varList("DISTFILES") << endl;
t << "QMAKE_TARGET = " << var("QMAKE_ORIG_TARGET") << endl;
- // The comment is important to maintain variable compatability with Unix
+ // The comment is important to maintain variable compatibility with Unix
// Makefiles, while not interpreting a trailing-slash as a linebreak
t << "DESTDIR = " << escapeFilePath(destDir) << " #avoid trailing-slash linebreak" << endl;
t << "TARGET = " << escapeFilePath(target) << endl;