Created
July 27, 2010 18:38
-
-
Save rjungemann/492646 to your computer and use it in GitHub Desktop.
Install Boehm GC on OS X
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# how to install boehm gc on OS X | |
task :clean do | |
sh "rm -rf gc" if File.exists?("gc") | |
end | |
task :checkout do | |
#sh "curl -O http://www.hpl.hp.com/personal/Hans_Boehm/gc/gc_source/gc-7.2alpha4.tar.gz" | |
#sh "tar zxf gc-*.tar.gz && rm gc-*.tar.gz" | |
#sh "mv gc-* gc" | |
sh "cvs -d:pserver:[email protected]:/cvsroot/bdwgc login" | |
sh "cvs -z3 -d:pserver:[email protected]:" + | |
"/cvsroot/bdwgc co -P bdwgc" | |
sh "mv bdwgc gc" | |
end | |
task :build do | |
sh "cd gc && ./configure && make" | |
end | |
task :test_clean do | |
sh "rm main libgc.dylib" | |
end | |
task :test_build do | |
sh "cp gc/.libs/libgc.dylib ." | |
sh "gcc -Igc/include main.c libgc.dylib -o main" | |
sh "install_name_tool -change /usr/local/lib/libgc.1.dylib " + | |
"@executable_path/libgc.dylib main" | |
end | |
task :test_run do | |
sh "./main" | |
puts "Done!" | |
end | |
task :default => [:clean, :checkout, :build, | |
:test_clean, :test_build, :test_run] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment