Create a gist now

Instantly share code, notes, and snippets.

@michaelbarton /Makefile Secret
Created May 4, 2012

What would you like to do?
build = ruby-1.9.3-p0
ruby_dir = ./ruby/bin
gem_dir = ./gems
ruby_opts = GEM_HOME=$(gem_dir)
gem = $(ruby_dir)/gem
ruby = $(ruby_dir)/ruby
bundler = $(gem_dir)/bin/bundle
error: $(bundler) Gemfile
$(ruby_opts) $(bundler)
echo "bundler" > $?
$(bundler): $(ruby_dir)
$(ruby_opts) $(gem) install bundler
$(ruby_dir): $(build)/Makefile
( cd ./$(build) ; make install)
$(build)/Makefile: $(filter-out $(wildcard $(build)), $(build))
( cd ./$? ; ./configure --prefix=`pwd`/../ruby)
$(build): $(build).tar.bz2
tar xjf $?
rm -rf $(build)*
# Required apt packages: libyaml-dev zlib1g-dev libssl-dev libreadline5-dev libxml2-dev libsqlite3-dev
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment