Do not continue if syncqt fails.
authorLincoln Ramsay <lincoln.ramsay@nokia.com>
Wed, 25 May 2011 05:55:53 +0000 (15:55 +1000)
committerLincoln Ramsay <lincoln.ramsay@nokia.com>
Wed, 25 May 2011 05:59:21 +0000 (15:59 +1000)
If the user has set QTDIR to something other than the location of the
qtbase build directory, syncqt will fail.

This change prevents the build from continuing. Ideally, the system
should ignore the user-set QTDIR value or give an appropriate error.

Reviewed-by: Rohan McGovern
mkspecs/features/default_pre.prf

index adcdbb7..d451d29 100644 (file)
@@ -26,7 +26,11 @@ exists($$_PRO_FILE_PWD_/sync.profile) {
 
     message("Running syncqt for $$PRO_BASENAME in $$OUT_PWD")
     qtPrepareTool(QMAKE_SYNCQT, syncqt)
-    system("$$QMAKE_SYNCQT $$QTFWD -outdir $$OUT_PWD $$_PRO_FILE_PWD_")
+    system("$$QMAKE_SYNCQT $$QTFWD -outdir $$OUT_PWD $$_PRO_FILE_PWD_") {
+        # success! Nothing to do
+    } else {
+        error("Failed to run: $$QMAKE_SYNCQT $$QTFWD -outdir $$OUT_PWD $$_PRO_FILE_PWD_")
+    }
     unset(QTFWD)
     unset(PRO_BASENAME)
 }