Skip to content
Browse files

simplified build to rely on Xcode command-line tools.

also fixed unit test that expected "Xcode" to be installed.
It fails when a developer preview is installed instead (under a different name).
  • Loading branch information...
1 parent 806d8f6 commit 1e1cccb853419ab90a52a67ab235ace4e2779a1a @timburks committed Jul 26, 2012
Showing with 9 additions and 13 deletions.
  1. +2 −2 Makefile
  2. +5 −2 Nukefile
  3. +1 −2 test/test_classes.nu
  4. +1 −7 tools/nuke
View
4 Makefile
@@ -8,8 +8,8 @@ SYSTEM = $(shell uname)
PREFIX ?= /usr/local
-TOOLCHAIN = /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain
-SDKROOT = /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer
+# TOOLCHAIN = /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain
+# SDKROOT = /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer
ifeq ($(shell test -e /usr/lib/libffi.dylib && echo yes), yes)
# Use the libffi that ships with OS X.
View
7 Nukefile
@@ -3,7 +3,7 @@
(set DEVROOT
(ifDarwin (then (NSString stringWithShellCommand:"xcode-select -print-path"))
(else nil)))
-
+
(global VERSION '(2 0 1)) #(major minor tweak)
(task "version" is
@@ -81,7 +81,10 @@ END)
(set @sdkflags "")
(set @sdk
- (cond ((NSFileManager directoryExistsNamed:"#{DEVROOT}/SDKs/MacOSX10.7.sdk")
+ (cond ((NSFileManager directoryExistsNamed:"#{DEVROOT}/SDKs/MacOSX10.8.sdk")
+ (set @sdkflags "-D__OBJC2__ -DSNOWLEOPARD")
+ ("-isysroot #{DEVROOT}/SDKs/MacOSX10.8.sdk"))
+ ((NSFileManager directoryExistsNamed:"#{DEVROOT}/SDKs/MacOSX10.7.sdk")
(set @sdkflags "-D__OBJC2__ -DSNOWLEOPARD")
("-isysroot #{DEVROOT}/SDKs/MacOSX10.7.sdk"))
((NSFileManager directoryExistsNamed:"#{DEVROOT}/SDKs/MacOSX10.6.sdk")
View
3 test/test_classes.nu
@@ -51,8 +51,7 @@
(if (eq (uname) "Darwin")
(- (id) testNSWorkspaceSingletonRemoval is
- ;; I'm almost positive that all Nubies on Macs will have Xcode installed.
- (assert_not_equal nil (NSWorkspace fullPathForApplication:"Xcode") )
+ (assert_not_equal nil ((NSWorkspace sharedWorkspace) fullPathForApplication:"Finder") )
(assert_equal ((NSWorkspace sharedWorkspace) notificationCenter) (NSWorkspace notificationCenter))
(assert_equal ((NSWorkspace sharedWorkspace) activeApplication) (NSWorkspace activeApplication)))
View
8 tools/nuke
@@ -283,9 +283,6 @@
(unless momc (NSException raise:@"NukeError" format:@"Can't find momc (data model compiler)."))
momc)
-(set SDKROOT "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer")
-(set TOOLCHAIN "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain")
-
(function select-compiler ()
(ifDarwin
;; clang built-in to 10.7.3
@@ -295,9 +292,7 @@
(set DEVROOT (NSString stringWithShellCommand:"xcode-select -print-path"))
(set clang "#{DEVROOT}/usr/bin/clang")
(if (not (NSFileManager fileExistsNamed:clang))
- (set clang "#{TOOLCHAIN}/usr/bin/clang")
- (if (not (NSFileManager fileExistsNamed:clang))
- (set clang nil)))))
+ (set clang nil))))
;; default to gcc
(if clang clang (else "gcc")))
@@ -306,7 +301,6 @@
`(progn
(unless @cc (set @cc (select-compiler)))
(unless @cflags (set @cflags "-g"))
- (set @cflags (+ @cflags " -isysroot #{SDKROOT}/SDKs/MacOSX10.7.sdk"))
(unless @mflags (set @mflags "-fobjc-exceptions"))
(unless @includes (set @includes ""))
(ifDarwin

0 comments on commit 1e1cccb

Please sign in to comment.
Something went wrong with that request. Please try again.