diff options
author | Oswald Buddenhagen <oswald.buddenhagen@qt.io> | 2016-11-16 15:13:52 +0100 |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@qt.io> | 2016-12-13 18:56:34 +0000 |
commit | ab0cc3055d3d1f0faa98f96a7e8ae58b6ef6461a (patch) | |
tree | ba14bef85165e3dadaac1b46f5c6cd8a734ececf /tools/configure/configureapp.cpp | |
parent | 8861b82f9ef59fa871adc86552012cd90eee6e09 (diff) |
move all target spec handling to qmake-based configure system
we pull this feat off by booting configure with a dummy spec. the proper
spec gets loaded subsequently.
note that it was necessary to move the cache loading after processing
the early checks (from which the spec handling is triggered). this is
just fine, as the cache is needed only by tests, which are forbidden at
this stage by definition.
Change-Id: I5120e25a8bf05fb8cc5485fd93cf6387301089aa
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Diffstat (limited to 'tools/configure/configureapp.cpp')
-rw-r--r-- | tools/configure/configureapp.cpp | 49 |
1 files changed, 1 insertions, 48 deletions
diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp index 373fc89090..2ffec0707f 100644 --- a/tools/configure/configureapp.cpp +++ b/tools/configure/configureapp.cpp @@ -130,20 +130,6 @@ void Configure::parseCmdLine() } } - // Then look for XQMAKESPEC - bool isDeviceMkspec = false; - for (int j = 0 ; j < argCount; ++j) - { - if ((configCmdLine.at(j) == "-xplatform") || (configCmdLine.at(j) == "-device")) { - isDeviceMkspec = (configCmdLine.at(j) == "-device"); - ++j; - if (j == argCount) - break; - dictionary["XQMAKESPEC"] = configCmdLine.at(j); - break; - } - } - for (; i<configCmdLine.size(); ++i) { if (configCmdLine.at(i) == "-platform") { ++i; @@ -151,10 +137,6 @@ void Configure::parseCmdLine() break; dictionary[ "QMAKESPEC" ] = configCmdLine.at(i); dictionary[ "QMAKESPEC_FROM" ] = "commandline"; - } else if (configCmdLine.at(i) == "-xplatform" - || configCmdLine.at(i) == "-device") { - ++i; - // do nothing } else if (configCmdLine.at(i) == "-no-syncqt") @@ -207,34 +189,6 @@ void Configure::parseCmdLine() dictionary[ "QMAKEMAKEFILE" ] = "Makefile.win32"; } } - - if (isDeviceMkspec) { - const QStringList devices = mkspecs.filter("devices/", Qt::CaseInsensitive); - const QStringList family = devices.filter(dictionary["XQMAKESPEC"], Qt::CaseInsensitive); - - if (family.isEmpty()) { - dictionary[ "DONE" ] = "error"; - cout << "Error: No device matching '" << dictionary["XQMAKESPEC"] << "'." << endl; - } else if (family.size() > 1) { - dictionary[ "DONE" ] = "error"; - - cout << "Error: Multiple matches for device '" << dictionary["XQMAKESPEC"] << "'. Candidates are:" << endl; - - foreach (const QString &device, family) - cout << "\t* " << device << endl; - } else { - Q_ASSERT(family.size() == 1); - dictionary["XQMAKESPEC"] = family.at(0); - } - - } else { - // Ensure that -spec (XQMAKESPEC) exists in the mkspecs folder as well - if (dictionary.contains("XQMAKESPEC") && - !mkspecs.contains(dictionary["XQMAKESPEC"], Qt::CaseInsensitive)) { - dictionary[ "DONE" ] = "error"; - cout << "Invalid option \"" << dictionary["XQMAKESPEC"] << "\" for -xplatform." << endl; - } - } } void Configure::generateHeaders() @@ -361,8 +315,7 @@ void Configure::buildQmake() confStream << "[EffectivePaths]" << endl << "Prefix=.." << endl << "[Paths]" << endl - << "TargetSpec=" << (dictionary.contains("XQMAKESPEC") - ? dictionary["XQMAKESPEC"] : dictionary["QMAKESPEC"]) << endl + << "TargetSpec=dummy" << endl << "HostSpec=" << dictionary["QMAKESPEC"] << endl; if (sourcePath != buildPath) confStream << "[EffectiveSourcePaths]" << endl |