зеркало из https://github.com/github/ruby.git
* ext/extmk.rb (extmake): set $0 temporarily while loading
extconf.rb. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3293 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
15774ab1fb
Коммит
1fbea3bef7
|
@ -1,3 +1,8 @@
|
|||
Sun Jan 5 17:44:37 2003 Nobuyoshi Nakada <nobu.nokada@softhome.net>
|
||||
|
||||
* ext/extmk.rb (extmake): set $0 temporarily while loading
|
||||
extconf.rb.
|
||||
|
||||
Sun Jan 5 14:46:46 2003 WATANABE Hirofumi <eban@ruby-lang.org>
|
||||
|
||||
* instruby.rb: need paren in regexp(make -n install).
|
||||
|
|
18
ext/extmk.rb
18
ext/extmk.rb
|
@ -66,16 +66,23 @@ def extmake(target)
|
|||
$defs = []
|
||||
Logging::logfile 'mkmf.log'
|
||||
Config::CONFIG["srcdir"] = $srcdir
|
||||
if File.exist?("#{$srcdir}/makefile.rb")
|
||||
load "#{$srcdir}/makefile.rb"
|
||||
elsif File.exist?("#{$srcdir}/extconf.rb")
|
||||
load "#{$srcdir}/extconf.rb"
|
||||
begin
|
||||
if File.exist?($0 = "#{$srcdir}/makefile.rb")
|
||||
load $0
|
||||
elsif File.exist?($0 = "#{$srcdir}/extconf.rb")
|
||||
load $0
|
||||
else
|
||||
create_makefile(target)
|
||||
end
|
||||
rescue SystemExit
|
||||
# ignore
|
||||
ensure
|
||||
rm_f "conftest*"
|
||||
$0 = __FILE__
|
||||
Config::CONFIG["srcdir"] = $top_srcdir
|
||||
end
|
||||
end
|
||||
end
|
||||
if File.exist?("./Makefile")
|
||||
if $static
|
||||
$extlist.push [$static, $target, File.basename($target)]
|
||||
|
@ -96,10 +103,7 @@ def extmake(target)
|
|||
$extlibs += " " + $libs unless $libs == ""
|
||||
$extlibs += " " + $LOCAL_LIBS unless $LOCAL_LIBS == ""
|
||||
end
|
||||
rescue SystemExit
|
||||
# ignore
|
||||
ensure
|
||||
rm_f "conftest*"
|
||||
Dir.chdir dir
|
||||
end
|
||||
true
|
||||
|
|
Загрузка…
Ссылка в новой задаче