diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2013-01-09 08:49:13 -0800 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2013-01-09 08:49:13 -0800 |
| commit | 5804e7682ecbd59c1a9cea56c9ad008cff206713 (patch) | |
| tree | 00c9c8bd8346598b6f2e2e0a608f376197f656c8 /Rakefile | |
| parent | 4f3e217ce774e67a256f98f6b2cf9dd245d63032 (diff) | |
| parent | 33350251ae3d8d683ac4b4c462e7f8aa690c25da (diff) | |
| download | mruby-5804e7682ecbd59c1a9cea56c9ad008cff206713.tar.gz mruby-5804e7682ecbd59c1a9cea56c9ad008cff206713.zip | |
Merge pull request #714 from masuidrive/add_flags_for_building
Added conf.bins for defining bulding binaries
Diffstat (limited to 'Rakefile')
| -rw-r--r-- | Rakefile | 26 |
1 files changed, 11 insertions, 15 deletions
@@ -27,25 +27,21 @@ load 'test/mrbtest.rake' # generic build targets, rules task :default => :all -binfiles = [exefile('bin/mruby'), exefile('bin/mirb'), exefile('bin/mrbc')] - -desc "build all targets, install (locally) in-repo" -task :all => binfiles + MRuby.targets.map { |t| [exefile("#{t.build_dir}/bin/mruby"), exefile("#{t.build_dir}/bin/mirb"), exefile("#{t.build_dir}/bin/mrbc")] }.flatten - -file exefile('bin/mruby') => exefile('build/host/bin/mruby') do |t| - FileUtils.cp t.prerequisites.first, t.name -end +binfiles = MRuby.targets['host'].bins.map do |bin| + install_path = exefile("bin/#{bin}") + + file install_path => exefile("build/host/bin/#{bin}") do |t| + FileUtils.cp t.prerequisites.first, t.name + end -file exefile('bin/mirb') => exefile('build/host/bin/mirb') do |t| - FileUtils.cp t.prerequisites.first, t.name + install_path end -file exefile('bin/mrbc') => exefile('build/host/bin/mrbc') do |t| - FileUtils.cp t.prerequisites.first, t.name -end +desc "build all targets, install (locally) in-repo" +task :all => binfiles + MRuby.targets.values.map { |t| [exefile("#{t.build_dir}/bin/mruby"), exefile("#{t.build_dir}/bin/mirb"), exefile("#{t.build_dir}/bin/mrbc")] }.flatten desc "run all mruby tests" -task :test => MRuby.targets.map { |t| exefile("#{t.build_dir}/test/mrbtest") } do +task :test => MRuby.targets.values.map { |t| exefile("#{t.build_dir}/test/mrbtest") } do sh "#{filename exefile('build/host/test/mrbtest')}" if MRuby.targets.count > 1 puts "\nYou should run #{MRuby.targets.map{ |t| t.name == 'host' ? nil : "#{t.build_dir}/test/mrbtest" }.compact.join(', ')} on target device." @@ -54,7 +50,7 @@ end desc "clean all built and in-repo installed artifacts" task :clean do - MRuby.targets.each do |t| + MRuby.each_target do |t| FileUtils.rm_rf t.build_dir end FileUtils.rm_f binfiles |
