summaryrefslogtreecommitdiffstats
path: root/tools/configure/configureapp.cpp
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@nokia.com>2012-04-20 17:58:24 +0200
committerOswald Buddenhagen <oswald.buddenhagen@nokia.com>2012-06-27 14:35:24 +0200
commitbc05c9aee8af5f27d297e9b525d98d18129b29da (patch)
treececb8b83095ed80857f754cb912c51bcff14f295 /tools/configure/configureapp.cpp
parentdafc4a884c7ccbd7417bf190c83a2465fb829096 (diff)
don't copy files to default specs any more
now that the default specs really only forward to the real specs, it is not necessary to copy any auxiliary files. Change-Id: I169a61a045063b796062fe6af3a2afbe3f1c9da0 Reviewed-by: Mark Brand <mabrand@mabrand.nl>
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 f22519afdd..9086007093 100644
--- a/tools/configure/configureapp.cpp
+++ b/tools/configure/configureapp.cpp
@@ -3046,7 +3046,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()) {
@@ -3057,10 +3057,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;
}