From de33b1e1319a65eddb90d720a836666078f0b0d5 Mon Sep 17 00:00:00 2001 From: Carson McDonald Date: Wed, 9 Jan 2013 15:27:32 -0500 Subject: Make conf.bins work for cross compiled deps as well as the host. --- Rakefile | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Rakefile b/Rakefile index d067a2279..f522c808b 100644 --- a/Rakefile +++ b/Rakefile @@ -27,18 +27,22 @@ load 'test/mrbtest.rake' # generic build targets, rules task :default => :all -binfiles = MRuby.targets['host'].bins.map do |bin| +depfiles = 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 - + install_path end +depfiles += MRuby.targets.reject {|n,t| n == 'host' }.map do |n, t| + ["#{t.build_dir}/lib/libmruby.a"] + t.bins.map { |bin| exefile("#{t.build_dir}/bin/#{bin}") } +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 +task :all => depfiles desc "run all mruby tests" task :test => MRuby.targets.values.map { |t| exefile("#{t.build_dir}/test/mrbtest") } do @@ -53,5 +57,5 @@ task :clean do MRuby.each_target do |t| FileUtils.rm_rf t.build_dir end - FileUtils.rm_f binfiles + FileUtils.rm_f depfiles end -- cgit v1.2.3 From f5401192e308415be6730978257c26f15e4a7651 Mon Sep 17 00:00:00 2001 From: Xuejie Xiao Date: Wed, 9 Jan 2013 21:55:55 -0500 Subject: Test ruby library should depend on host's mrbc, not its own mrbc --- test/mrbtest.rake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/mrbtest.rake b/test/mrbtest.rake index cd560d206..33f283fc9 100644 --- a/test/mrbtest.rake +++ b/test/mrbtest.rake @@ -15,7 +15,7 @@ MRuby.each_target do end file mlib => [clib] - file clib => [exefile("#{build_dir}/bin/mrbc"), init, asslib] + mrbs do |t| + file clib => [mrbcfile, init, asslib] + mrbs do |t| open(clib, 'w') do |f| f.puts File.read(init) compile_mruby f, [asslib] + mrbs, 'mrbtest_irep' -- cgit v1.2.3