diff options
| author | mattn <[email protected]> | 2013-01-10 10:04:07 +0900 |
|---|---|---|
| committer | mattn <[email protected]> | 2013-01-10 10:04:07 +0900 |
| commit | ee0f73a46a17411f6dfc88163bf5d76241932a48 (patch) | |
| tree | 00c9c8bd8346598b6f2e2e0a608f376197f656c8 /Rakefile | |
| parent | ef4b0c6cd3442598169dad9e6861d3c2db271f58 (diff) | |
| parent | 5804e7682ecbd59c1a9cea56c9ad008cff206713 (diff) | |
| download | mruby-ee0f73a46a17411f6dfc88163bf5d76241932a48.tar.gz mruby-ee0f73a46a17411f6dfc88163bf5d76241932a48.zip | |
Merge branch 'master' of https://github.com/mruby/mruby
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 |
