summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2015-09-11 10:48:09 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2015-09-11 10:48:09 +0900
commit3ed8e7fbb24886619f6e7aa2e9be1d0dd0609feb (patch)
treeac97579f71f4fc302e5220fd0d5e9903a4b17160
parent698b3c925d757cd7113f9916db2dbb7e2eabf2f4 (diff)
parent291265ec86e2b4a8d66b33be3e2d65fa6744da84 (diff)
downloadmruby-3ed8e7fbb24886619f6e7aa2e9be1d0dd0609feb.tar.gz
mruby-3ed8e7fbb24886619f6e7aa2e9be1d0dd0609feb.zip
Merge pull request #2949 from tatsuhiro-t/custom-install-location
Customize installation directory using INSTALL_DIR environment variable
-rw-r--r--Rakefile6
1 files changed, 3 insertions, 3 deletions
diff --git a/Rakefile b/Rakefile
index 8a8912af5..3e03b1096 100644
--- a/Rakefile
+++ b/Rakefile
@@ -32,7 +32,7 @@ load "#{MRUBY_ROOT}/tasks/benchmark.rake"
# generic build targets, rules
task :default => :all
-bin_path = "#{MRUBY_ROOT}/bin"
+bin_path = ENV['INSTALL_DIR'] || "#{MRUBY_ROOT}/bin"
FileUtils.mkdir_p bin_path, { :verbose => $verbose }
depfiles = MRuby.targets['host'].bins.map do |bin|
@@ -71,7 +71,7 @@ MRuby.each_target do |target|
end
if target == MRuby.targets['host']
- install_path = MRuby.targets['host'].exefile("#{MRUBY_ROOT}/bin/#{bin}")
+ install_path = MRuby.targets['host'].exefile("#{bin_path}/#{bin}")
file install_path => exec do |t|
FileUtils.rm_f t.name, { :verbose => $verbose }
@@ -80,7 +80,7 @@ MRuby.each_target do |target|
depfiles += [ install_path ]
elsif target == MRuby.targets['host-debug']
unless MRuby.targets['host'].gems.map {|g| g.bins}.include?([bin])
- install_path = MRuby.targets['host-debug'].exefile("#{MRUBY_ROOT}/bin/#{bin}")
+ install_path = MRuby.targets['host-debug'].exefile("#{bin_path}/#{bin}")
file install_path => exec do |t|
FileUtils.rm_f t.name, { :verbose => $verbose }