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:
parent
15774ab1fb
commit
1fbea3bef7
2 changed files with 19 additions and 10 deletions
|
@ -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).
|
||||
|
|
24
ext/extmk.rb
24
ext/extmk.rb
|
@ -66,14 +66,21 @@ 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"
|
||||
else
|
||||
create_makefile(target)
|
||||
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
|
||||
Config::CONFIG["srcdir"] = $top_srcdir
|
||||
end
|
||||
end
|
||||
if File.exist?("./Makefile")
|
||||
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue