summaryrefslogtreecommitdiffhomepage
path: root/Rakefile
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2020-08-14 14:15:29 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2020-10-12 16:21:39 +0900
commitef9df5dc7d32b79e6b4e0d6924eeae2cc614dfce (patch)
treeba82015784c150299d356e843a99e83f2a1354d6 /Rakefile
parent7dc595f98f86aa4f10f4d926086b859eab8e590e (diff)
downloadmruby-ef9df5dc7d32b79e6b4e0d6924eeae2cc614dfce.tar.gz
mruby-ef9df5dc7d32b79e6b4e0d6924eeae2cc614dfce.zip
Allow `MRUBY_CONFIG` to specify target file out of source tree.
Diffstat (limited to 'Rakefile')
-rw-r--r--Rakefile9
1 files changed, 7 insertions, 2 deletions
diff --git a/Rakefile b/Rakefile
index 2198b27fd..52b4c75c1 100644
--- a/Rakefile
+++ b/Rakefile
@@ -14,8 +14,13 @@ require "mruby-core-ext"
require "mruby/build"
# load configuration file
-MRUBY_TARGET = ENV['MRUBY_TARGET'] || ENV['TARGET'] || "host"
-MRUBY_CONFIG = "#{MRUBY_ROOT}/target/#{MRUBY_TARGET}.rb"
+if ENV['MRUBY_CONFIG']
+ MRUBY_CONFIG = ENV['MRUBY_CONFIG']
+ MRUBY_TARGET = File.basename(MRUBY_CONFIG, ".rb")
+else
+ MRUBY_TARGET = ENV['MRUBY_TARGET'] || ENV['TARGET'] || "host"
+ MRUBY_CONFIG = "#{MRUBY_ROOT}/target/#{MRUBY_TARGET}.rb"
+end
load MRUBY_CONFIG
# load basic rules