From cfe410f46639e0132a5ed7ebfd14b895e14b39a8 Mon Sep 17 00:00:00 2001 From: dearblue Date: Sun, 25 Aug 2024 11:17:56 +0900 Subject: [PATCH] =?UTF-8?q?Must=20not=20depend=20on=20the=20=E2=80=9Chost?= =?UTF-8?q?=E2=80=9D=20build=20to=20generate=20`mruby-compiler/core/y.tab.?= =?UTF-8?q?c`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit “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. --- mrbgems/mruby-compiler/mrbgem.rake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mrbgems/mruby-compiler/mrbgem.rake b/mrbgems/mruby-compiler/mrbgem.rake index 0f49edea3..c5e1bd539 100644 --- a/mrbgems/mruby-compiler/mrbgem.rake +++ b/mrbgems/mruby-compiler/mrbgem.rake @@ -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