summaryrefslogtreecommitdiffhomepage
path: root/Rakefile
diff options
context:
space:
mode:
Diffstat (limited to 'Rakefile')
-rw-r--r--Rakefile14
1 files changed, 14 insertions, 0 deletions
diff --git a/Rakefile b/Rakefile
index 533153290..70dce2e46 100644
--- a/Rakefile
+++ b/Rakefile
@@ -8,12 +8,19 @@ MRUBY_BUILD_HOST_IS_OPENBSD = RUBY_PLATFORM.include?('openbsd')
$LOAD_PATH << File.join(MRUBY_ROOT, "lib")
# load build systems
+require 'yaml'
require "mruby-core-ext"
require "mruby/build"
require "mruby/gem"
# load configuration file
MRUBY_CONFIG = (ENV['MRUBY_CONFIG'] && ENV['MRUBY_CONFIG'] != '') ? ENV['MRUBY_CONFIG'] : "#{MRUBY_ROOT}/build_config.rb"
+MRUBY_CONFIG_LOCK_FILE = "#{MRUBY_CONFIG}.lock"
+MRUBY_CONFIG_LOCK = if File.exist? MRUBY_CONFIG_LOCK_FILE
+ YAML.load File.read MRUBY_CONFIG_LOCK_FILE
+ else
+ {}
+ end
load MRUBY_CONFIG
# load basic rules
@@ -118,6 +125,13 @@ task :all => depfiles do
MRuby.each_target do
print_build_summary
end
+
+ locks_result = { 'builds' => {} }
+ MRuby.each_target do
+ locks_result['builds'][name] = locks
+ end
+
+ File.write MRUBY_CONFIG_LOCK_FILE, YAML.dump(locks_result)
end
desc "run all mruby tests"