summaryrefslogtreecommitdiffstats
path: root/mkspecs
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@digia.com>2013-04-08 12:17:27 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-04-08 17:23:15 +0200
commitced5e2f0e8353a9caa8fbbaaa82d15f7eba3d159 (patch)
treebdc9967ba2d1798e5bc12411c270d7dd4fffb7d2 /mkspecs
parent7a66f6b60e1d08ee6dfc2d452e1998b1673beede (diff)
Handle errors when sysrooting tools on Mac
xcrun will spit out errors to stderr and nothing to stdout if it fails to find the tool in question. By checking for an empty return value and skipping the sysrooting we guard against mangling the tool variable. Change-Id: I68f59a6c8116696dd75cceed7b33ac666f3468b2 Reviewed-by: Eike Ziller <eike.ziller@digia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Diffstat (limited to 'mkspecs')
-rw-r--r--mkspecs/features/mac/sdk.prf4
1 files changed, 3 insertions, 1 deletions
diff --git a/mkspecs/features/mac/sdk.prf b/mkspecs/features/mac/sdk.prf
index 10d94bed11..db33291b99 100644
--- a/mkspecs/features/mac/sdk.prf
+++ b/mkspecs/features/mac/sdk.prf
@@ -24,7 +24,9 @@ for(tool, $$list(QMAKE_CC QMAKE_CXX QMAKE_FIX_RPATH QMAKE_AR QMAKE_RANLIB QMAKE_
value = $$eval($$tool)
isEmpty(value): next()
- sysrooted = $$system("xcrun -sdk $$QMAKE_MAC_SDK -find $$first(value)")
+ sysrooted = $$system("xcrun -sdk $$QMAKE_MAC_SDK -find $$first(value) 2>/dev/null")
+ isEmpty(sysrooted): next()
+
$$tool = $$sysrooted $$member(value, 1, -1)
}