summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorDaniel Bovensiepen <[email protected]>2016-02-12 02:19:18 +0800
committerDaniel Bovensiepen <[email protected]>2016-02-12 02:19:18 +0800
commit5976185c0a62e632469a893705bfe2fa41f8931a (patch)
treedcf9e67a293a9079176dead62231f324d65f9004
parent18870428bc4489d25ec89c973fe1d8e67250c29c (diff)
downloadmruby-5976185c0a62e632469a893705bfe2fa41f8931a.tar.gz
mruby-5976185c0a62e632469a893705bfe2fa41f8931a.zip
Fix bug in mruby-test gem.
In an used build path mruby-test wasn't updating mrbtest.c in the case that the mgem selection was changed. This lead to: - a missing reference in case a GEM was removed - ignoring all new GEMs added to the build configuration This fix keeps track of the active gems and demands a rebuild of mrbtest.c in case that the gem selection changed.
-rw-r--r--mrbgems/mruby-test/mrbgem.rake13
1 files changed, 13 insertions, 0 deletions
diff --git a/mrbgems/mruby-test/mrbgem.rake b/mrbgems/mruby-test/mrbgem.rake
index 298097f62..ae4c2f131 100644
--- a/mrbgems/mruby-test/mrbgem.rake
+++ b/mrbgems/mruby-test/mrbgem.rake
@@ -146,6 +146,19 @@ MRuby::Gem::Specification.new('mruby-test') do |spec|
end
init = "#{spec.dir}/init_mrbtest.c"
+
+ # store the last gem selection and make the re-build
+ # of the test gem depending on a change to the gem
+ # selection
+ active_gems = "#{build_dir}/active_gems.lst"
+ FileUtils.mkdir_p File.dirname(active_gems)
+ open(active_gems, 'w+') do |f|
+ build.gems.each do |g|
+ f.puts g.name
+ end
+ end
+ file clib => active_gems
+
file mlib => clib
file clib => init do |t|
_pp "GEN", "*.rb", "#{clib.relative_path}"