summaryrefslogtreecommitdiffstats
path: root/tools/configure/configureapp.cpp
diff options
context:
space:
mode:
authorMiikka Heikkinen <miikka.heikkinen@digia.com>2010-11-15 12:15:25 (GMT)
committerMiikka Heikkinen <miikka.heikkinen@digia.com>2010-11-16 13:00:07 (GMT)
commit515fd562d87290c3fc0eb45817434dd0744d346e (patch)
treeff4e54f2d504e8ed88c54f3ccc033fdd17fc59cd /tools/configure/configureapp.cpp
parent03c60ccac1ab416ebee7a262f1c910774fdc2ff2 (diff)
downloadQt-515fd562d87290c3fc0eb45817434dd0744d346e.zip
Qt-515fd562d87290c3fc0eb45817434dd0744d346e.tar.gz
Qt-515fd562d87290c3fc0eb45817434dd0744d346e.tar.bz2
Use include(original mkspec) instead of copying of mkspec to default
Having QMAKESPEC_ORIGINAL at the end of the default qmake.conf sets the mkspec too late for scope checks in symbian-mmp.conf and related files. Fixed by changing how default mkspec is handled: it is no longer simply copied over to mkspecs/default by configure but rather included with include statement in the generated mkspecs/default/qmake.conf after setting of QMAKESPEC_ORIGINAL value. This should also fix any issues with relative includes in mkspecs used as default that are not on same level as mkspecs/default folder. Task-number: QTBUG-15159 Reviewed-by: Oswald Buddenhagen Reviewed-by: Joerg Bornemann
Diffstat (limited to 'tools/configure/configureapp.cpp')
-rw-r--r--tools/configure/configureapp.cpp18
1 files changed, 10 insertions, 8 deletions
diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp
index 3808c4e..3c12eb9 100644
--- a/tools/configure/configureapp.cpp
+++ b/tools/configure/configureapp.cpp
@@ -3227,7 +3227,8 @@ void Configure::generateConfigfiles()
}
// Copy configured mkspec to default directory, but remove the old one first, if there is any
- QString defSpec = buildPath + "/mkspecs/default";
+ QString mkspecsPath = buildPath + "/mkspecs";
+ QString defSpec = mkspecsPath + "/default";
QFileInfo defSpecInfo(defSpec);
if (defSpecInfo.exists()) {
if (!Environment::rmdir(defSpec)) {
@@ -3237,21 +3238,22 @@ void Configure::generateConfigfiles()
}
}
- QString spec = dictionary.contains("XQMAKESPEC") ? dictionary["XQMAKESPEC"] : dictionary["QMAKESPEC"];
- QString pltSpec = sourcePath + "/mkspecs/" + spec;
- if (!Environment::cpdir(pltSpec, defSpec)) {
- cout << "Couldn't update default mkspec! Does " << qPrintable(pltSpec) << " exist?" << endl;
+ QDir mkspecsDir(mkspecsPath);
+ if (!mkspecsDir.mkdir("default")) {
+ cout << "Couldn't create default mkspec dir!" << endl;
dictionary["DONE"] = "error";
return;
}
+ QString spec = dictionary.contains("XQMAKESPEC") ? dictionary["XQMAKESPEC"] : dictionary["QMAKESPEC"];
+ QString pltSpec = sourcePath + "/mkspecs/" + spec;
outName = defSpec + "/qmake.conf";
- ::SetFileAttributes((wchar_t*)outName.utf16(), FILE_ATTRIBUTE_NORMAL);
QFile qmakeConfFile(outName);
- if (qmakeConfFile.open(QFile::Append | QFile::WriteOnly | QFile::Text)) {
+ if (qmakeConfFile.open(QFile::WriteOnly | QFile::Text)) {
QTextStream qmakeConfStream;
qmakeConfStream.setDevice(&qmakeConfFile);
- qmakeConfStream << endl << "QMAKESPEC_ORIGINAL=" << pltSpec << endl;
+ qmakeConfStream << "QMAKESPEC_ORIGINAL=" << pltSpec << endl << endl;
+ qmakeConfStream << "include(" << pltSpec << "/qmake.conf)" << endl;
qmakeConfStream.flush();
qmakeConfFile.close();
}