summaryrefslogtreecommitdiffstats
path: root/qmake
diff options
context:
space:
mode:
authorMiikka Heikkinen <miikka.heikkinen@digia.com>2009-04-27 09:06:43 (GMT)
committerMiikka Heikkinen <miikka.heikkinen@digia.com>2009-04-27 09:06:43 (GMT)
commitd17fb5cad878d1dbe144cfd7f02c6cb4d3db2677 (patch)
tree261ca3ad03972da54e1e4df2ef70d79015edc9aa /qmake
parente26f32ef8e1480f80e362059cc03c4b5a7fb92e9 (diff)
parent001d46dffc6240da27634ef9e27b47f768587253 (diff)
downloadQt-d17fb5cad878d1dbe144cfd7f02c6cb4d3db2677.zip
Qt-d17fb5cad878d1dbe144cfd7f02c6cb4d3db2677.tar.gz
Qt-d17fb5cad878d1dbe144cfd7f02c6cb4d3db2677.tar.bz2
Merge branch 'master' of git@scm.dev.troll.no:qt/qt-s60-public
Diffstat (limited to 'qmake')
-rw-r--r--qmake/Makefile.win323
-rw-r--r--qmake/generators/makefile.cpp16
-rw-r--r--qmake/generators/makefile.h6
-rw-r--r--qmake/generators/metamakefile.cpp2
-rw-r--r--qmake/generators/symbian/symmake_abld.h2
-rw-r--r--qmake/generators/symbian/symmake_sbsv2.h2
-rw-r--r--qmake/generators/win32/msvc_nmake.cpp6
-rw-r--r--qmake/generators/win32/msvc_vcproj.cpp2
-rw-r--r--qmake/generators/win32/winmakefile.cpp18
-rw-r--r--qmake/project.cpp2
10 files changed, 32 insertions, 27 deletions
diff --git a/qmake/Makefile.win32 b/qmake/Makefile.win32
index e5c83d8..d8b4056 100644
--- a/qmake/Makefile.win32
+++ b/qmake/Makefile.win32
@@ -232,6 +232,7 @@ clean::
-del symmake.obj
-del symmake_abld.obj
-del symmake_sbsv2.obj
+ -del initprojectdeploy_symbian.obj
-del pbuilder_pbx.obj
-del qnumeric.obj \
-del qscriptasm.obj \
@@ -462,7 +463,7 @@ symmake_abld.obj: $(SOURCE_PATH)/qmake/generators/symbian/symmake_abld.cpp
symmake_sbsv2.obj: $(SOURCE_PATH)/qmake/generators/symbian/symmake_sbsv2.cpp
$(CXX) $(CXXFLAGS) generators/symbian/symmake_sbsv2.cpp
-initprojectdeploy_symbian.o: $(SOURCE_PATH)/qmake/generators/symbian/initprojectdeploy_symbian.cpp
+initprojectdeploy_symbian.obj: $(SOURCE_PATH)/qmake/generators/symbian/initprojectdeploy_symbian.cpp
$(CXX) $(CXXFLAGS) generators/symbian/initprojectdeploy_symbian.cpp
md5.obj: $(SOURCE_PATH)\src\3rdparty\md5\md5.cpp
diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp
index 56fae15..82703c5 100644
--- a/qmake/generators/makefile.cpp
+++ b/qmake/generators/makefile.cpp
@@ -1494,7 +1494,7 @@ MakefileGenerator::replaceExtraCompilerVariables(const QString &orig_var, const
val += project->values(varname);
}
if(val.isEmpty() && var.startsWith(QLatin1String("QMAKE_VAR_FIRST_"))) {
- const QString varname = var.mid(12);
+ const QString varname = var.mid(16);
val += project->first(varname);
}
@@ -2797,16 +2797,9 @@ MakefileGenerator::fileFixify(const QString& file, const QString &out_d, const Q
ret.prepend(pwd);
ret = Option::fixPathToTargetOS(ret, false, canon);
} else { //fix it..
- QString qfile(Option::fixPathToLocalOS(ret, true, canon)), in_dir(in_d), out_dir(out_d);
+ QString out_dir = QDir(Option::output_dir).absoluteFilePath(out_d);
+ QString in_dir = QDir(pwd).absoluteFilePath(in_d);
{
- if(out_dir.isNull() || QDir::isRelativePath(out_dir))
- out_dir.prepend(Option::output_dir + "/");
- else if(out_dir == ".")
- out_dir = pwd;
- if(in_dir.isEmpty() || QDir::isRelativePath(in_dir))
- in_dir.prepend(pwd);
- else if(in_dir == ".")
- in_dir = pwd;
QFileInfo in_fi(fileInfo(in_dir));
if(in_fi.exists())
in_dir = in_fi.canonicalFilePath();
@@ -2815,6 +2808,7 @@ MakefileGenerator::fileFixify(const QString& file, const QString &out_d, const Q
out_dir = out_fi.canonicalFilePath();
}
+ QString qfile(Option::fixPathToLocalOS(ret, true, canon));
QFileInfo qfileinfo(fileInfo(qfile));
if(out_dir != in_dir || !qfileinfo.isRelative()) {
if(qfileinfo.isRelative()) {
@@ -2868,7 +2862,7 @@ MakefileGenerator::fileFixify(const QString& file, const QString &out_d, const Q
}
if(ret.isEmpty())
ret = ".";
- debug_msg(3, "Fixed[%d] %s :: to :: %s [%s::%s] [%s::%s]", fix, orig_file.toLatin1().constData(),
+ debug_msg(3, "Fixed[%d,%d] %s :: to :: %s [%s::%s] [%s::%s]", fix, canon, orig_file.toLatin1().constData(),
ret.toLatin1().constData(), in_d.toLatin1().constData(), out_d.toLatin1().constData(),
pwd.toLatin1().constData(), Option::output_dir.toLatin1().constData());
cache->insert(cacheKey, ret);
diff --git a/qmake/generators/makefile.h b/qmake/generators/makefile.h
index c39cbce..9896c1d 100644
--- a/qmake/generators/makefile.h
+++ b/qmake/generators/makefile.h
@@ -114,7 +114,7 @@ protected:
struct SubTarget
{
QString name;
- QString in_directory, out_directory;
+ QString in_directory, out_directory;
QString profile, target, makefile;
QStringList depends;
};
@@ -188,8 +188,8 @@ protected:
void filterIncludedFiles(const QString &);
virtual void processSources() {
- filterIncludedFiles("SOURCES");
- filterIncludedFiles("GENERATED_SOURCES");
+ filterIncludedFiles("SOURCES");
+ filterIncludedFiles("GENERATED_SOURCES");
}
//for cross-platform dependent directories
diff --git a/qmake/generators/metamakefile.cpp b/qmake/generators/metamakefile.cpp
index 5413618..5a77271 100644
--- a/qmake/generators/metamakefile.cpp
+++ b/qmake/generators/metamakefile.cpp
@@ -361,7 +361,7 @@ SubdirsMetaMakefileGenerator::init()
}
--recurseDepth;
- Option::output.setFileName(old_output);
+ Option::output.setFileName(old_output);
Option::output_dir = old_output_dir;
qmake_setpwd(oldpwd);
}
diff --git a/qmake/generators/symbian/symmake_abld.h b/qmake/generators/symbian/symmake_abld.h
index fd13c48..18cbb9e 100644
--- a/qmake/generators/symbian/symmake_abld.h
+++ b/qmake/generators/symbian/symmake_abld.h
@@ -31,7 +31,7 @@ protected:
public:
SymbianAbldMakefileGenerator();
- inline ~SymbianAbldMakefileGenerator();
+ ~SymbianAbldMakefileGenerator();
};
diff --git a/qmake/generators/symbian/symmake_sbsv2.h b/qmake/generators/symbian/symmake_sbsv2.h
index d5d9460..8f6183a 100644
--- a/qmake/generators/symbian/symmake_sbsv2.h
+++ b/qmake/generators/symbian/symmake_sbsv2.h
@@ -29,7 +29,7 @@ protected:
public:
SymbianSbsv2MakefileGenerator();
- inline ~SymbianSbsv2MakefileGenerator();
+ ~SymbianSbsv2MakefileGenerator();
private:
void exportFlm();
diff --git a/qmake/generators/win32/msvc_nmake.cpp b/qmake/generators/win32/msvc_nmake.cpp
index 4b1b66d..b5904cc 100644
--- a/qmake/generators/win32/msvc_nmake.cpp
+++ b/qmake/generators/win32/msvc_nmake.cpp
@@ -244,14 +244,14 @@ void NmakeMakefileGenerator::writeImplicitRulesPart(QTextStream &t)
project->variables().remove("QMAKE_RUN_CC");
QHash<QString, void*> source_directories;
- source_directories.insertMulti(".", (void*)1);
+ source_directories.insert(".", (void*)1);
QString directories[] = { QString("UI_SOURCES_DIR"), QString("UI_DIR"), QString() };
for(int y = 0; !directories[y].isNull(); y++) {
QString dirTemp = project->first(directories[y]);
if (dirTemp.endsWith("\\"))
dirTemp.truncate(dirTemp.length()-1);
if(!dirTemp.isEmpty())
- source_directories.insertMulti(dirTemp, (void*)1);
+ source_directories.insert(dirTemp, (void*)1);
}
QString srcs[] = { QString("SOURCES"), QString("GENERATED_SOURCES"), QString() };
for(int x = 0; !srcs[x].isNull(); x++) {
@@ -262,7 +262,7 @@ void NmakeMakefileGenerator::writeImplicitRulesPart(QTextStream &t)
sep = "/";
QString dir = (*sit).section(sep, 0, -2);
if(!dir.isEmpty() && !source_directories[dir])
- source_directories.insertMulti(dir, (void*)1);
+ source_directories.insert(dir, (void*)1);
}
}
diff --git a/qmake/generators/win32/msvc_vcproj.cpp b/qmake/generators/win32/msvc_vcproj.cpp
index 7e703c2..bbbb027 100644
--- a/qmake/generators/win32/msvc_vcproj.cpp
+++ b/qmake/generators/win32/msvc_vcproj.cpp
@@ -1030,7 +1030,6 @@ void VcprojGenerator::initCompilerTool()
conf.compiler.parseOptions(project->values("QMAKE_CXXFLAGS"));
if(project->isActiveConfig("debug")){
// Debug version
- conf.compiler.parseOptions(project->values("QMAKE_CXXFLAGS"));
conf.compiler.parseOptions(project->values("QMAKE_CXXFLAGS_DEBUG"));
if((projectTarget == Application) || (projectTarget == StaticLib))
conf.compiler.parseOptions(project->values("QMAKE_CXXFLAGS_MT_DBG"));
@@ -1038,7 +1037,6 @@ void VcprojGenerator::initCompilerTool()
conf.compiler.parseOptions(project->values("QMAKE_CXXFLAGS_MT_DLLDBG"));
} else {
// Release version
- conf.compiler.parseOptions(project->values("QMAKE_CXXFLAGS"));
conf.compiler.parseOptions(project->values("QMAKE_CXXFLAGS_RELEASE"));
conf.compiler.PreprocessorDefinitions += "QT_NO_DEBUG";
conf.compiler.PreprocessorDefinitions += "NDEBUG";
diff --git a/qmake/generators/win32/winmakefile.cpp b/qmake/generators/win32/winmakefile.cpp
index 60a27be..87f55cf 100644
--- a/qmake/generators/win32/winmakefile.cpp
+++ b/qmake/generators/win32/winmakefile.cpp
@@ -432,9 +432,21 @@ void Win32MakefileGenerator::processRcFileVar()
writeRcFile = rcFile.readAll() != rcString;
rcFile.close();
}
- if (writeRcFile && rcFile.open(QFile::WriteOnly)) {
- rcFile.write(rcString);
- rcFile.close();
+ if (writeRcFile) {
+ bool ok;
+ ok = rcFile.open(QFile::WriteOnly);
+ if (!ok) {
+ // The file can't be opened... try creating the containing
+ // directory first (needed for clean shadow builds)
+ QDir().mkpath(QFileInfo(rcFile).path());
+ ok = rcFile.open(QFile::WriteOnly);
+ }
+ if (!ok) {
+ ::fprintf(stderr, "Cannot open for writing: %s", rcFile.fileName().toLatin1().constData());
+ ::exit(1);
+ }
+ rcFile.write(rcString);
+ rcFile.close();
}
if (project->values("QMAKE_WRITE_DEFAULT_RC").isEmpty())
project->values("RC_FILE").insert(0, rcFile.fileName());
diff --git a/qmake/project.cpp b/qmake/project.cpp
index 9b0071f..c466768 100644
--- a/qmake/project.cpp
+++ b/qmake/project.cpp
@@ -1182,7 +1182,7 @@ QMakeProject::parse(const QString &t, QMap<QString, QStringList> &place, int num
}
}
}
- } else if(!parens && *(d+d_off) == QLatin1Char('}')) {
+ } else if(!parens && *(d+d_off) == QLatin1Char('}')) {
if(start_block) {
--start_block;
} else if(!scope_blocks.count()) {