Commit b6ab216f authored by take_cheeze's avatar take_cheeze

support file extension .cpp/.cxx in mrbgem and tool

parent bc843ed9
...@@ -41,7 +41,7 @@ depfiles = MRuby.targets['host'].bins.map do |bin| ...@@ -41,7 +41,7 @@ depfiles = MRuby.targets['host'].bins.map do |bin|
FileUtils.rm_f t.name, { :verbose => $verbose } FileUtils.rm_f t.name, { :verbose => $verbose }
FileUtils.cp t.prerequisites.first, t.name, { :verbose => $verbose } FileUtils.cp t.prerequisites.first, t.name, { :verbose => $verbose }
end end
install_path install_path
end end
...@@ -53,7 +53,7 @@ MRuby.each_target do |target| ...@@ -53,7 +53,7 @@ MRuby.each_target do |target|
gem.bins.each do |bin| gem.bins.each do |bin|
exec = exefile("#{build_dir}/bin/#{bin}") exec = exefile("#{build_dir}/bin/#{bin}")
objs = Dir.glob("#{current_dir}/tools/#{bin}/*.c").map { |f| objfile(f.pathmap("#{current_build_dir}/tools/#{bin}/%n")) } objs = Dir.glob("#{current_dir}/tools/#{bin}/*.{c,cpp,cxx}").map { |f| objfile(f.pathmap("#{current_build_dir}/tools/#{bin}/%n")) }
file exec => objs + [libfile("#{build_dir}/lib/libmruby")] do |t| file exec => objs + [libfile("#{build_dir}/lib/libmruby")] do |t|
gem_flags = gems.map { |g| g.linker.flags } gem_flags = gems.map { |g| g.linker.flags }
......
...@@ -6,7 +6,7 @@ module MRuby ...@@ -6,7 +6,7 @@ module MRuby
class << self class << self
attr_accessor :current attr_accessor :current
end end
LinkerConfig = Struct.new(:libraries, :library_paths, :flags, :flags_before_libraries, :flags_after_libraries) LinkerConfig = Struct.new(:libraries, :library_paths, :flags, :flags_before_libraries, :flags_after_libraries)
class Specification class Specification
include Rake::DSL include Rake::DSL
...@@ -53,13 +53,13 @@ module MRuby ...@@ -53,13 +53,13 @@ module MRuby
@linker = LinkerConfig.new([], [], [], []) @linker = LinkerConfig.new([], [], [], [])
@rbfiles = Dir.glob("#{dir}/mrblib/*.rb").sort @rbfiles = Dir.glob("#{dir}/mrblib/*.rb").sort
@objs = Dir.glob("#{dir}/src/*.{c,cpp,m,asm,S}").map do |f| @objs = Dir.glob("#{dir}/src/*.{c,cpp,cxx,m,asm,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
@objs << objfile("#{build_dir}/gem_init") @objs << objfile("#{build_dir}/gem_init")
@test_rbfiles = Dir.glob("#{dir}/test/*.rb") @test_rbfiles = Dir.glob("#{dir}/test/*.rb")
@test_objs = Dir.glob("#{dir}/test/*.{c,cpp,m,asm,S}").map do |f| @test_objs = Dir.glob("#{dir}/test/*.{c,cpp,cxx,m,asm,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
@test_preload = 'test/assert.rb' @test_preload = 'test/assert.rb'
...@@ -211,7 +211,7 @@ module MRuby ...@@ -211,7 +211,7 @@ module MRuby
end end
# ~> compare algorithm # ~> compare algorithm
# #
# Example: # Example:
# ~> 2.2 means >= 2.2.0 and < 3.0.0 # ~> 2.2 means >= 2.2.0 and < 3.0.0
# ~> 2.2.0 means >= 2.2.0 and < 2.3.0 # ~> 2.2.0 means >= 2.2.0 and < 2.3.0
......
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