Fix auto detection in configure.exe
authorRafael Roquetto <rafael.roquetto.qnx@kdab.com>
Wed, 18 Jul 2012 12:01:08 +0000 (14:01 +0200)
committerQt by Nokia <qt-info@nokia.com>
Wed, 18 Jul 2012 12:36:12 +0000 (14:36 +0200)
All auto detection tests were failing
because the default mkspec was not yet
installed during the time they were run.

Change-Id: Iad14580f38d1539d9831917e5c9c707eae4c0c90
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
tools/configure/configureapp.cpp

index 153be04..fc33922 100644 (file)
@@ -3211,11 +3211,6 @@ void Configure::generateConfigfiles()
         tmpFile.close();
     }
 
-    QString spec = dictionary.contains("XQMAKESPEC") ? dictionary["XQMAKESPEC"] : dictionary["QMAKESPEC"];
-    if (!copySpec("default", "", spec)
-        || !copySpec("default-host", "host ", dictionary["QMAKESPEC"]))
-        return;
-
     QTemporaryFile tmpFile3;
     if (tmpFile3.open()) {
         tmpStream.setDevice(&tmpFile3);
@@ -3635,6 +3630,15 @@ void Configure::buildQmake()
         confStream.flush();
         confFile.close();
     }
+
+    //create default mkspecs
+    QString spec = dictionary.contains("XQMAKESPEC") ? dictionary["XQMAKESPEC"] : dictionary["QMAKESPEC"];
+    if (!copySpec("default", "", spec)
+        || !copySpec("default-host", "host ", dictionary["QMAKESPEC"])) {
+        cout << "Error installing default mkspecs" << endl << endl;
+        exit(EXIT_FAILURE);
+    }
+
 }
 #endif