summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@digia.com>2013-06-18 15:11:11 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-06-26 05:53:41 +0200
commite9d539623aa97b307a0d5d7cd10dbdf392e9b92f (patch)
tree22b3d8fd5301df6fd3dc03dbfbf66abd6ff029f5 /tools
parentfb6d46131ffc65271684ca39af3ec49d34e6725a (diff)
introduce "secret" configure -top-level option
shifts the makefile generation one directory level up. this allows the top-level configure to leave the makefile creation entirely to the qtbase configure. this is not very clean modularization-wise, but consistent with -skip. Change-Id: I7ee2d2f29f2e6619d61fe9b55faa0bacdf3c44c1 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/configure/configureapp.cpp15
1 files changed, 13 insertions, 2 deletions
diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp
index fbf0de4dce..73ef0dcf23 100644
--- a/tools/configure/configureapp.cpp
+++ b/tools/configure/configureapp.cpp
@@ -389,6 +389,11 @@ QString Configure::firstLicensePath()
void Configure::parseCmdLine()
{
+ if (configCmdLine.size() && configCmdLine.at(0) == "-top-level") {
+ dictionary[ "TOPLEVEL" ] = "yes";
+ configCmdLine.removeAt(0);
+ }
+
int argCount = configCmdLine.size();
int i = 0;
const QStringList imageFormats = QStringList() << "gif" << "png" << "jpeg";
@@ -3958,6 +3963,12 @@ void Configure::generateMakefiles()
QString pwd = QDir::currentPath();
{
+ QString sourcePathMangled = sourcePath;
+ QString buildPathMangled = buildPath;
+ if (dictionary.contains("TOPLEVEL")) {
+ sourcePathMangled = QFileInfo(sourcePath).path();
+ buildPathMangled = QFileInfo(buildPath).path();
+ }
bool generate = true;
bool doDsp = (dictionary["VCPROJFILES"] == "yes"
&& dictionary["PROCESS"] == "full");
@@ -3977,9 +3988,9 @@ void Configure::generateMakefiles()
}
if (dictionary[ "PROCESS" ] == "full")
args << "-r";
- args << sourcePath;
+ args << sourcePathMangled;
- QDir::setCurrent(buildPath);
+ QDir::setCurrent(buildPathMangled);
if (int exitCode = Environment::execute(args, QStringList(), QStringList())) {
cout << "Qmake failed, return code " << exitCode << endl << endl;
dictionary[ "DONE" ] = "error";