0
@@ -83,53 +83,53 @@ END)
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
+ (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
-
(then (set @arch '("ppc" "i386")))) ;; build a universal binary
0
+
(then (set @arch '("ppc" "i386")))) ;; build a universal binary
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
- ((NSFileManager fileExistsNamed:"#{@prefix}/lib/libpcre.a") ("#{@prefix}/lib/libpcre.a"))
0
- (else (NSException raise:"NukeBuildError" format:"Can't find static pcre library (libpcre.a).")))
0
- ((@frameworks map: (do (framework) " -framework #{framework}")) join)
0
- ((@libs map: (do (lib) " -l#{lib}")) join)
0
- ((@lib_dirs map: (do (libdir) " -L#{libdir}")) join))
0
- "-lNuFound -L/usr/local/lib -lobjc -Wl,--rpath -Wl,/usr/local/lib"
0
- (cond ;; statically link in pcre since most people won't have it..
0
- ((NSFileManager fileExistsNamed:"/usr/lib/libpcre.a") "/usr/lib/libpcre.a")
0
- ((NSFileManager fileExistsNamed:"#{@prefix}/lib/libpcre.a") ("#{@prefix}/lib/libpcre.a"))
0
- (else (NSException raise:"NukeBuildError" format:"Can't find static pcre library (libpcre.a).")))
0
- ((@frameworks map: (do (framework) " -framework #{framework}")) join)
0
- ((@libs map: (do (lib) " -l#{lib}")) join))
0
+ (cond ;; statically link in pcre since most people won't have it..
0
+ ((NSFileManager fileExistsNamed:"#{@prefix}/lib/libpcre.a") ("#{@prefix}/lib/libpcre.a"))
0
+ (else (NSException raise:"NukeBuildError" format:"Can't find static pcre library (libpcre.a).")))
0
+ ((@frameworks map: (do (framework) " -framework #{framework}")) join)
0
+ ((@libs map: (do (lib) " -l#{lib}")) join)
0
+ ((@lib_dirs map: (do (libdir) " -L#{libdir}")) join))
0
+ "-lNuFound -L/usr/local/lib -lobjc -Wl,--rpath -Wl,/usr/local/lib"
0
+ (cond ;; statically link in pcre since most people won't have it..
0
+ ((NSFileManager fileExistsNamed:"/usr/lib/libpcre.a") "/usr/lib/libpcre.a")
0
+ ((NSFileManager fileExistsNamed:"#{@prefix}/lib/libpcre.a") ("#{@prefix}/lib/libpcre.a"))
0
+ (else (NSException raise:"NukeBuildError" format:"Can't find static pcre library (libpcre.a).")))
0
+ ((@frameworks map: (do (framework) " -framework #{framework}")) join)
0
+ ((@libs map: (do (lib) " -l#{lib}")) join))
0
;; Setup the tasks for compilation and framework-building.
0
;; These are defined in the nuke application source file.
0
- (then (framework-tasks))
0
+ (then (framework-tasks))
0
(task "framework" => "#{@framework_headers_dir}/Nu.h")
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
+ (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
-
(SH "rm -rf nush #{@framework_dir} doc"))
0
+
(SH "rm -rf nush #{@framework_dir} doc"))
0
((filelist "^examples/[^/]*$") each:
0
@@ -141,17 +141,17 @@ END)
0
(set nush_thin_binary "build/#{architecture}/nush")
0
(nush_thin_binaries addObject:nush_thin_binary)
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
- (file nush_thin_binary => "dylib" (@c_objects objectForKey:architecture) (@m_objects objectForKey:architecture) is
0
- (SH "#{@cc} #{@cflags} #{@mflags} main/main.m #{@library_executable_name} #{@ldflags} -o #{(target name)}"))))))
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
+ (file nush_thin_binary => "dylib" (@c_objects objectForKey:architecture) (@m_objects objectForKey:architecture) is
0
+ (SH "#{@cc} #{@cflags} #{@mflags} main/main.m #{@library_executable_name} #{@ldflags} -o #{(target name)}"))))))
0
(file "nush" => "framework" nush_thin_binaries is
0
- (then (SH "lipo -create #{(nush_thin_binaries join)} -output #{(target name)}"))
0
- (else (SH "cp '#{(nush_thin_binaries objectAtIndex:0)}' '#{(target name)}'"))))
0
+ (then (SH "lipo -create #{(nush_thin_binaries join)} -output #{(target name)}"))
0
+ (else (SH "cp '#{(nush_thin_binaries objectAtIndex:0)}' '#{(target name)}'"))))
0
;; These tests were the first sanity tests for Nu. They require RubyObjC.
0
(task "test.rb" => "framework" is
0
@@ -180,9 +180,9 @@ END)
0
(SH "sudo cp tools/#{program} #{@installprefix}/bin")))
0
(SH "sudo cp nush #{@installprefix}/bin")
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
+ ;; install the framework
0
+ (SH "sudo rm -rf #{@destdir}/Library/Frameworks/#{@framework}.framework")
0
+ (SH "ditto #{@framework}.framework #{@destdir}/Library/Frameworks/#{@framework}.framework"))
0
(if (eq (uname) "Linux")
0
;; install the dynamic library
0
(SH "sudo cp #{@library_executable_name} #{@installprefix}/lib")
0
@@ -193,7 +193,7 @@ END)
0
(SH "sudo rm -rf #{@installprefix}/share/nu")
0
(SH "sudo cp -rp share/nu #{@installprefix}/share/nu")
0
-
(SH "sudo ditto examples #{@installprefix}/share/nu/examples")))
0
+
(SH "sudo ditto examples #{@installprefix}/share/nu/examples")))
0
;; Build a disk image for distributing the framework.
0
(task "framework_image" => "framework" is
0
@@ -229,6 +229,13 @@ END)
0
;; alias for installer task
0
(task "dmg" => "installer")
0
+;; Create a tgz file of the Nu sources.
0
+git-archive --format=tar --prefix=Nu-#{(VERSION first)}.#{(VERSION second)}.#{(VERSION third)}/ HEAD |\
0
+gzip -c > Nu-#{(VERSION first)}.#{(VERSION second)}.#{(VERSION third)}.tgz
0
;; "Bake" nu source files into compilable Objective-C files.
0
(set nu_files (((NSString stringWithShellCommand:"ls nu/*.nu") chomp) componentsSeparatedByString:"\n"))
Comments
No one has commented yet.