mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Leave builddir absolute
So that rubygems installer will work to build extension gems.
This commit is contained in:
parent
bac6e8ca5d
commit
3842e723da
1 changed files with 2 additions and 0 deletions
|
@ -24,6 +24,7 @@ posthook = proc do
|
|||
untrace_var(:$ruby, posthook)
|
||||
end
|
||||
prehook = proc do |extmk|
|
||||
=begin
|
||||
pat = %r[(?:\A(?:\w:|//[^/]+)|\G)/[^/]*]
|
||||
dir = builddir.scan(pat)
|
||||
pwd = Dir.pwd.scan(pat)
|
||||
|
@ -35,6 +36,7 @@ prehook = proc do |extmk|
|
|||
builddir = File.join((pwd.empty? ? ["."] : [".."]*pwd.size) + dir)
|
||||
builddir = "." if builddir.empty?
|
||||
end
|
||||
=end
|
||||
join = proc {|*args| File.join(*args).sub!(/\A(?:\.\/)*/, '')}
|
||||
$topdir ||= builddir
|
||||
$top_srcdir ||= (File.identical?(top_srcdir, dir = join[$topdir, srcdir]) ?
|
||||
|
|
Loading…
Reference in a new issue