Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
55 lines (42 sloc) 1.75 KB
;; Nukefile for NuJSON
;; Commands:
;; nuke - builds NuJSON as a framework
;; nuke test - runs the unit tests in the NuTests directory
;; nuke install - installs NuJSON in /Library/Frameworks
;; nuke clean - removes build artifacts
;; nuke clobber - removes build artifacts and NuJSON.framework
;; The "nuke" build tool is installed with Nu (
;; the @variables below are instance variables of a NukeProject.
;; for details, see tools/nuke in the Nu source distribution.
;; source files
(set @m_files (filelist "^objc/.*.m$"))
(set SYSTEM ((NSString stringWithShellCommand:"uname") chomp))
(case SYSTEM
(set @cflags "-g -std=gnu99")
(set @ldflags "-framework Foundation"))
(set @arch (list "i386"))
(set gnustep_flags ((NSString stringWithShellCommand:"gnustep-config --objc-flags") chomp))
(set gnustep_libs ((NSString stringWithShellCommand:"gnustep-config --base-libs") chomp))
(set @cflags "-g -std=gnu99 -DLINUX -I/usr/local/include #{gnustep_flags}")
(set @ldflags "#{gnustep_libs}"))
(else nil))
;; framework description
(set @framework "NuJSON")
(set @framework_identifier "nu.programming.json")
(set @framework_creator_code "????")
(task "clobber" => "clean" is
(SH "rm -rf #{@framework_dir}")) ;; @framework_dir is defined by the nuke framework-tasks macro
(task "default" => "framework")
(task "install" => "framework" is
(SH "sudo rm -rf /Library/Frameworks/#{@framework}.framework")
(SH "sudo cp -rp #{@framework}.framework /Library/Frameworks/#{@framework}.framework"))
(task "test" => "framework" is
(SH "nutest test/test_*.nu"))