Skip to content

Commit b489932

Browse files
tochhone
authored andcommitted
Improvement of the rake task compile
* release task depends on compile task * check the presence of toolchain before running the compile task * remove superfluoous load of mrbtest.rake
1 parent 0827f1b commit b489932

2 files changed

Lines changed: 9 additions & 0 deletions

File tree

Rakefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ load "#{mruby_root}/Rakefile"
2121

2222
desc "compile all the binaries"
2323
task :compile => [:all] do
24+
MRuby.each_target do |target|
25+
`#{target.cc.command} --version`
26+
abort("Command #{target.cc.command} for #{target.name} is missing.") unless $?.success?
27+
end
2428
%W(#{mruby_root}/build/x86_64-pc-linux-gnu/bin/#{APP_NAME} #{mruby_root}/build/i686-pc-linux-gnu/#{APP_NAME}").each do |bin|
2529
sh "strip --strip-unneeded #{bin}" if File.exist?(bin)
2630
end

mrblib/mruby-cli/setup.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -329,6 +329,11 @@ def rakefile
329329
330330
desc "compile binary"
331331
task :compile => [:all] do
332+
333+
MRuby.each_target do |target|
334+
`\#{target.cc.command} --version`
335+
abort("Command \#{target.cc.command} for \#{target.name} is missing.") unless $?.success?
336+
end
332337
%W(\#{mruby_root}/build/x86_64-pc-linux-gnu/bin/\#{APP_NAME} \#{mruby_root}/build/i686-pc-linux-gnu/\#{APP_NAME}").each do |bin|
333338
sh "strip --strip-unneeded \#{bin}" if File.exist?(bin)
334339
end

0 commit comments

Comments
 (0)