From d8dcee584e12b89173f3a695c957ac3c66731353 Mon Sep 17 00:00:00 2001 From: mattn Date: Fri, 11 Jan 2013 21:01:04 +0900 Subject: build gems if build_config.rb is modified. --- Rakefile | 7 ++++--- tasks/mrbgems.rake | 2 ++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Rakefile b/Rakefile index f522c808b..fd0336033 100644 --- a/Rakefile +++ b/Rakefile @@ -8,7 +8,8 @@ load 'tasks/mruby_gem_spec.rake' ############################## # compile flags -load File.expand_path(ENV['CONFIG'] || './build_config.rb') +MRUBY_CONFIG = File.expand_path(ENV['MRUBY_CONFIG'] || './build_config.rb') +load MRUBY_CONFIG load 'tasks/rules.rake' load 'src/mruby_core.rake' @@ -37,9 +38,9 @@ depfiles = MRuby.targets['host'].bins.map do |bin| install_path end -depfiles += MRuby.targets.reject {|n,t| n == 'host' }.map do |n, t| +depfiles += MRuby.targets.reject {|n,t| n == 'host' }.map { |n, t| ["#{t.build_dir}/lib/libmruby.a"] + t.bins.map { |bin| exefile("#{t.build_dir}/bin/#{bin}") } -end +}.flatten desc "build all targets, install (locally) in-repo" task :all => depfiles diff --git a/tasks/mrbgems.rake b/tasks/mrbgems.rake index 356e40369..07e412b53 100644 --- a/tasks/mrbgems.rake +++ b/tasks/mrbgems.rake @@ -29,5 +29,7 @@ mrb_init_mrbgems(mrb_state *mrb) { __EOF__ end end + + file "#{build_dir}/mrbgems/gem_init.c" => MRUBY_CONFIG end end -- cgit v1.2.3 From 33d843d185ea929ced6ce2d7aadbcce760f87eb8 Mon Sep 17 00:00:00 2001 From: mattn Date: Fri, 11 Jan 2013 21:27:08 +0900 Subject: note about $MRUBY_CONFIG. --- doc/compile/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/compile/README.md b/doc/compile/README.md index cec70e68b..168417984 100644 --- a/doc/compile/README.md +++ b/doc/compile/README.md @@ -83,7 +83,7 @@ MRuby::CrossBuild.new('i386') do |conf| end ``` -You can configurate the same options as for a normal build. +You can configurate the same options as for a normal build. You can specified your own build_config.rb with *$MRUBY_CONFIG*. ## Build process -- cgit v1.2.3