summaryrefslogtreecommitdiffstats
path: root/tools/configure/configureapp.cpp
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@nokia.com>2012-06-29 09:05:36 +0200
committerOswald Buddenhagen <oswald.buddenhagen@nokia.com>2012-06-29 09:06:37 +0200
commit1491065506eb97c9def93b908db1df9fcdf3fff0 (patch)
tree8241e72cc1016b41c08f9d14e81fb63c07e6a5ba /tools/configure/configureapp.cpp
parent551e1e63d9da18787ae72fc3f0e76f28dbe5f7e3 (diff)
parent61c775684fe38f3c1e1bc7599e21054aedba523c (diff)
Merge branch 'buildsystem' (second round)
refactoring and cleanup. fixes x-builds between different os families. Conflicts: mkspecs/features/qt.prf Change-Id: I0205e6f07f77c9b015cf055dd87a471883949a91
Diffstat (limited to 'tools/configure/configureapp.cpp')
-rw-r--r--tools/configure/configureapp.cpp18
1 files changed, 13 insertions, 5 deletions
diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp
index bcb597d72f..fb666e221e 100644
--- a/tools/configure/configureapp.cpp
+++ b/tools/configure/configureapp.cpp
@@ -3011,7 +3011,7 @@ QString Configure::addDefine(QString def)
#if !defined(EVAL)
bool Configure::copySpec(const char *name, const char *pfx, const QString &spec)
{
- // Copy configured mkspec to default directory, but remove the old one first, if there is any
+ // "Link" configured mkspec to default directory, but remove the old one first, if there is any
QString defSpec = buildPath + "/mkspecs/" + name;
QFileInfo defSpecInfo(defSpec);
if (defSpecInfo.exists()) {
@@ -3022,10 +3022,18 @@ bool Configure::copySpec(const char *name, const char *pfx, const QString &spec)
}
}
- QString pltSpec = sourcePath + "/mkspecs/" + spec;
- QString includeSpec = buildPath + "/mkspecs/" + spec;
- if (!Environment::cpdir(pltSpec, defSpec, includeSpec)) {
- cout << "Couldn't update default " << pfx << "mkspec! Does " << qPrintable(pltSpec) << " exist?" << endl;
+ QDir::current().mkpath(defSpec);
+ QFile qfile(defSpec + "/qmake.conf");
+ if (qfile.open(QFile::WriteOnly | QFile::Text)) {
+ QTextStream fileStream;
+ fileStream.setDevice(&qfile);
+ QString srcSpec = buildPath + "/mkspecs/" + spec; // We copied it to the build dir
+ fileStream << "QMAKESPEC_ORIGINAL = " << formatPath(srcSpec) << endl;
+ fileStream << "include(" << formatPath(QDir(defSpec).relativeFilePath(srcSpec + "/qmake.conf")) << ")" << endl;
+ qfile.close();
+ }
+ if (qfile.error() != QFile::NoError) {
+ cout << "Couldn't update default " << pfx << "mkspec: " << qPrintable(qfile.errorString()) << endl;
dictionary["DONE"] = "error";
return false;
}