1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* 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:
nobu 2003-01-05 08:50:21 +00:00
parent 15774ab1fb
commit 1fbea3bef7
2 changed files with 19 additions and 10 deletions

View file

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

View file

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