mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Update Rakefile.
So that you can omit `host` target. Now `host-debug` works.
This commit is contained in:
@@ -52,15 +52,19 @@ task :default => :all
|
||||
|
||||
bin_path = ENV['INSTALL_DIR'] || "#{MRUBY_ROOT}/bin"
|
||||
|
||||
depfiles = MRuby.targets['host'].bins.map do |bin|
|
||||
install_path = MRuby.targets['host'].exefile("#{bin_path}/#{bin}")
|
||||
source_path = MRuby.targets['host'].exefile("#{MRuby.targets['host'].build_dir}/bin/#{bin}")
|
||||
if MRuby.targets['host']
|
||||
target = MRuby.targets['host']
|
||||
depfiles = target.bins.map do |bin|
|
||||
install_path = target.exefile("#{bin_path}/#{bin}")
|
||||
source_path = target.exefile("#{target.build_dir}/bin/#{bin}")
|
||||
|
||||
file install_path => source_path do |t|
|
||||
install_D t.prerequisites.first, t.name
|
||||
file install_path => source_path do |t|
|
||||
install_D t.prerequisites.first, t.name
|
||||
end
|
||||
install_path
|
||||
end
|
||||
|
||||
install_path
|
||||
else
|
||||
depfiles = []
|
||||
end
|
||||
|
||||
MRuby.each_target do |target|
|
||||
|
||||
+6
-4
@@ -247,9 +247,10 @@ EOS
|
||||
def mrbcfile
|
||||
return @mrbcfile if @mrbcfile
|
||||
|
||||
mrbc_build = MRuby.targets['host']
|
||||
gems.each { |v| mrbc_build = self if v.name == 'mruby-bin-mrbc' }
|
||||
@mrbcfile = mrbc_build.exefile("#{mrbc_build.build_dir}/bin/mrbc")
|
||||
unless gems.detect { |v| v.name == 'mruby-bin-mrbc' }
|
||||
gem :core => "mruby-bin-mrbc"
|
||||
end
|
||||
@mrbcfile = self.exefile("#{self.build_dir}/bin/mrbc")
|
||||
end
|
||||
|
||||
def compilers
|
||||
@@ -387,7 +388,8 @@ EOS
|
||||
end
|
||||
|
||||
def mrbcfile
|
||||
MRuby.targets['host'].exefile("#{MRuby.targets['host'].build_dir}/bin/mrbc")
|
||||
host = MRuby.targets['host']
|
||||
host.exefile("#{host.build_dir}/bin/mrbc")
|
||||
end
|
||||
|
||||
def run_test
|
||||
|
||||
Reference in New Issue
Block a user