summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2013-01-29 05:43:14 -0800
committerYukihiro "Matz" Matsumoto <[email protected]>2013-01-29 05:43:14 -0800
commitc14d34e59d0e067c7004bda40a9f91a264bb6dd5 (patch)
tree556edcbda7cb839eab22e368a191900155c03c13
parent1724042225c4a4ce8b2222569c5b86937729d11a (diff)
parentc32a16130f53816e13812d8f0d9cf0a19794f825 (diff)
downloadmruby-c14d34e59d0e067c7004bda40a9f91a264bb6dd5.tar.gz
mruby-c14d34e59d0e067c7004bda40a9f91a264bb6dd5.zip
Merge pull request #790 from carsonmcdonald/nogemdefchange
Change the way that the DISABLE_GEMS flag is set.
-rw-r--r--tasks/mrbgem_spec.rake1
-rw-r--r--tasks/mruby_build.rake6
-rw-r--r--tasks/mruby_build_commands.rake2
3 files changed, 6 insertions, 3 deletions
diff --git a/tasks/mrbgem_spec.rake b/tasks/mrbgem_spec.rake
index 0e228629b..c119ea49c 100644
--- a/tasks/mrbgem_spec.rake
+++ b/tasks/mrbgem_spec.rake
@@ -37,7 +37,6 @@ module MRuby
MRuby::Gem.current = self
@build.compilers.each do |compiler|
- compiler.defines -= %w(DISABLE_GEMS)
compiler.include_paths << "#{dir}/include"
end
MRuby::Build::COMMANDS.each do |command|
diff --git a/tasks/mruby_build.rake b/tasks/mruby_build.rake
index cd9f77fc4..645656417 100644
--- a/tasks/mruby_build.rake
+++ b/tasks/mruby_build.rake
@@ -83,7 +83,11 @@ module MRuby
instance_eval(&block)
compilers.each do |compiler|
- compiler.defines -= %w(DISABLE_GEMS) if respond_to?(:enable_gems?) && enable_gems?
+ if respond_to?(:enable_gems?) && enable_gems?
+ compiler.defines -= %w(DISABLE_GEMS)
+ else
+ compiler.defines += %w(DISABLE_GEMS)
+ end
compiler.define_rules build_dir
end
end
diff --git a/tasks/mruby_build_commands.rake b/tasks/mruby_build_commands.rake
index 20203ad7e..75cfc55c2 100644
--- a/tasks/mruby_build_commands.rake
+++ b/tasks/mruby_build_commands.rake
@@ -40,7 +40,7 @@ module MRuby
@flags = [ENV['CFLAGS'] || []]
@source_exts = source_exts
@include_paths = ["#{build.root}/include"]
- @defines = %w(DISABLE_GEMS)
+ @defines = %w()
@option_include_path = '-I%s'
@option_define = '-D%s'
@compile_options = "%{flags} -MMD -o %{outfile} -c %{infile}"