mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Bundled gems are expanded under .bundle/gems
now
This commit is contained in:
parent
3607657e1c
commit
db3d111c1d
Notes:
git
2022-04-07 09:47:32 +09:00
2 changed files with 8 additions and 7 deletions
13
ext/extmk.rb
13
ext/extmk.rb
|
@ -146,7 +146,7 @@ def extmake(target, basedir = 'ext', maybestatic = true)
|
|||
top_srcdir = $top_srcdir
|
||||
topdir = $topdir
|
||||
hdrdir = $hdrdir
|
||||
prefix = "../" * (target.count("/")+1)
|
||||
prefix = "../" * (basedir.count("/")+target.count("/")+1)
|
||||
$top_srcdir = relative_from(top_srcdir, prefix)
|
||||
$hdrdir = relative_from(hdrdir, prefix)
|
||||
$topdir = prefix + $topdir
|
||||
|
@ -460,10 +460,11 @@ for dir in ["ext", File::join($top_srcdir, "ext")]
|
|||
end unless $extstatic
|
||||
|
||||
@gemname = nil
|
||||
if ARGV[0]
|
||||
ext_prefix, exts = ARGV.shift.split('/', 2)
|
||||
if exts = ARGV.shift
|
||||
ext_prefix = exts[%r[\A(?>\.bundle/)?[^/]+(?:/(?=(.+)?)|\z)]]
|
||||
exts = $1
|
||||
$extension = [exts] if exts
|
||||
if ext_prefix == 'gems'
|
||||
if ext_prefix.start_with?('.')
|
||||
@gemname = exts
|
||||
elsif exts
|
||||
$static_ext.delete_if {|t, *| !File.fnmatch(t, exts)}
|
||||
|
@ -515,7 +516,7 @@ cond = proc {|ext, *|
|
|||
exts.delete_if {|d| File.fnmatch?("-*", d)}
|
||||
end
|
||||
end
|
||||
ext_prefix = File.basename(ext_prefix)
|
||||
ext_prefix = ext_prefix[$top_srcdir.size+1..-2]
|
||||
|
||||
extend Module.new {
|
||||
def timestamp_file(name, target_prefix = nil)
|
||||
|
@ -634,7 +635,7 @@ rubies = []
|
|||
end
|
||||
}
|
||||
|
||||
Dir.chdir ".."
|
||||
Dir.chdir dir
|
||||
unless $destdir.to_s.empty?
|
||||
$mflags.defined?("DESTDIR") or $mflags << "DESTDIR=#{$destdir}"
|
||||
end
|
||||
|
|
|
@ -25,7 +25,7 @@ macros["old_extensions"] = []
|
|||
|
||||
contpat = /(?>(?>[^\\\n]|\\.)*\\\n)*(?>[^\\\n]|\\.)*/
|
||||
Dir.glob("{ext,.bundle/gems}/*/exts.mk") do |e|
|
||||
gem = /\Agems(?=\/)/ =~ e
|
||||
gem = e.start_with?(".bundle/gems/")
|
||||
s = File.read(e)
|
||||
s.scan(/^(extensions|SUBMAKEOPTS|EXT[A-Z]+|MFLAGS|NOTE_[A-Z]+)[ \t]*=[ \t]*(#{contpat})$/o) do |n, v|
|
||||
v.gsub!(/\\\n[ \t]*/, ' ')
|
||||
|
|
Loading…
Reference in a new issue