Don't assume that commands succeed
authorLincoln Ramsay <lincoln.ramsay@nokia.com>
Thu, 28 Apr 2011 04:22:30 +0000 (14:22 +1000)
committeraxis <qt-info@nokia.com>
Tue, 3 May 2011 11:47:51 +0000 (13:47 +0200)
Signed-off-by: axis <qt-info@nokia.com>
configure

index 5ca40f3..0c3a268 100755 (executable)
--- a/configure
+++ b/configure
@@ -51,7 +51,8 @@ if (! -e "$relpath/qtbase/configure") {
 
 ensureDir("$outpath/qtbase");
 chdir("$outpath/qtbase");
-system_v("$relpath/qtbase/configure @ARGV");
+my $ret = system_v("$relpath/qtbase/configure @ARGV");
+exit $ret unless ($ret == 0);
 
 chdir("$outpath");
 
@@ -59,6 +60,5 @@ open QMAKE_CACHE, ">.qmake.cache" || die "Could not open .qmake.cache for writin
 print QMAKE_CACHE "include(\$\$PWD/qtbase/.qmake.cache)\n";
 close QMAKE_CACHE;
 
-system_v("$outpath/qtbase/bin/qmake $relpath/qt.pro");
-
-exit 0;
+$ret = system_v("$outpath/qtbase/bin/qmake $relpath/qt.pro");
+exit $ret;