Commit 0da057d9 authored by Yukihiro "Matz" Matsumoto's avatar Yukihiro "Matz" Matsumoto

Merge pull request #2900 from joans321/enhance-mrbgem-build

mrbgem compile should be depend on mrbgem.rake
parents 8f3f7315 578db292
......@@ -130,7 +130,7 @@ module MRuby
end
def define_gem_init_builder
file objfile("#{build_dir}/gem_init") => "#{build_dir}/gem_init.c"
file objfile("#{build_dir}/gem_init") => [ "#{build_dir}/gem_init.c", File.join(dir, "mrbgem.rake") ]
file "#{build_dir}/gem_init.c" => [build.mrbcfile, __FILE__] + [rbfiles].flatten do |t|
FileUtils.mkdir_p build_dir
generate_gem_init("#{build_dir}/gem_init.c")
......
......@@ -92,6 +92,8 @@ module MRuby
def define_rules(build_dir, source_dir='')
@out_ext = build.exts.object
gemrake = File.join(source_dir, "mrbgem.rake")
rakedep = File.exist?(gemrake) ? [ gemrake ] : []
if build_dir.include? "mrbgems/"
generated_file_matcher = Regexp.new("^#{Regexp.escape build_dir}/(.*)#{Regexp.escape out_ext}$")
......@@ -104,7 +106,7 @@ module MRuby
file.sub(generated_file_matcher, "#{source_dir}/\\1#{ext}")
},
proc { |file|
get_dependencies(file)
get_dependencies(file) + rakedep
}
] do |t|
run t.name, t.prerequisites.first
......@@ -115,7 +117,7 @@ module MRuby
file.sub(generated_file_matcher, "#{build_dir}/\\1#{ext}")
},
proc { |file|
get_dependencies(file)
get_dependencies(file) + rakedep
}
] do |t|
run t.name, t.prerequisites.first
......
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