0
@@ -34,38 +34,38 @@ END)
0
(set @nib_files '("share/nu/resources/English.lproj/MainMenu.nib"))
0
-(if (eq (uname) "Darwin")
0
- (then (set @frameworks '("Cocoa"))
0
- (set @libs '("edit" "ffi" ))
0
- (set @lib_dirs (NSMutableArray arrayWithObject:"/usr/lib")))
0
- (else (set @frameworks nil)
0
- (set @libs (list "readline" "ffi" "m" ))
0
- (set @lib_dirs (NSMutableArray arrayWithList:(list "../lib")))))
0
+ (then (set @frameworks '("Cocoa"))
0
+ (set @libs '("edit" "ffi" ))
0
+ (set @lib_dirs (NSMutableArray arrayWithObject:"/usr/lib")))
0
+ (else (set @frameworks nil)
0
+ (set @libs (list "readline" "ffi" "m" ))
0
+ (set @lib_dirs (NSMutableArray arrayWithList:(list "../lib")))))
0
(if (NSFileManager directoryExistsNamed:"#{@prefix}/lib") (@lib_dirs addObject:"#{@prefix}/lib"))
0
-(if (eq (uname) "Darwin")
0
- (then (set @includes " -I ./include -I ./include/Nu "))
0
- (else (set @includes " -I ./include -I ./include/Nu -I /usr/local/include")))
0
+ (then (set @includes " -I ./include -I ./include/Nu "))
0
+ (else (set @includes " -I ./include -I ./include/Nu -I /usr/local/include")))
0
(if (NSFileManager directoryExistsNamed:"#{@prefix}/include") (@includes appendString:" -I #{@prefix}/include"))
0
-(if (eq (uname) "Darwin")
0
- (then (if (NSFileManager fileExistsNamed:"/usr/lib/libffi.dylib")
0
- (then ;; Use the libffi that ships with OS X.
0
- (@includes appendString:" -I /usr/include"))
0
- (else ;; Use the libffi that is distributed with Nu.
0
- (@includes appendString:" -I ./libffi/include")
0
- (@lib_dirs addObject:"./libffi"))))
0
- (else ;; Use the libffi that ships with Linux
0
- (@includes appendString:" -I /usr/include")))
0
+ (then (if (NSFileManager fileExistsNamed:"/usr/lib/libffi.dylib")
0
+ (then ;; Use the libffi that ships with OS X.
0
+ (@includes appendString:" -I /usr/include"))
0
+ (else ;; Use the libffi that is distributed with Nu.
0
+ (@includes appendString:" -I ./libffi/include")
0
+ (@lib_dirs addObject:"./libffi"))))
0
+ (else ;; Use the libffi that ships with Linux
0
+ (@includes appendString:" -I /usr/include")))
0
;; framework description
0
(set @framework_identifier "nu.programming.framework")
0
(set @framework_icon_file "nu.icns")
0
-(if
(eq (uname) "Darwin") (then (set @framework_initializer "NuInit")))
0
+(if
Darwin (then (set @framework_initializer "NuInit")))
0
(set @framework_creator_code "????")
0
;; for Linux, we build Nu as a dynamic library
0
@@ -82,19 +82,19 @@ END)
0
(" -isysroot /Developer/SDKs/MacOSX10.4u.sdk"))
0
-(if
(eq (uname) "Darwin")0
(then (set @cflags "-Wall -g -DDARWIN -DMACOSX #{@sdk} #{@leopard} -std=gnu99")
0
(set @mflags "-fobjc-exceptions")) ;; Want to try Apple's new GC? Add this: "-fobjc-gc"
0
(else (set @cflags "-Wall -DLINUX -g -std=gnu99 ")
0
(set @mflags "-fobjc-exceptions -fconstant-string-class=NSConstantString")))
0
-(if (eq (uname) "Darwin")
0
- ;; use this to build a universal binary
0
- (then (set @arch '("ppc" "i386")))
0
- ;; or this to just build for your current platform
0
- (else (set @arch '("i386"))))
0
+ (then (set @arch '("ppc" "i386")))) ;; build a universal binary
0
-(if (eq (uname) "Darwin")
0
+;; or set this to just build for your chosen platform
0
+;; (set @arch '("i386"))
0
(cond ;; statically link in pcre since most people won't have it..
0
@@ -117,18 +117,18 @@ END)
0
;; Setup the tasks for compilation and framework-building.
0
;; These are defined in the nuke application source file.
0
-(if
(eq (uname) "Darwin")0
(then (framework-tasks))
0
(task "framework" => "#{@framework_headers_dir}/Nu.h")
0
-(if
(eq (uname) "Darwin")0
(file "#{@framework_headers_dir}/Nu.h" => "objc/Nu.h" @framework_headers_dir is
0
(SH "cp include/Nu/Nu.h #{@framework_headers_dir}")))
0
(task "clobber" => "clean" is
0
- (if
(eq (uname) "Darwin")0
(SH "rm -rf nush #{@framework_dir} doc"))
0
((filelist "^examples/[^/]*$") each:
0
@@ -140,7 +140,7 @@ END)
0
(set nush_thin_binary "build/#{architecture}/nush")
0
(nush_thin_binaries addObject:nush_thin_binary)
0
- (if
(eq (uname) "Darwin")0
(file nush_thin_binary => "framework" "build/#{architecture}/main.o" is
0
(SH "#{@cc} #{@cflags} #{@mflags} main/main.m -arch #{architecture} -F. -framework Nu #{@ldflags} -o #{(target name)}")))
0
@@ -149,7 +149,7 @@ END)
0
(SH "#{@cc} #{@cflags} #{@mflags} main/main.m #{@library_executable_name} #{@ldflags} -o #{(target name)}"))))))
0
(file "nush" => "framework" nush_thin_binaries is
0
- (if
(eq (uname) "Darwin")0
(then (SH "lipo -create #{(nush_thin_binaries join)} -output #{(target name)}"))
0
(else (SH "cp '#{(nush_thin_binaries objectAtIndex:0)}' '#{(target name)}'"))))
0
@@ -179,7 +179,7 @@ END)
0
(SH "sudo cp tools/#{program} #{@installprefix}/bin")))
0
(SH "sudo cp nush #{@installprefix}/bin")
0
- (if
(eq (uname) "Darwin")0
;; install the framework
0
(SH "sudo rm -rf #{@destdir}/Library/Frameworks/#{@framework}.framework")
0
(SH "ditto #{@framework}.framework #{@destdir}/Library/Frameworks/#{@framework}.framework"))
0
@@ -187,12 +187,12 @@ END)
0
;; install the dynamic library
0
(SH "sudo cp #{@library_executable_name} #{@installprefix}/lib")
0
-
(SH "sudo rm -rf /usr/local/include/Nu")
0
+
(SH "sudo rm -rf /usr/local/include/Nu")
0
(SH "sudo cp -rp include/Nu /usr/local/include"))
0
(SH "sudo mkdir -p #{@installprefix}/share")
0
(SH "sudo rm -rf #{@installprefix}/share/nu")
0
(SH "sudo cp -rp share/nu #{@installprefix}/share/nu")
0
- (if
(eq (uname) "Darwin")0
(SH "sudo ditto examples #{@installprefix}/share/nu/examples")))
0
;; Build a disk image for distributing the framework.
Comments
No one has commented yet.