# File mkmf.rb, line 192
def self::logfile file
@logfile = file
if @log and not @log.closed?
@log.flush
@log.close
@log = nil
end
end
# File mkmf.rb, line 186
def self::message(*s)
@log ||= File::open(@logfile, 'w')
@log.sync = true
@log.printf(*s)
end
# File mkmf.rb, line 175
def self::open
@log ||= File::open(@logfile, 'w')
@log.sync = true
$stderr.reopen(@log)
$stdout.reopen(@log)
yield
ensure
$stderr.reopen(@orgerr)
$stdout.reopen(@orgout)
end
# File mkmf.rb, line 201
def self::postpone
tmplog = "mkmftmp#{@postpone += 1}.log"
open do
log, *save = @log, @logfile, @orgout, @orgerr
@log, @logfile, @orgout, @orgerr = nil, tmplog, log, log
begin
log.print(open {yield})
@log.close
File::open(tmplog) {|t| FileUtils.copy_stream(t, log)}
ensure
@log, @logfile, @orgout, @orgerr = log, *save
@postpone -= 1
rm_f tmplog
end
end
end
Commenting is here to help enhance the documentation. For example, code samples, or clarification of the documentation.
If you have questions about Ruby or the documentation, please post to one of the Ruby mailing lists. You will get better, faster, help that way.
If you wish to post a correction of the docs, please do so, but also file bug report so that it can be corrected for the next release. Thank you.
If you want to help improve the Ruby documentation, please see Improve the docs, or visit Documenting-ruby.org.