summaryrefslogtreecommitdiffstats
path: root/tools/configure/configureapp.cpp
diff options
context:
space:
mode:
authorMiikka Heikkinen <miikka.heikkinen@digia.com>2011-02-09 12:12:42 (GMT)
committerMiikka Heikkinen <miikka.heikkinen@digia.com>2011-02-09 14:33:02 (GMT)
commitb52bf57e46520fb65d3d4c43bdb9c3d972690cb8 (patch)
tree3af076c2bbdc87e043c0b2061b9299d9039a4218 /tools/configure/configureapp.cpp
parent36f8782a5994d5ea2cd71695daf0f33b5e37e609 (diff)
downloadQt-b52bf57e46520fb65d3d4c43bdb9c3d972690cb8.zip
Qt-b52bf57e46520fb65d3d4c43bdb9c3d972690cb8.tar.gz
Qt-b52bf57e46520fb65d3d4c43bdb9c3d972690cb8.tar.bz2
Fix regression in creating mkspecs/default
Copy all files from original mkspec to default one and modify *.conf, *.prf, and *.h to include their original counterparts. Task-number: QTBUG-17258 Reviewed-by: Oswald Buddenhagen
Diffstat (limited to 'tools/configure/configureapp.cpp')
-rw-r--r--tools/configure/configureapp.cpp30
1 files changed, 6 insertions, 24 deletions
diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp
index 8fa03ab..1b77058 100644
--- a/tools/configure/configureapp.cpp
+++ b/tools/configure/configureapp.cpp
@@ -3244,8 +3244,7 @@ void Configure::generateConfigfiles()
}
// Copy configured mkspec to default directory, but remove the old one first, if there is any
- QString mkspecsPath = buildPath + "/mkspecs";
- QString defSpec = mkspecsPath + "/default";
+ QString defSpec = buildPath + "/mkspecs/default";
QFileInfo defSpecInfo(defSpec);
if (defSpecInfo.exists()) {
if (!Environment::rmdir(defSpec)) {
@@ -3255,30 +3254,13 @@ void Configure::generateConfigfiles()
}
}
- 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";
- QFile qmakeConfFile(outName);
- if (qmakeConfFile.open(QFile::WriteOnly | QFile::Text)) {
- QTextStream qmakeConfStream;
- qmakeConfStream.setDevice(&qmakeConfFile);
- // While QMAKESPEC_ORIGINAL being relative or absolute doesn't matter for the
- // primary use of this variable by qmake to identify the original mkspec, the
- // variable is also used for few special cases where the absolute path is required.
- // Conversely, the include of the original qmake.conf must be done using relative path,
- // as some Qt binary deployments are done in a manner that doesn't allow for patching
- // the paths at the installation time.
- qmakeConfStream << "QMAKESPEC_ORIGINAL=" << pltSpec << endl << endl;
- qmakeConfStream << "include(" << "../" << spec << "/qmake.conf)" << endl << endl;
- qmakeConfStream.flush();
- qmakeConfFile.close();
+ QString includeSpec = buildPath + "/mkspecs/" + spec;
+ if (!Environment::cpdir(pltSpec, defSpec, includeSpec)) {
+ cout << "Couldn't update default mkspec! Does " << qPrintable(pltSpec) << " exist?" << endl;
+ dictionary["DONE"] = "error";
+ return;
}
// Generate the new qconfig.cpp file