mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Install gems lib
directory to build path
This commit is contained in:
parent
a2c66f52f4
commit
b249178398
Notes:
git
2022-07-14 09:00:40 +09:00
1 changed files with 19 additions and 0 deletions
19
ext/extmk.rb
19
ext/extmk.rb
|
@ -594,6 +594,25 @@ exts.each do |d|
|
|||
end
|
||||
end
|
||||
|
||||
if @gemname
|
||||
src_gemlib = File.join($top_srcdir, ext_prefix, @gemname, "lib")
|
||||
src_gemlib = relative_from(src_gemlib, ([".."]*ext_prefix.count("/")).join("/"))
|
||||
gemlib = "#{@gemname}/lib"
|
||||
if File.directory?(src_gemlib)
|
||||
if File.exist?(gemlib)
|
||||
puts "using #{gemlib}"
|
||||
else
|
||||
begin
|
||||
File.symlink(relative_from(src_gemlib, ".."), gemlib)
|
||||
puts "linked #{gemlib}"
|
||||
rescue NotImplementedError, Errno::EPERM
|
||||
FileUtils.cp_r(src_gemlib, gemlib)
|
||||
puts "copied #{gemlib}"
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
$top_srcdir = srcdir
|
||||
$topdir = "."
|
||||
$hdrdir = hdrdir
|
||||
|
|
Loading…
Add table
Reference in a new issue