Skip to content

Instantly share code, notes, and snippets.

@toch
Created January 19, 2016 19:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save toch/18de963fed6d94b463a1 to your computer and use it in GitHub Desktop.
Save toch/18de963fed6d94b463a1 to your computer and use it in GitHub Desktop.
mruby minimum Rakefile
APP_ROOT=ENV["APP_ROOT"] || Dir.pwd
# avoid redefining constants in mruby Rakefile
mruby_root=File.expand_path(ENV["MRUBY_ROOT"] || "#{APP_ROOT}/mruby")
mruby_config=File.expand_path(ENV["MRUBY_CONFIG"] || "build_config.rb")
ENV['MRUBY_ROOT'] = mruby_root
ENV['MRUBY_CONFIG'] = mruby_config
Rake::Task[:mruby].invoke unless Dir.exist?(mruby_root)
Dir.chdir(mruby_root)
load "#{mruby_root}/Rakefile"
desc "compile binary"
task :compile => [:all]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment