diff options
Diffstat (limited to 'tools/configure')
-rw-r--r-- | tools/configure/configureapp.cpp | 178 | ||||
-rw-r--r-- | tools/configure/configureapp.h | 13 | ||||
-rw-r--r-- | tools/configure/main.cpp | 19 |
3 files changed, 62 insertions, 148 deletions
diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp index 884b9aa6e8..2304590c41 100644 --- a/tools/configure/configureapp.cpp +++ b/tools/configure/configureapp.cpp @@ -160,24 +160,6 @@ Configure::Configure(int& argc, char** argv) cout << "Preparing build tree..." << endl; QDir(buildPath).mkpath("bin"); - { //make a syncqt script(s) that can be used in the shadow - QFile syncqt(buildPath + "/bin/syncqt"); - // no QFile::Text, just in case the perl interpreter can't cope with them (unlikely) - if (syncqt.open(QFile::WriteOnly)) { - QTextStream stream(&syncqt); - stream << "#!/usr/bin/perl -w" << endl - << "require \"" << sourcePath + "/bin/syncqt\";" << endl; - } - QFile syncqt_bat(buildPath + "/bin/syncqt.bat"); - if (syncqt_bat.open(QFile::WriteOnly | QFile::Text)) { - QTextStream stream(&syncqt_bat); - stream << "@echo off" << endl - << "call " << QDir::toNativeSeparators(sourcePath + "/bin/syncqt.bat") - << " %*" << endl; - syncqt_bat.close(); - } - } - //copy the mkspecs buildDir.mkpath("mkspecs"); if (!Environment::cpdir(sourcePath + "/mkspecs", buildPath + "/mkspecs")){ @@ -243,6 +225,7 @@ Configure::Configure(int& argc, char** argv) dictionary[ "QT_GLIB" ] = "no"; dictionary[ "QT_ICONV" ] = "auto"; dictionary[ "QT_INOTIFY" ] = "auto"; + dictionary[ "QT_EVENTFD" ] = "auto"; dictionary[ "QT_CUPS" ] = "auto"; dictionary[ "CFG_GCC_SYSROOT" ] = "yes"; dictionary[ "SLOG2" ] = "no"; @@ -412,7 +395,6 @@ void Configure::parseCmdLine() int i = 0; const QStringList imageFormats = QStringList() << "gif" << "png" << "jpeg"; -#if !defined(EVAL) if (argCount < 1) // skip rest if no arguments ; else if (configCmdLine.at(i) == "-redo") { @@ -433,7 +415,6 @@ void Configure::parseCmdLine() i = 0; } argCount = configCmdLine.size(); -#endif bool isDeviceMkspec = false; @@ -458,7 +439,6 @@ void Configure::parseCmdLine() || configCmdLine.at(i) == "-?") dictionary[ "HELP" ] = "yes"; -#if !defined(EVAL) else if (configCmdLine.at(i) == "-qconfig") { ++i; if (i == argCount) @@ -510,9 +490,6 @@ void Configure::parseCmdLine() dictionary[ "FORCE_ASSERTS" ] = "yes"; } - -#endif - else if (configCmdLine.at(i) == "-platform") { ++i; if (i == argCount) @@ -532,8 +509,6 @@ void Configure::parseCmdLine() // do nothing } - -#if !defined(EVAL) else if (configCmdLine.at(i) == "-no-zlib") { // No longer supported since Qt 4.4.0 // But save the information for later so that we can print a warning @@ -790,7 +765,7 @@ void Configure::parseCmdLine() else if (configCmdLine.at(i).startsWith("-no-imageformat-") && imageFormats.contains(configCmdLine.at(i).section('-', 3))) dictionary[ configCmdLine.at(i).section('-', 3).toUpper() ] = "no"; -#endif + // IDE project generation ----------------------------------- else if (configCmdLine.at(i) == "-no-vcproj") dictionary[ "VCPROJFILES" ] = "no"; @@ -805,7 +780,6 @@ void Configure::parseCmdLine() dictionary[ "NATIVE_GESTURES" ] = "yes"; else if (configCmdLine.at(i) == "-no-native-gestures") dictionary[ "NATIVE_GESTURES" ] = "no"; -#if !defined(EVAL) // Others --------------------------------------------------- else if (configCmdLine.at(i) == "-widgets") dictionary[ "WIDGETS" ] = "yes"; @@ -908,6 +882,10 @@ void Configure::parseCmdLine() dictionary[ "WERROR" ] = "yes"; } else if (configCmdLine.at(i) == "-no-warnings-are-errors") { dictionary[ "WERROR" ] = "no"; + } else if (configCmdLine.at(i) == "-no-eventfd") { + dictionary[ "QT_EVENTFD" ] = "no"; + } else if (configCmdLine.at(i) == "-eventfd") { + dictionary[ "QT_EVENTFD" ] = "yes"; } // Work around compiler nesting limitation @@ -983,7 +961,7 @@ void Configure::parseCmdLine() } else if (configCmdLine.at(i).startsWith("OPENSSL_LIBS_RELEASE=")) { opensslLibsRelease = configCmdLine.at(i); } else if (configCmdLine.at(i).startsWith("OPENSSL_PATH=")) { - opensslPath = QDir::fromNativeSeparators(configCmdLine.at(i)); + opensslPath = QDir::fromNativeSeparators(configCmdLine.at(i).section("=", 1)); } else if (configCmdLine.at(i).startsWith("PSQL_LIBS=")) { psqlLibs = configCmdLine.at(i); } else if (configCmdLine.at(i).startsWith("SYBASE=")) { @@ -991,9 +969,9 @@ void Configure::parseCmdLine() } else if (configCmdLine.at(i).startsWith("SYBASE_LIBS=")) { sybaseLibs = configCmdLine.at(i); } else if (configCmdLine.at(i).startsWith("DBUS_PATH=")) { - dbusPath = QDir::fromNativeSeparators(configCmdLine.at(i)); + dbusPath = QDir::fromNativeSeparators(configCmdLine.at(i).section("=", 1)); } else if (configCmdLine.at(i).startsWith("MYSQL_PATH=")) { - mysqlPath = QDir::fromNativeSeparators(configCmdLine.at(i)); + mysqlPath = QDir::fromNativeSeparators(configCmdLine.at(i).section("=", 1)); } else if (configCmdLine.at(i).startsWith("ZLIB_LIBS=")) { zlibLibs = QDir::fromNativeSeparators(configCmdLine.at(i)); } @@ -1166,6 +1144,13 @@ void Configure::parseCmdLine() dictionary[ "QT_HOST_BINS" ] = configCmdLine.at(i); } + else if (configCmdLine.at(i) == "-hostlibdir") { + ++i; + if (i == argCount) + break; + dictionary[ "QT_HOST_LIBS" ] = configCmdLine.at(i); + } + else if (configCmdLine.at(i) == "-hostdatadir") { ++i; if (i == argCount) @@ -1300,8 +1285,6 @@ void Configure::parseCmdLine() cout << "Unknown option " << configCmdLine.at(i) << endl; break; } - -#endif } // Ensure that QMAKESPEC exists in the mkspecs folder @@ -1350,18 +1333,6 @@ void Configure::parseCmdLine() } } - // Tell the user how to proceed building Qt after configure finished its job - dictionary["QTBUILDINSTRUCTION"] = dictionary["MAKE"]; - if (dictionary.contains("XQMAKESPEC")) { - if (dictionary["XQMAKESPEC"].startsWith("wince")) { - dictionary["QTBUILDINSTRUCTION"] = - QString("setcepaths.bat ") + dictionary["XQMAKESPEC"] + QString(" && ") + dictionary["MAKE"]; - } - } - - // Tell the user how to confclean before the next configure - dictionary["CONFCLEANINSTRUCTION"] = dictionary["MAKE"] + QString(" confclean"); - if (isDeviceMkspec) { const QStringList devices = mkspecs.filter("devices/", Qt::CaseInsensitive); const QStringList family = devices.filter(dictionary["XQMAKESPEC"], Qt::CaseInsensitive); @@ -1425,7 +1396,6 @@ void Configure::parseCmdLine() if (dictionary["FORCE_ASSERTS"] == "yes") qtConfig += "force_asserts"; -#if !defined(EVAL) for (QStringList::Iterator dis = disabledModules.begin(); dis != disabledModules.end(); ++dis) { modules.removeAll((*dis)); } @@ -1440,10 +1410,8 @@ void Configure::parseCmdLine() if ((dictionary[ "REDO" ] != "yes") && (dictionary[ "HELP" ] != "yes")) saveCmdLine(); -#endif } -#if !defined(EVAL) void Configure::validateArgs() { // Validate the specified config @@ -1490,8 +1458,6 @@ void Configure::validateArgs() else qmakeConfig += (*config) + "-config"; } -#endif - // Output helper functions --------------------------------[ Start ]- /*! @@ -1656,6 +1622,7 @@ void Configure::applySpecSpecifics() dictionary[ "ANGLE" ] = "no"; dictionary[ "REDUCE_RELOCATIONS" ] = "yes"; dictionary[ "QT_GETIFADDRS" ] = "no"; + dictionary[ "QT_XKBCOMMON" ] = "no"; } } @@ -1693,9 +1660,9 @@ bool Configure::displayHelp() desc( "-testsdir <dir>", "Tests will be installed to <dir>\n(default PREFIX/tests)\n"); desc( "-hostbindir <dir>", "Host executables will be installed to <dir>\n(default HOSTPREFIX/bin)"); + desc( "-hostlibdir <dir>", "Host libraries will be installed to <dir>\n(default HOSTPREFIX/lib)"); desc( "-hostdatadir <dir>", "Data used by qmake will be installed to <dir>\n(default HOSTPREFIX)"); -#if !defined(EVAL) desc("\nConfigure options:\n\n"); desc(" The defaults (*) are usually acceptable. A plus (+) denotes a default value" @@ -1766,7 +1733,6 @@ bool Configure::displayHelp() desc("OPENVG", "no","-no-openvg", "Disables OpenVG functionality."); desc("OPENVG", "yes","-openvg", "Enables OpenVG functionality.\n"); desc( "-force-asserts", "Activate asserts in release mode.\n"); -#endif desc( "-platform <spec>", "The operating system and compiler you are building on.\n(default %QMAKESPEC%)\n"); desc( "-xplatform <spec>", "The operating system and compiler you are cross compiling to.\n"); desc( "", "See the README file for a list of supported operating systems and compilers.\n", false, ' '); @@ -1787,6 +1753,9 @@ bool Configure::displayHelp() desc("QT_INOTIFY", "yes", "-inotify", "Explicitly enable Qt inotify(7) support."); desc("QT_INOTIFY", "no", "-no-inotify", "Explicitly disable Qt inotify(7) support.\n"); + desc("QT_EVENTFD", "yes", "-eventfd", "Enable eventfd(7) support in the UNIX event loop."); + desc("QT_EVENTFD", "no", "-no-eventfd", "Disable eventfd(7) support in the UNIX event loop.\n"); + desc("LARGE_FILE", "yes", "-largefile", "Enables Qt to access files larger than 4 GB.\n"); desc("FONT_CONFIG", "yes", "-fontconfig", "Build with FontConfig support."); @@ -1804,18 +1773,15 @@ bool Configure::displayHelp() desc("WERROR", "yes", "-warnings-are-errors", "Make warnings be treated as errors."); desc("WERROR", "no", "-no-warnings-are-errors","Make warnings be treated normally."); -#if !defined(EVAL) desc( "-qtnamespace <name>", "Wraps all Qt library code in 'namespace name {...}'."); desc( "-qtlibinfix <infix>", "Renames all Qt* libs to Qt*<infix>.\n"); desc( "-D <define>", "Add an explicit define to the preprocessor."); desc( "-I <includepath>", "Add an explicit include path."); desc( "-L <librarypath>", "Add an explicit library path."); desc( "-l <libraryname>", "Add an explicit library name, residing in a librarypath.\n"); -#endif desc( "-help, -h, -?", "Display this information.\n"); -#if !defined(EVAL) // 3rd party stuff options go below here -------------------------------------------------------------------------------- desc("Third Party Libraries:\n\n"); @@ -1850,7 +1816,6 @@ bool Configure::displayHelp() desc("ANGLE", "yes", "-angle", "Use the ANGLE implementation of OpenGL ES 2.0."); desc("ANGLE", "d3d11", "-angle-d3d11", "Use the Direct3D 11-based ANGLE implementation of OpenGL ES 2.0."); desc("ANGLE", "no", "-no-angle", "Do not use ANGLE.\nSee http://code.google.com/p/angleproject/\n"); -#endif // Qt\Windows only options go below here -------------------------------------------------------------------------------- desc("\nQt for Windows only:\n\n"); @@ -1862,7 +1827,6 @@ bool Configure::displayHelp() desc("PLUGIN_MANIFESTS", "no", "-no-plugin-manifests", "Do not embed manifests in plugins."); desc("PLUGIN_MANIFESTS", "yes", "-plugin-manifests", "Embed manifests in plugins.\n"); -#if !defined(EVAL) desc("BUILD_QMAKE", "no", "-no-qmake", "Do not compile qmake."); desc("BUILD_QMAKE", "yes", "-qmake", "Compile qmake.\n"); @@ -1923,7 +1887,6 @@ bool Configure::displayHelp() desc( "", qPrintable(QString(" %1").arg(allConfigs.at(i))), false, ' '); printf("\n"); */ -#endif desc( "-loadconfig <config>", "Run configure with the parameters from file configure_<config>.cache."); desc( "-saveconfig <config>", "Run configure and save the parameters in file configure_<config>.cache."); desc( "-redo", "Run configure with the same parameters as last time.\n"); @@ -2013,8 +1976,7 @@ QString Configure::defaultTo(const QString &option) return "auto"; if (option == "SYNCQT" - && (!QFile::exists(sourcePath + "/bin/syncqt") || - !QFile::exists(sourcePath + "/bin/syncqt.bat"))) + && (!QFile::exists(sourcePath + "/bin/syncqt.pl"))) return "no"; return "yes"; @@ -2181,6 +2143,8 @@ bool Configure::checkAvailability(const QString &part) available = tryCompileProject("unix/iconv") || tryCompileProject("unix/gnu-libiconv"); } else if (part == "INOTIFY") { available = tryCompileProject("unix/inotify"); + } else if (part == "QT_EVENTFD") { + available = tryCompileProject("unix/eventfd"); } else if (part == "CUPS") { available = (platform() != WINDOWS) && (platform() != WINDOWS_CE) && tryCompileProject("unix/cups"); } else if (part == "STACK_PROTECTOR_STRONG") { @@ -2323,6 +2287,9 @@ void Configure::autoDetection() dictionary["SLOG2"] = checkAvailability("SLOG2") ? "yes" : "no"; } + if (dictionary["QT_EVENTFD"] == "auto") + dictionary["QT_EVENTFD"] = checkAvailability("QT_EVENTFD") ? "yes" : "no"; + // Mark all unknown "auto" to the default value.. for (QMap<QString,QString>::iterator i = dictionary.begin(); i != dictionary.end(); ++i) { if (i.value() == "auto") @@ -2410,53 +2377,7 @@ bool Configure::verifyConfiguration() return true; } -/* - Things that affect the Qt API/ABI: - Options: - minimal-config small-config medium-config large-config full-config - - Options: - debug release - - Things that do not affect the Qt API/ABI: - system-jpeg no-jpeg jpeg - system-png no-png png - system-zlib no-zlib zlib - no-gif gif - dll staticlib - - nocrosscompiler - GNUmake - largefile - nis - nas - tablet - - X11 : x11sm xinerama xcursor xfixes xrandr xrender fontconfig xkb - Embedded: embedded freetype -*/ -void Configure::generateBuildKey() -{ - QString spec = dictionary["QMAKESPEC"]; - - QString compiler = "msvc"; // ICC is compatible - if (spec.endsWith("-g++")) - compiler = "mingw"; - else if (spec.endsWith("-borland")) - compiler = "borland"; - - // Build options which changes the Qt API/ABI - QStringList build_options; - if (!dictionary["QCONFIG"].isEmpty()) - build_options += dictionary["QCONFIG"] + "-config "; - build_options.sort(); - - // Sorted defines that start with QT_NO_ - QStringList build_defines = qmakeDefines.filter(QRegExp("^QT_NO_")); - build_defines.sort(); -} - -void Configure::generateSystemVars() +void Configure::prepareConfigTests() { // Generate an empty .qmake.cache file for config.tests QDir buildDir(buildPath); @@ -2722,6 +2643,9 @@ void Configure::generateOutputVars() if (dictionary["QT_INOTIFY"] == "yes") qtConfig += "inotify"; + if (dictionary["QT_EVENTFD"] == "yes") + qtConfig += "eventfd"; + if (dictionary["FONT_CONFIG"] == "yes") { qtConfig += "fontconfig"; qmakeVars += "QMAKE_CFLAGS_FONTCONFIG ="; @@ -2795,13 +2719,19 @@ void Configure::generateOutputVars() } else if (opensslLibs.isEmpty()) { qmakeVars += QString("OPENSSL_LIBS = -lssleay32 -llibeay32"); } - if (!opensslPath.isEmpty()) - qmakeVars += opensslPath; + if (!opensslPath.isEmpty()) { + qmakeVars += QString("OPENSSL_CFLAGS += -I%1/include").arg(opensslPath); + qmakeVars += QString("OPENSSL_LIBS += -L%1/lib").arg(opensslPath); + } + } + if (dictionary[ "DBUS" ] != "no" && !dbusPath.isEmpty()) { + qmakeVars += QString("QT_CFLAGS_DBUS = -I%1/include").arg(dbusPath); + qmakeVars += QString("QT_LIBS_DBUS = -L%1/lib").arg(dbusPath); + } + if (dictionary[ "SQL_MYSQL" ] != "no" && !mysqlPath.isEmpty()) { + qmakeVars += QString("QT_CFLAGS_MYSQL = -I%1/include").arg(mysqlPath); + qmakeVars += QString("QT_LFLAGS_MYSQL = -L%1/lib").arg(mysqlPath); } - if (dictionary[ "DBUS" ] != "no" && !dbusPath.isEmpty()) - qmakeVars += dbusPath; - if (dictionary[ "SQL_MYSQL" ] != "no" && !mysqlPath.isEmpty()) - qmakeVars += mysqlPath; if (!psqlLibs.isEmpty()) qmakeVars += QString("QT_LFLAGS_PSQL=") + psqlLibs.section("=", 1); if (!zlibLibs.isEmpty()) @@ -2856,7 +2786,6 @@ void Configure::generateOutputVars() } } -#if !defined(EVAL) void Configure::generateCachefile() { // Generate .qmake.cache @@ -2892,6 +2821,9 @@ void Configure::generateCachefile() if (dictionary["QT_EDITION"] != "QT_EDITION_OPENSOURCE") moduleStream << "DEFINES *= QT_EDITION=QT_EDITION_DESKTOP" << endl; + if (dictionary["QT_XKBCOMMON"] == "no") + moduleStream << "DEFINES += QT_NO_XKBCOMMON" << endl; + if (dictionary["CETEST"] == "yes") { moduleStream << "QT_CE_RAPI_INC = " << formatPath(dictionary["QT_CE_RAPI_INC"]) << endl; moduleStream << "QT_CE_RAPI_LIB = " << formatPath(dictionary["QT_CE_RAPI_LIB"]) << endl; @@ -3215,7 +3147,6 @@ void Configure::generateQConfigPri() configFile.close(); } } -#endif QString Configure::addDefine(QString def) { @@ -3249,7 +3180,6 @@ QString Configure::addDefine(QString def) return result; } -#if !defined(EVAL) void Configure::generateConfigfiles() { QDir(buildPath).mkpath("src/corelib/global"); @@ -3388,6 +3318,7 @@ void Configure::generateConfigfiles() if (dictionary["QT_ICONV"] == "no") qconfigList += "QT_NO_ICONV"; if (dictionary["QT_GLIB"] == "no") qconfigList += "QT_NO_GLIB"; if (dictionary["QT_INOTIFY"] == "no") qconfigList += "QT_NO_INOTIFY"; + if (dictionary["QT_EVENTFD"] == "no") qconfigList += "QT_NO_EVENTFD"; if (dictionary["REDUCE_EXPORTS"] == "yes") qconfigList += "QT_VISIBILITY_AVAILABLE"; if (dictionary["REDUCE_RELOCATIONS"] == "yes") qconfigList += "QT_REDUCE_RELOCATIONS"; @@ -3454,9 +3385,7 @@ void Configure::generateConfigfiles() qdeviceFile.close(); } } -#endif -#if !defined(EVAL) void Configure::displayConfig() { fstream sout; @@ -3530,6 +3459,7 @@ void Configure::displayConfig() sout << "NIS support................." << dictionary[ "NIS" ] << endl; sout << "Iconv support..............." << dictionary[ "QT_ICONV" ] << endl; sout << "Inotify support............." << dictionary[ "QT_INOTIFY" ] << endl; + sout << "eventfd(7) support.........." << dictionary[ "QT_EVENTFD" ] << endl; sout << "Glib support................" << dictionary[ "QT_GLIB" ] << endl; sout << "CUPS support................" << dictionary[ "QT_CUPS" ] << endl; sout << "OpenVG support.............." << dictionary[ "OPENVG" ] << endl; @@ -3665,9 +3595,7 @@ void Configure::displayConfig() cout << str << endl; } } -#endif -#if !defined(EVAL) void Configure::generateHeaders() { if (dictionary["SYNCQT"] == "auto") @@ -3677,7 +3605,8 @@ void Configure::generateHeaders() if (!QStandardPaths::findExecutable(QStringLiteral("perl.exe")).isEmpty()) { cout << "Running syncqt..." << endl; QStringList args; - args += buildPath + "/bin/syncqt.bat"; + args << "perl" << "-w"; + args += sourcePath + "/bin/syncqt.pl"; args << "-minimal" << "-module" << "QtCore"; args += sourcePath; int retc = Environment::execute(args, QStringList(), QStringList()); @@ -3743,6 +3672,8 @@ void Configure::generateQConfigCpp() haveHpx = true; if (dictionary["QT_HOST_BINS"].isEmpty()) dictionary["QT_HOST_BINS"] = haveHpx ? dictionary["QT_HOST_PREFIX"] + "/bin" : dictionary["QT_INSTALL_BINS"]; + if (dictionary["QT_HOST_LIBS"].isEmpty()) + dictionary["QT_HOST_LIBS"] = haveHpx ? dictionary["QT_HOST_PREFIX"] + "/lib" : dictionary["QT_INSTALL_LIBS"]; if (dictionary["QT_HOST_DATA"].isEmpty()) dictionary["QT_HOST_DATA"] = haveHpx ? dictionary["QT_HOST_PREFIX"] : dictionary["QT_INSTALL_ARCHDATA"]; @@ -3783,6 +3714,7 @@ void Configure::generateQConfigCpp() << " \"qt_ssrtpath=" << formatPath(dictionary["CFG_SYSROOT"]) << "\"," << endl << " \"qt_hpfxpath=" << formatPath(dictionary["QT_HOST_PREFIX"]) << "\"," << endl << " \"qt_hbinpath=" << formatPath(dictionary["QT_HOST_BINS"]) << "\"," << endl + << " \"qt_hlibpath=" << formatPath(dictionary["QT_HOST_LIBS"]) << "\"," << endl << " \"qt_hdatpath=" << formatPath(dictionary["QT_HOST_DATA"]) << "\"," << endl << " \"qt_targspec=" << targSpec << "\"," << endl << " \"qt_hostspec=" << hostSpec << "\"," << endl @@ -3951,7 +3883,6 @@ void Configure::buildQmake() } } -#endif void Configure::appendMakeItem(int inList, const QString &item) { @@ -4054,8 +3985,6 @@ Configure::ProjectType Configure::projectType(const QString& proFileName) return App; } -#if !defined(EVAL) - bool Configure::showLicense(QString orgLicenseFile) { if (dictionary["LICENSE_CONFIRMED"] == "yes") { @@ -4234,7 +4163,6 @@ void Configure::saveCmdLine() } } } -#endif // !EVAL bool Configure::isDone() { diff --git a/tools/configure/configureapp.h b/tools/configure/configureapp.h index 3cb5de8520..3014e409f9 100644 --- a/tools/configure/configureapp.h +++ b/tools/configure/configureapp.h @@ -57,9 +57,7 @@ public: ~Configure(); void parseCmdLine(); -#if !defined(EVAL) void validateArgs(); -#endif bool displayHelp(); QString defaultTo(const QString &option); @@ -70,27 +68,20 @@ public: bool verifyConfiguration(); void generateOutputVars(); -#if !defined(EVAL) void generateHeaders(); - void generateBuildKey(); void generateCachefile(); void displayConfig(); -#endif void generateMakefiles(); void appendMakeItem(int inList, const QString &item); -#if !defined(EVAL) void generateConfigfiles(); void detectArch(); void generateQConfigPri(); - void generateSystemVars(); -#endif + void prepareConfigTests(); void showSummary(); QString firstLicensePath(); -#if !defined(EVAL) bool showLicense(QString licenseFile); void readLicense(); -#endif QString addDefine(QString def); @@ -172,10 +163,8 @@ private: QString locateFile(const QString &fileName) const; bool findFile(const QString &fileName) const { return !locateFile(fileName).isEmpty(); } static QString findFileInPaths(const QString &fileName, const QStringList &paths); -#if !defined(EVAL) void reloadCmdLine(); void saveCmdLine(); -#endif bool tryCompileProject(const QString &projectPath, const QString &extraOptions = QString()); bool compilerSupportsFlag(const QString &compilerAndArgs); diff --git a/tools/configure/main.cpp b/tools/configure/main.cpp index c4154c8f38..9beee36a50 100644 --- a/tools/configure/main.cpp +++ b/tools/configure/main.cpp @@ -55,9 +55,7 @@ int runConfigure( int argc, char** argv ) return 3; app.parseCmdLine(); -#if !defined(EVAL) app.validateArgs(); -#endif if (!app.isOk()) return 3; if( app.displayHelp() ) @@ -70,23 +68,30 @@ int runConfigure( int argc, char** argv ) if (!app.isOk()) return 3; + // Source file with path settings. Needed by qmake. app.generateQConfigCpp(); + // Bootstrapped includes. Needed by qmake. app.generateHeaders(); if (!app.isOk()) return 3; + // Bootstrap qmake. Needed by config tests. app.buildQmake(); if (!app.isOk()) return 3; - app.generateSystemVars(); + // Prepare the config test build directory. + app.prepareConfigTests(); if (!app.isOk()) return 3; // Auto-detect modules and settings. app.autoDetection(); + // ... and the CPU architectures. + app.detectArch(); + // After reading all command-line arguments, and doing all the // auto-detection, it's time to do some last minute validation. // If the validation fails, we cannot continue. @@ -95,22 +100,14 @@ int runConfigure( int argc, char** argv ) app.generateOutputVars(); -#if !defined(EVAL) if( !app.isDone() ) app.generateCachefile(); if( !app.isDone() ) - app.generateBuildKey(); - if( !app.isDone() ) app.generateConfigfiles(); - // must be done after buildQmake() - if (!app.isDone()) - app.detectArch(); - // must be done after detectArch() if (!app.isDone()) app.generateQConfigPri(); if (!app.isDone()) app.displayConfig(); -#endif if( !app.isDone() ) app.generateMakefiles(); if( !app.isDone() ) |