Copy header files to the build directory

This is so that the build directory can be regarded as a temporary installation directory to work in.

Directories set in `MRuby::Gem::Specification#export_include_paths` are used as they are if they are subdirectories placed under `gem.dir`.
Files are placed under `<build-dir>/include/mruby/gems/<gem-name>/<gem-include_paths>` to separate each GEM.

When GEM is compiled by building `libmruby.a`, the same `include_paths` will be set as before, so it is expected that no unintended references will be made.
This commit is contained in:
dearblue
2023-02-12 21:02:28 +09:00
parent c020d8507e
commit aac2fd7055
4 changed files with 73 additions and 0 deletions
+13
View File
@@ -292,6 +292,19 @@ module MRuby
end
end.all?
end
def each_header_files(&block)
return to_enum(__method__) unless block
self.export_include_paths.flatten.uniq.compact.each do |dir|
Find.find(dir) do |d|
next unless File.file? d
yield d
end
end
self
end
end # Specification
class Version