From c6d589e04900c0b90428d78931b7dfa3b4827b62 Mon Sep 17 00:00:00 2001 From: Masaki Muranaka Date: Mon, 9 Jun 2014 23:08:13 +0900 Subject: Do not export include/ dirs in mrbgems to core build. In the current behavior, include/ dirs in mrbgems are set to core's compiler.include_paths. And they are never set to mrbgem's include_paths. It may cause some dangerous issues because it can change mruby core's macros by mrbgems. After this fix, include/ in a gem is used in the gem itself only. --- tasks/mrbgem_spec.rake | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'tasks') diff --git a/tasks/mrbgem_spec.rake b/tasks/mrbgem_spec.rake index 0c4dc85c0..5e2f3fe22 100644 --- a/tasks/mrbgem_spec.rake +++ b/tasks/mrbgem_spec.rake @@ -49,9 +49,6 @@ module MRuby def setup MRuby::Gem.current = self - @build.compilers.each do |compiler| - compiler.include_paths << "#{dir}/include" - end if File.directory? "#{dir}/include" MRuby::Build::COMMANDS.each do |command| instance_variable_set("@#{command}", @build.send(command).clone) end @@ -88,6 +85,7 @@ module MRuby compilers.each do |compiler| compiler.define_rules build_dir, "#{dir}" compiler.defines << %Q[MRBGEM_#{funcname.upcase}_VERSION=#{version}] + compiler.include_paths << "#{dir}/include" if File.directory? "#{dir}/include" end define_gem_init_builder -- cgit v1.2.3