From 9f681e7a50adc14e8f2f0cea676ab0909c5863aa Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 18 Jun 2013 14:50:00 +0200 Subject: remove pointless variables Change-Id: Ia4cd2292bdea49c198ee1429ab4d3f87697c3ed1 Reviewed-by: Joerg Bornemann --- tools/configure/configureapp.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'tools/configure') diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp index 0ac3730b4e..a6e0727b02 100644 --- a/tools/configure/configureapp.cpp +++ b/tools/configure/configureapp.cpp @@ -3958,15 +3958,11 @@ void Configure::generateMakefiles() QString pwd = QDir::currentPath(); { - QString dirName; bool generate = true; bool doDsp = (dictionary["VCPROJFILES"] == "yes" && dictionary["PROCESS"] == "full"); while (generate) { - QString pwd = QDir::currentPath(); - QString dirPath = buildPath + dirName; QStringList args; - args << buildPath + "/bin/qmake"; if (doDsp) { @@ -3985,7 +3981,7 @@ void Configure::generateMakefiles() args << "-o"; args << buildPath; - QDir::setCurrent(dirPath); + QDir::setCurrent(buildPath); if (int exitCode = Environment::execute(args, QStringList(), QStringList())) { cout << "Qmake failed, return code " << exitCode << endl << endl; dictionary[ "DONE" ] = "error"; -- cgit v1.2.3 From cb37a0ef5c1e4bac97d1eae9d83f6d59964a37a1 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 18 Jun 2013 14:52:22 +0200 Subject: simplify qmake call the directory is sufficient nowadays. the unix configure already did it that way. Change-Id: I887e5ad594aef1f7bf5f4f92a6bdf0a13e4d0372 Reviewed-by: Joerg Bornemann --- tools/configure/configureapp.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tools/configure') diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp index a6e0727b02..ac7fbda197 100644 --- a/tools/configure/configureapp.cpp +++ b/tools/configure/configureapp.cpp @@ -3977,7 +3977,7 @@ void Configure::generateMakefiles() } if (dictionary[ "PROCESS" ] == "full") args << "-r"; - args << (sourcePath + "/qtbase.pro"); + args << sourcePath; args << "-o"; args << buildPath; -- cgit v1.2.3 From fb6d46131ffc65271684ca39af3ec49d34e6725a Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 18 Jun 2013 14:55:14 +0200 Subject: remove pointless qmake -o argument it's already done by the working directory. the unix configure already did it that way. Change-Id: Ia88d0877a2e24bc40a7083c2164982dec47f913b Reviewed-by: Joerg Bornemann --- tools/configure/configureapp.cpp | 2 -- 1 file changed, 2 deletions(-) (limited to 'tools/configure') diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp index ac7fbda197..fbf0de4dce 100644 --- a/tools/configure/configureapp.cpp +++ b/tools/configure/configureapp.cpp @@ -3978,8 +3978,6 @@ void Configure::generateMakefiles() if (dictionary[ "PROCESS" ] == "full") args << "-r"; args << sourcePath; - args << "-o"; - args << buildPath; QDir::setCurrent(buildPath); if (int exitCode = Environment::execute(args, QStringList(), QStringList())) { -- cgit v1.2.3 From e9d539623aa97b307a0d5d7cd10dbdf392e9b92f Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 18 Jun 2013 15:11:11 +0200 Subject: 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 --- tools/configure/configureapp.cpp | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'tools/configure') 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"; -- cgit v1.2.3