зеркало из 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>
|
Sun Jan 5 14:46:46 2003 WATANABE Hirofumi <eban@ruby-lang.org>
|
||||||
|
|
||||||
* instruby.rb: need paren in regexp(make -n install).
|
* 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 = []
|
$defs = []
|
||||||
Logging::logfile 'mkmf.log'
|
Logging::logfile 'mkmf.log'
|
||||||
Config::CONFIG["srcdir"] = $srcdir
|
Config::CONFIG["srcdir"] = $srcdir
|
||||||
if File.exist?("#{$srcdir}/makefile.rb")
|
begin
|
||||||
load "#{$srcdir}/makefile.rb"
|
if File.exist?($0 = "#{$srcdir}/makefile.rb")
|
||||||
elsif File.exist?("#{$srcdir}/extconf.rb")
|
load $0
|
||||||
load "#{$srcdir}/extconf.rb"
|
elsif File.exist?($0 = "#{$srcdir}/extconf.rb")
|
||||||
else
|
load $0
|
||||||
create_makefile(target)
|
else
|
||||||
|
create_makefile(target)
|
||||||
|
end
|
||||||
|
rescue SystemExit
|
||||||
|
# ignore
|
||||||
|
ensure
|
||||||
|
rm_f "conftest*"
|
||||||
|
$0 = __FILE__
|
||||||
|
Config::CONFIG["srcdir"] = $top_srcdir
|
||||||
end
|
end
|
||||||
Config::CONFIG["srcdir"] = $top_srcdir
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if File.exist?("./Makefile")
|
if File.exist?("./Makefile")
|
||||||
|
@ -96,10 +103,7 @@ def extmake(target)
|
||||||
$extlibs += " " + $libs unless $libs == ""
|
$extlibs += " " + $libs unless $libs == ""
|
||||||
$extlibs += " " + $LOCAL_LIBS unless $LOCAL_LIBS == ""
|
$extlibs += " " + $LOCAL_LIBS unless $LOCAL_LIBS == ""
|
||||||
end
|
end
|
||||||
rescue SystemExit
|
|
||||||
# ignore
|
|
||||||
ensure
|
ensure
|
||||||
rm_f "conftest*"
|
|
||||||
Dir.chdir dir
|
Dir.chdir dir
|
||||||
end
|
end
|
||||||
true
|
true
|
||||||
|
|
Загрузка…
Ссылка в новой задаче