Commit d58c2585 authored by Yukihiro "Matz" Matsumoto's avatar Yukihiro "Matz" Matsumoto Committed by GitHub

Merge pull request #3202 from pbosetti/master

In mrbgem_spec.rake, added support for @mrblib_dir @objs_dir, so that a gem can have custom source directory names
parents 495545ab ac9b6f2a
...@@ -17,7 +17,8 @@ module MRuby ...@@ -17,7 +17,8 @@ module MRuby
attr_accessor :name, :dir, :build attr_accessor :name, :dir, :build
alias mruby build alias mruby build
attr_accessor :build_config_initializer attr_accessor :build_config_initializer
attr_accessor :mrblib_dir, :objs_dir
attr_accessor :version attr_accessor :version
attr_accessor :description, :summary attr_accessor :description, :summary
attr_accessor :homepage attr_accessor :homepage
...@@ -44,6 +45,8 @@ module MRuby ...@@ -44,6 +45,8 @@ module MRuby
@name = name @name = name
@initializer = block @initializer = block
@version = "0.0.0" @version = "0.0.0"
@mrblib_dir = "mrblib"
@objs_dir = "src"
MRuby::Gem.current = self MRuby::Gem.current = self
end end
...@@ -54,8 +57,8 @@ module MRuby ...@@ -54,8 +57,8 @@ module MRuby
end end
@linker = LinkerConfig.new([], [], [], [], []) @linker = LinkerConfig.new([], [], [], [], [])
@rbfiles = Dir.glob("#{dir}/mrblib/**/*.rb").sort @rbfiles = Dir.glob("#{@dir}/#{@mrblib_dir}/**/*.rb").sort
@objs = Dir.glob("#{dir}/src/*.{c,cpp,cxx,cc,m,asm,s,S}").map do |f| @objs = Dir.glob("#{@dir}/#{@objs_dir}/*.{c,cpp,cxx,cc,m,asm,s,S}").map do |f|
objfile(f.relative_path_from(@dir).to_s.pathmap("#{build_dir}/%X")) objfile(f.relative_path_from(@dir).to_s.pathmap("#{build_dir}/%X"))
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment