зеркало из https://github.com/github/ruby.git
mkmf.rb: $extmk for symlink
* lib/mkmf.rb ($extmk): traverse parent directories for the case srcdir is a symlink. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38889 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
433999fd5c
Коммит
d78a00cc0c
|
@ -1,3 +1,8 @@
|
|||
Mon Jan 21 13:51:21 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* lib/mkmf.rb ($extmk): traverse parent directories for the case
|
||||
srcdir is a symlink.
|
||||
|
||||
Sun Jan 20 23:55:37 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* marshal.c (w_object, r_object0): separate respond_to checks and
|
||||
|
|
11
lib/mkmf.rb
11
lib/mkmf.rb
|
@ -199,9 +199,14 @@ module MakeMakefile
|
|||
|
||||
topdir = File.dirname(File.dirname(__FILE__))
|
||||
path = File.expand_path($0)
|
||||
$extmk = path[0, topdir.size+1] == topdir+"/"
|
||||
$extmk &&= %r"\A(?:ext|enc|tool|test(?:/.+)?)\z" =~ File.dirname(path[topdir.size+1..-1])
|
||||
$extmk &&= true
|
||||
until (dir = File.dirname(path)) == path
|
||||
if File.identical?(dir, topdir)
|
||||
$extmk = true if %r"\A(?:ext|enc|tool|test)\z" =~ File.basename(path)
|
||||
break
|
||||
end
|
||||
path = dir
|
||||
end
|
||||
$extmk ||= false
|
||||
if not $extmk and File.exist?(RbConfig::CONFIG["rubyhdrdir"] + "/ruby/ruby.h")
|
||||
$hdrdir = CONFIG["rubyhdrdir"]
|
||||
$topdir = $hdrdir
|
||||
|
|
Загрузка…
Ссылка в новой задаче