1
0
Fork 0
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:
Nobuyoshi Nakada 2022-07-13 20:15:22 +09:00
parent a2c66f52f4
commit b249178398
Notes: git 2022-07-14 09:00:40 +09:00

View file

@ -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