ruby-changes:22603
From: nobu <ko1@a...>
Date: Fri, 17 Feb 2012 09:56:41 +0900 (JST)
Subject: [ruby-changes:22603] nobu:r34652 (trunk): * lib/mkmf.rb (create_header): log the content of header.
nobu 2012-02-17 09:56:25 +0900 (Fri, 17 Feb 2012) New Revision: 34652 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=34652 Log: * lib/mkmf.rb (create_header): log the content of header. Modified files: trunk/ChangeLog trunk/lib/mkmf.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 34651) +++ ChangeLog (revision 34652) @@ -1,3 +1,7 @@ +Fri Feb 17 09:56:22 2012 Nobuyoshi Nakada <nobu@r...> + + * lib/mkmf.rb (create_header): log the content of header. + Fri Feb 17 09:44:55 2012 NARUSE, Yui <naruse@r...> * tool/transcode-tblgen.rb (import_ucm): don't use \h because the Index: lib/mkmf.rb =================================================================== --- lib/mkmf.rb (revision 34651) +++ lib/mkmf.rb (revision 34652) @@ -352,11 +352,11 @@ 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 @@ 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) -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/