mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Refactor Build#compile_as_cxx.
This commit is contained in:
committed by
Yukihiro "Matz" Matsumoto
parent
69a2c5cc73
commit
2e4bc2de88
@@ -127,8 +127,8 @@ module MRuby
|
||||
obj = objfile(cxx_src) if obj.nil?
|
||||
|
||||
file cxx_src => [src, __FILE__] do |t|
|
||||
File.open(t.name, 'w') do |f|
|
||||
f.write <<EOS
|
||||
FileUtils.mkdir_p File.dirname t.name
|
||||
IO.write t.name, <<EOS
|
||||
#define __STDC_CONSTANT_MACROS
|
||||
#define __STDC_LIMIT_MACROS
|
||||
|
||||
@@ -136,9 +136,8 @@ extern "C" {
|
||||
#include "#{src}"
|
||||
}
|
||||
|
||||
#{File.basename(src) == 'error.c'? 'mrb_int mrb_jmpbuf::jmpbuf_id = 0;' : ''}
|
||||
#{src == "#{MRUBY_ROOT}/src/error.c"? 'mrb_int mrb_jmpbuf::jmpbuf_id = 0;' : ''}
|
||||
EOS
|
||||
end
|
||||
end
|
||||
|
||||
file obj => cxx_src do |t|
|
||||
|
||||
Reference in New Issue
Block a user