Skip to content

Instantly share code, notes, and snippets.

@rjungemann
Created July 27, 2010 18:38
Show Gist options
  • Save rjungemann/492646 to your computer and use it in GitHub Desktop.
Save rjungemann/492646 to your computer and use it in GitHub Desktop.
Install Boehm GC on OS X
# 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:anonymous@bdwgc.cvs.sourceforge.net:/cvsroot/bdwgc login"
sh "cvs -z3 -d:pserver:anonymous@bdwgc.cvs.sourceforge.net:" +
"/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