mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user