mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* ext/extmk.rb (extmake): suppresses outputs from extconf.rb.
(extmake) warns a failure in extconf.rb. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32389 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
6343e30c14
commit
3b63aee193
2 changed files with 21 additions and 2 deletions
|
@ -1,3 +1,8 @@
|
|||
Sun Jul 3 23:43:56 2011 Yuki Sonoda (Yugui) <yugui@yugui.jp>
|
||||
|
||||
* ext/extmk.rb (extmake): suppresses outputs from extconf.rb.
|
||||
(extmake) warns a failure in extconf.rb.
|
||||
|
||||
Sun Jul 3 13:44:51 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* array.c (ary_reject_bang): should not remove elements which are
|
||||
|
|
18
ext/extmk.rb
18
ext/extmk.rb
|
@ -45,6 +45,10 @@ def sysquote(x)
|
|||
@quote ? x.quote : x
|
||||
end
|
||||
|
||||
def verbose?
|
||||
$mflags.defined?("Q") != "@"
|
||||
end
|
||||
|
||||
def extract_makefile(makefile, keep = true)
|
||||
m = File.read(makefile)
|
||||
if !(target = m[/^TARGET[ \t]*=[ \t]*(\S*)/, 1])
|
||||
|
@ -64,7 +68,7 @@ def extract_makefile(makefile, keep = true)
|
|||
config = CONFIG.dup
|
||||
install_dirs(target_prefix).each {|var, val| config[var] = val}
|
||||
FileUtils.rm_f(installrb.values.collect {|f| RbConfig.expand(f, config)},
|
||||
:verbose => $mflags.defined?("Q") != "@")
|
||||
:verbose => verbose?)
|
||||
end
|
||||
end
|
||||
return false
|
||||
|
@ -161,7 +165,16 @@ def extmake(target)
|
|||
Logging::logfile 'mkmf.log'
|
||||
rm_f makefile
|
||||
if conf
|
||||
load $0 = conf
|
||||
unless verbose?
|
||||
stdout, $stdout = $stdout, File.open(File::NULL, "a")
|
||||
else
|
||||
stdout = $stdout
|
||||
end
|
||||
begin
|
||||
load $0 = conf
|
||||
ensure
|
||||
$stdout = stdout
|
||||
end
|
||||
else
|
||||
create_makefile(target)
|
||||
end
|
||||
|
@ -181,6 +194,7 @@ def extmake(target)
|
|||
open(makefile, "w") do |f|
|
||||
f.print(*dummy_makefile(CONFIG["srcdir"]))
|
||||
end
|
||||
print "Failed to configure #{target}. It will not be installed.\n"
|
||||
return true
|
||||
end
|
||||
args = sysquote($mflags)
|
||||
|
|
Loading…
Add table
Reference in a new issue