mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* lib/mkmf.rb (create_header): log the content of header.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34652 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
375fd3152f
commit
7d0066c542
2 changed files with 8 additions and 3 deletions
|
@ -1,3 +1,7 @@
|
|||
Fri Feb 17 09:56:22 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* lib/mkmf.rb (create_header): log the content of header.
|
||||
|
||||
Fri Feb 17 09:44:55 2012 NARUSE, Yui <naruse@ruby-lang.org>
|
||||
|
||||
* tool/transcode-tblgen.rb (import_ucm): don't use \h because the
|
||||
|
|
|
@ -352,11 +352,11 @@ module MakeMakefile
|
|||
end
|
||||
end
|
||||
|
||||
def log_src(src)
|
||||
def log_src(src, heading="checked program was")
|
||||
src = src.split(/^/)
|
||||
fmt = "%#{src.size.to_s.size}d: %s"
|
||||
Logging::message <<"EOM"
|
||||
checked program was:
|
||||
#{heading}:
|
||||
/* begin */
|
||||
EOM
|
||||
src.each_with_index {|line, no| Logging::message fmt, no+1, line}
|
||||
|
@ -1557,7 +1557,8 @@ SRC
|
|||
end
|
||||
end
|
||||
hdr << "#endif\n"
|
||||
hdr = hdr.join
|
||||
hdr = hdr.join("")
|
||||
log_src(hdr, "#{header} is")
|
||||
unless (IO.read(header) == hdr rescue false)
|
||||
open(header, "wb") do |hfile|
|
||||
hfile.write(hdr)
|
||||
|
|
Loading…
Reference in a new issue