don't compile the host tools for wince already in configure
authorOswald Buddenhagen <oswald.buddenhagen@nokia.com>
Fri, 22 Jun 2012 17:52:41 +0000 (19:52 +0200)
committerQt by Nokia <qt-info@nokia.com>
Tue, 26 Jun 2012 22:46:35 +0000 (00:46 +0200)
qmake can now produce proper mixed-target projects

Change-Id: I797f055f6e1487b9aefb75eee91d6c2cc4e6e56e
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
src/src.pro
src/tools/tools.pro
tools/configure/configureapp.cpp
tools/configure/configureapp.h
tools/configure/main.cpp

index a474b79..986c955 100644 (file)
@@ -9,6 +9,7 @@ src_winmain.depends = sub-corelib  # just for the module .pri file
 
 src_corelib.subdir = $$PWD/corelib
 src_corelib.target = sub-corelib
+src_corelib.depends = src_tools
 
 src_xml.subdir = $$PWD/xml
 src_xml.target = sub-xml
@@ -59,11 +60,7 @@ src_plugins.target = sub-plugins
 src_plugins.depends = src_sql src_xml src_network src_platformsupport
 
 # this order is important
-!wince* {
-    SUBDIRS += src_tools
-    src_corelib.depends += src_tools
-}
-SUBDIRS += src_corelib
+SUBDIRS += src_tools src_corelib
 win32:SUBDIRS += src_winmain
 SUBDIRS += src_network src_sql src_xml src_testlib
 contains(QT_CONFIG, dbus) {
index bd88962..d626077 100644 (file)
@@ -21,7 +21,7 @@ contains(QT_CONFIG, dbus) {
     src_tools_qdbuscpp2xml.target = sub-qdbuscpp2xml
 }
 
-!wince*:!ordered {
+!ordered {
     # Set dependencies for each subdir
     src_tools_moc.depends = src_tools_bootstrap
     src_tools_rcc.depends = src_tools_bootstrap
index f38ee50..9757ade 100644 (file)
@@ -3641,71 +3641,6 @@ void Configure::buildQmake()
 }
 #endif
 
-void Configure::buildHostTools()
-{
-    if (dictionary[ "NOPROCESS" ] == "yes")
-        dictionary[ "DONE" ] = "yes";
-
-    if (!dictionary.contains("XQMAKESPEC"))
-        return;
-
-    QString pwd = QDir::currentPath();
-    QStringList hostToolsDirs;
-    hostToolsDirs
-        << "src/tools";
-
-    for (int i = 0; i < hostToolsDirs.count(); ++i) {
-        cout << "Creating " << hostToolsDirs.at(i) << " ..." << endl;
-        QString toolBuildPath = buildPath + "/" + hostToolsDirs.at(i);
-        QString toolSourcePath = sourcePath + "/" + hostToolsDirs.at(i);
-
-        // generate Makefile
-        QStringList args;
-        args << QDir::toNativeSeparators(buildPath + "/bin/qmake");
-        // override .qmake.cache because we are not cross-building these.
-        // we need a full path so that a build with -prefix will still find it.
-        args << "-spec" << QDir::toNativeSeparators(buildPath + "/mkspecs/" + dictionary["QMAKESPEC"]);
-        args << "-r";
-        args << "-o" << QDir::toNativeSeparators(toolBuildPath + "/Makefile");
-
-        QDir().mkpath(toolBuildPath);
-        QDir::setCurrent(toolSourcePath);
-        int exitCode = Environment::execute(args, QStringList(), QStringList());
-        if (exitCode) {
-            cout << "qmake failed, return code " << exitCode << endl << endl;
-            dictionary["DONE"] = "error";
-            break;
-        }
-
-        // build app
-        args.clear();
-        args += dictionary["MAKE"];
-        QDir::setCurrent(toolBuildPath);
-        exitCode = Environment::execute(args, QStringList(), QStringList());
-        if (exitCode) {
-            args.clear();
-            args += dictionary["MAKE"];
-            args += "clean";
-            exitCode = Environment::execute(args, QStringList(), QStringList());
-            if (exitCode) {
-                cout << "Cleaning " << hostToolsDirs.at(i) << " failed, return code " << exitCode << endl << endl;
-                dictionary["DONE"] = "error";
-                break;
-            } else {
-                args.clear();
-                args += dictionary["MAKE"];
-                exitCode = Environment::execute(args, QStringList(), QStringList());
-                if (exitCode) {
-                    cout << "Building " << hostToolsDirs.at(i) << " failed, return code " << exitCode << endl << endl;
-                    dictionary["DONE"] = "error";
-                    break;
-                }
-            }
-        }
-    }
-    QDir::setCurrent(pwd);
-}
-
 void Configure::findProjects(const QString& dirName)
 {
     if (dictionary[ "NOPROCESS" ] == "no") {
index 6b9d9b7..c16b9e2 100644 (file)
@@ -74,7 +74,6 @@ public:
     void generateCachefile();
     void displayConfig();
     void buildQmake();
-    void buildHostTools();
 #endif
     void generateMakefiles();
     void appendMakeItem(int inList, const QString &item);
index 08cd691..794793b 100644 (file)
@@ -102,8 +102,6 @@ int runConfigure( int argc, char** argv )
     if( !app.isDone() )
        app.generateMakefiles();
     if( !app.isDone() )
-       app.buildHostTools();
-    if( !app.isDone() )
        app.showSummary();
     if( !app.isOk() )
        return 2;