diff options
author | James O'Gorman <james@netinertia.co.uk> | 2012-05-24 20:01:14 +0000 |
---|---|---|
committer | James O'Gorman <james@netinertia.co.uk> | 2012-05-24 20:01:14 +0000 |
commit | 11608b5b3e6b23bd5aea683a987d7cfd2827a57e (patch) | |
tree | 4f88e7a38cf28fca083b06a310fd2af326c8d663 /infrastructure | |
parent | ae85aab8886f2e94d0c258532d5806c63fea2a9e (diff) |
Fix BuildPlatform.pm for Mac OS X 10.7+ and Xcode >= 4.
Xcode 4 no longer includes bsdmake so only try to use this if xcodebuild -version is less than 4.
Diffstat (limited to 'infrastructure')
-rw-r--r-- | infrastructure/BoxPlatform.pm.in | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/infrastructure/BoxPlatform.pm.in b/infrastructure/BoxPlatform.pm.in index 7cd14eac..b2b2ce43 100644 --- a/infrastructure/BoxPlatform.pm.in +++ b/infrastructure/BoxPlatform.pm.in @@ -26,11 +26,15 @@ BEGIN $build_os = 'CYGWIN' if $build_os =~ m/CYGWIN/; $build_os = 'MINGW32' if $build_os =~ m/MINGW32/; - $make_command = ($build_os eq 'Darwin') ? 'bsdmake' : ($build_os eq 'SunOS') ? 'gmake' : 'make'; + if ($build_os eq 'Darwin') { + $xcode_ver = `xcodebuild -version | awk '/^Xcode/ {print \$2}'` + } + + $make_command = ($build_os eq 'Darwin' && $xcode_ver < 4) ? 'bsdmake' : ($build_os eq 'SunOS') ? 'gmake' : 'make'; $bsd_make = ($build_os ne 'Linux' && $build_os ne 'CYGWIN' && $build_os ne "MINGW32" && $build_os ne "SunOS" - && $build_os ne 'GNU/kFreeBSD'); + && $build_os ne 'GNU/kFreeBSD' && $xcode_ver < 4); # blank extra flags by default $platform_compile_line_extra = ''; |