summaryrefslogtreecommitdiffhomepage
path: root/mrbgems
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2021-11-06 19:58:28 +0900
committerGitHub <[email protected]>2021-11-06 19:58:28 +0900
commit5c8e184fcf181786b7b2c2a455703c0635f07cb6 (patch)
treeb2aee3b12b33a4c015879fc2490c90a211385e21 /mrbgems
parentc3a1456cc85cc383622b38bd1f903925effb4eb0 (diff)
parent66a55fb4dfe1190dd9d87c7a07eb9e0cacc2df23 (diff)
downloadmruby-5c8e184fcf181786b7b2c2a455703c0635f07cb6.tar.gz
mruby-5c8e184fcf181786b7b2c2a455703c0635f07cb6.zip
Merge pull request #5437 from dearblue/parse.y
Run the task only once when `parse.y` is updated
Diffstat (limited to 'mrbgems')
-rw-r--r--mrbgems/mruby-compiler/mrbgem.rake7
1 files changed, 5 insertions, 2 deletions
diff --git a/mrbgems/mruby-compiler/mrbgem.rake b/mrbgems/mruby-compiler/mrbgem.rake
index 3ecaa8908..be069f386 100644
--- a/mrbgems/mruby-compiler/mrbgem.rake
+++ b/mrbgems/mruby-compiler/mrbgem.rake
@@ -12,18 +12,21 @@ MRuby::Gem::Specification.new 'mruby-compiler' do |spec|
end
end
build.libmruby_core_objs << objs
+end
+if MRuby::Build.current.name == "host"
+ dir = __dir__
lex_def = "#{dir}/core/lex.def"
# Parser
file "#{dir}/core/y.tab.c" => ["#{dir}/core/parse.y", lex_def] do |t|
- yacc.run t.name, t.prerequisites.first
+ MRuby.targets["host"].yacc.run t.name, t.prerequisites.first
replace_line_directive(t.name)
end
# Lexical analyzer
file lex_def => "#{dir}/core/keywords" do |t|
- gperf.run t.name, t.prerequisites.first
+ MRuby.targets["host"].gperf.run t.name, t.prerequisites.first
replace_line_directive(t.name)
end