Unverified Commit 5c8e184f authored by Yukihiro "Matz" Matsumoto's avatar Yukihiro "Matz" Matsumoto Committed by GitHub

Merge pull request #5437 from dearblue/parse.y

Run the task only once when `parse.y` is updated
parents c3a1456c 66a55fb4
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment