From d34c4c45f5761467fe2d9cb1dfe92a1c0612a8e8 Mon Sep 17 00:00:00 2001 From: Davide D'Agostino Date: Thu, 20 Dec 2012 22:51:07 -0800 Subject: Allow COMPILE_MODE to be changed from ENV --- Rakefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Rakefile b/Rakefile index 5986f2fc4..697d3e9ea 100644 --- a/Rakefile +++ b/Rakefile @@ -18,7 +18,7 @@ ENABLE_GEMS = ENV['ENABLE_GEMS'] == 'true' ACTIVE_GEMS = File.join(File.dirname(__FILE__), 'mrbgems', 'GEMS.active') # default compile option -COMPILE_MODE = :debug +COMPILE_MODE = ENV['COMPILE_MODE'] || :debug ############################## -- cgit v1.2.3 From 54092d0a164767adda04fa8fc5972a0cb8381f0f Mon Sep 17 00:00:00 2001 From: Davide D'Agostino Date: Thu, 20 Dec 2012 22:53:43 -0800 Subject: Prettify Rakefile --- Rakefile | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/Rakefile b/Rakefile index 5986f2fc4..fbf57a508 100644 --- a/Rakefile +++ b/Rakefile @@ -2,9 +2,9 @@ # basic build file for mruby # compiler, linker (gcc), archiver, parser generator -CC = ENV['CC'] || 'gcc' -LL = ENV['LL'] || 'gcc' -AR = ENV['AR'] || 'ar' +CC = ENV['CC'] || 'gcc' +LL = ENV['LL'] || 'gcc' +AR = ENV['AR'] || 'ar' YACC = ENV['YACC'] || 'bison' MAKE = ENV['MAKE'] || 'make' @@ -34,13 +34,12 @@ else # including 'debug' CFLAGS = if e then [e] else ['-g', '-O3'] end end LDFLAGS = [ENV['LDFLAGS']] -LIBS = [ENV['LIBS'] || '-lm'] +LIBS = [ENV['LIBS'] || '-lm'] -if !ENABLE_GEMS - CFLAGS << "-DDISABLE_GEMS" -end +CFLAGS << "-DDISABLE_GEMS" unless ENABLE_GEMS CFLAGS << "-Wall" << "-Werror-implicit-function-declaration" << "-I#{MRUBY_ROOT}/include" + if ENV['OS'] == 'Windows_NT' MAKE_FLAGS = "--no-print-directory CC=#{CC} LL=#{LL} AR=#{AR} YACC=#{YACC} CFLAGS=\"#{CFLAGS.join(' ')}\" LDFLAGS=\"#{LDFLAGS.join(' ')}\" LIBS=\"#{LIBS.join(' ')}\" ENABLE_GEMS=\"#{ENABLE_GEMS}\" MRUBY_ROOT=\"#{MRUBY_ROOT}\"" else @@ -48,7 +47,6 @@ else end - ############################## # internal variables @@ -59,6 +57,7 @@ CAT = ENV['CAT'] ||= 'cat' ############################## # generic build targets, rules + if ENABLE_GEMS require './mrbgems/build_tasks' end -- cgit v1.2.3 From bd7cf2f251509ef184e707a766a111c4ea057335 Mon Sep 17 00:00:00 2001 From: Davide D'Agostino Date: Thu, 20 Dec 2012 23:16:31 -0800 Subject: Allow ACTIVE_GEMS to be changed from ENV --- Rakefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Rakefile b/Rakefile index 697d3e9ea..5fcad4e54 100644 --- a/Rakefile +++ b/Rakefile @@ -15,7 +15,7 @@ MRUBY_ROOT = ENV['MRUBY_ROOT'] || File.expand_path(File.dirname(__FILE__)) ENABLE_GEMS = ENV['ENABLE_GEMS'] == 'true' # the default file which contains the active GEMs -ACTIVE_GEMS = File.join(File.dirname(__FILE__), 'mrbgems', 'GEMS.active') +ACTIVE_GEMS = ENV['ACTIVE_GEMS'] || File.expand_path('../mrbgems/GEMS.active', __FILE__) # default compile option COMPILE_MODE = ENV['COMPILE_MODE'] || :debug -- cgit v1.2.3 From 706d77bf987f3cb3f833f3deca3836fb73c1c8f9 Mon Sep 17 00:00:00 2001 From: Davide D'Agostino Date: Thu, 20 Dec 2012 23:18:31 -0800 Subject: Reuse code for paths --- Rakefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Rakefile b/Rakefile index 5fcad4e54..0eb128135 100644 --- a/Rakefile +++ b/Rakefile @@ -15,7 +15,7 @@ MRUBY_ROOT = ENV['MRUBY_ROOT'] || File.expand_path(File.dirname(__FILE__)) ENABLE_GEMS = ENV['ENABLE_GEMS'] == 'true' # the default file which contains the active GEMs -ACTIVE_GEMS = ENV['ACTIVE_GEMS'] || File.expand_path('../mrbgems/GEMS.active', __FILE__) +ACTIVE_GEMS = ENV['ACTIVE_GEMS'] || File.join(MRUBY_ROOT, '/mrbgems/GEMS.active') # default compile option COMPILE_MODE = ENV['COMPILE_MODE'] || :debug -- cgit v1.2.3 From 1c4d81cdada9bf8e4ae01c15723acbd5d6062617 Mon Sep 17 00:00:00 2001 From: Masaki Muranaka Date: Fri, 21 Dec 2012 19:19:04 +0900 Subject: Add -DDISABLE_GEMS to compile options. --- cmake/modules/IntrospectSystem.cmake | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cmake/modules/IntrospectSystem.cmake b/cmake/modules/IntrospectSystem.cmake index 722f4c3d7..559b884b8 100644 --- a/cmake/modules/IntrospectSystem.cmake +++ b/cmake/modules/IntrospectSystem.cmake @@ -20,6 +20,8 @@ else() endif() endif() +add_definitions(-DDISABLE_GEMS) + if(MSVC) add_definitions( -DRUBY_EXPORT # required by oniguruma.h -- cgit v1.2.3