Skip to content

Commit

Permalink
Change task rule based on build_dir so main rules don't clobber gem r…
Browse files Browse the repository at this point in the history
…ules.
  • Loading branch information
carsonmcdonald committed Feb 6, 2013
1 parent 913faa4 commit 42b7fe6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tasks/mruby_build_commands.rake
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,11 @@ module MRuby
def define_rules(build_dir, source_dir='')
@out_ext = build.exts.object

generated_file_matcher = Regexp.new("^#{build_dir}/(.*)#{Regexp.escape out_ext}$")
if build_dir.include? "mrbgems/"
generated_file_matcher = Regexp.new("^#{build_dir}/(.*)#{Regexp.escape out_ext}$")
else
generated_file_matcher = Regexp.new("^#{build_dir}/(?!mrbgems/.+/)(.*)#{Regexp.escape out_ext}$")
end
source_exts.each do |ext, compile|
rule generated_file_matcher => [
proc { |file|
Expand Down

0 comments on commit 42b7fe6

Please sign in to comment.