mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Must not depend on the “host” build to generate mruby-compiler/core/y.tab.c
“mruby-compiler” should be able to generate `y.tab.c` files through a separate build configuration if it is not added to the ‘host’ build. In the example above, the “host/mrbc” build should generate the `y.tab.c` file.
This commit is contained in:
@@ -14,10 +14,10 @@ MRuby::Gem::Specification.new 'mruby-compiler' do |spec|
|
||||
build.libmruby_core_objs << objs
|
||||
end
|
||||
|
||||
if MRuby::Build.current.name == "host"
|
||||
dir = __dir__
|
||||
lex_def = "#{dir}/core/lex.def"
|
||||
dir = __dir__
|
||||
lex_def = "#{dir}/core/lex.def"
|
||||
|
||||
unless Rake::Task.task_defined?(lex_def)
|
||||
# Parser
|
||||
file "#{dir}/core/y.tab.c" => ["#{dir}/core/parse.y", lex_def] do |t|
|
||||
MRuby.targets["host"].yacc.run t.name, t.prerequisites.first
|
||||
|
||||
Reference in New Issue
Block a user