0
(if (eq (uname) "Darwin")
0
- (then (set @includes ""))
0
- (else (set @includes " -I/usr/local/include")))
0
+ (then (set @includes " -I./include "))
0
+ (else (set @includes " -I./include -I/usr/local/include")))
0
(if (NSFileManager directoryExistsNamed:"#{@prefix}/include") (@includes appendString:" -I #{@prefix}/include"))
0
(if (eq (uname) "Darwin") (then (set @framework_initializer "NuInit")))
0
(set @framework_creator_code "????")
0
+;; for Linux, we build Nu as a dynamic library
0
@@ -103,7 +106,7 @@ END)
0
- "-lNuFound
ation -L/usr/local/lib -lobjc -Wl,--rpath -Wl,/usr/local/lib"
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
@@ -114,15 +117,19 @@ 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
-(file "#{@framework_headers_dir}/Nu.h" => "objc/Nu.h" @framework_headers_dir is
0
- (SH "cp objc/Nu.h #{@framework_headers_dir}"))
0
+(if (eq (uname) "Darwin")
0
+ (file "#{@framework_headers_dir}/Nu.h" => "objc/Nu.h" @framework_headers_dir is
0
+ (SH "cp objc/Nu.h #{@framework_headers_dir}")))
0
(task "clobber" => "clean" is
0
- (SH "rm -rf nush #{@framework_dir} doc")
0
+ (if (eq (uname) "Darwin")
0
+ (SH "rm -rf nush #{@framework_dir} doc"))
0
((filelist "^examples/[^/]*$") each:
0
@@ -136,10 +143,10 @@ END)
0
(if (eq (uname) "Darwin")
0
(file nush_thin_binary => "framework" "build/#{architecture}/main.o" is
0
- (SH "#{@cc} #{@cflags}
-arch #{architecture} -F. -framework Nu build/#{architecture}/main.o #{@ldflags} -o #{(target name)}")))
0
+ (SH "#{@cc} #{@cflags}
#{@mflags} main/main.m -arch #{architecture} -F. -framework Nu #{@ldflags} -o #{(target name)}")))
0
- (file nush_thin_binary => (@c_objects objectForKey:architecture) (@m_objects objectForKey:architecture) is
0
- (SH "#{@cc} #{@cflags} -F. build/#{architecture}/nu.o /usr/lib/libNu.so #{@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
(if (eq (uname) "Darwin")
0
@@ -170,14 +177,20 @@ END)
0
(task "install" => "nush" is
0
('("nuke" "nubile" "nutemplate" "nutest" "nudoc" "nubake") each:
0
- (SH "sudo ditto tools/#{program} #{@installprefix}/bin")))
0
- (SH "sudo ditto nush #{@installprefix}/bin")
0
- (SH "sudo rm -rf #{@destdir}/Library/Frameworks/#{@framework}.framework")
0
- (SH "ditto #{@framework}.framework #{@destdir}/Library/Frameworks/#{@framework}.framework")
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
+ (if (eq (uname) "Linux")
0
+ ;; install the dynamic library
0
+ (SH "sudo cp #{@library_executable_name} #{@installprefix}/lib"))
0
(SH "sudo mkdir -p #{@installprefix}/share")
0
(SH "sudo rm -rf #{@installprefix}/share/nu")
0
- (SH "sudo ditto share/nu #{@installprefix}/share/nu")
0
- (SH "sudo ditto examples #{@installprefix}/share/nu/examples"))
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.
0
(task "framework_image" => "framework" is
Comments
No one has commented yet.