summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2012-12-20 23:19:15 -0800
committerYukihiro "Matz" Matsumoto <[email protected]>2012-12-20 23:19:15 -0800
commit091367850d190b5d81f327032dd2e602114c5adc (patch)
tree2712b163aa406ddf01226407e179e11644a0f248
parenta67d126c45ae4776cbc9580cbad20ec9669dbea5 (diff)
parent54092d0a164767adda04fa8fc5972a0cb8381f0f (diff)
downloadmruby-091367850d190b5d81f327032dd2e602114c5adc.tar.gz
mruby-091367850d190b5d81f327032dd2e602114c5adc.zip
Merge pull request #660 from DAddYE/patch-2
Prettify Rakefile
-rw-r--r--Rakefile15
1 files changed, 7 insertions, 8 deletions
diff --git a/Rakefile b/Rakefile
index 0eb128135..aec259e06 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