diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-02-17 04:24:39 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-02-17 04:24:39 +0000 |
commit | d8168dedeff4affc0bccd53ecb9d500280fa5d2d (patch) | |
tree | 432b4182e543e8e7cdd9e03db90269f9fbb52943 /lib/mkmf.rb | |
parent | 95433b2b424ffdcbded470108af3cbea31516d66 (diff) |
merge revision(s) 34652:
* lib/mkmf.rb (create_header): log the content of header.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@34660 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/mkmf.rb')
-rw-r--r-- | lib/mkmf.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/mkmf.rb b/lib/mkmf.rb index 686a61fb96..8254cd31f7 100644 --- a/lib/mkmf.rb +++ b/lib/mkmf.rb @@ -331,11 +331,11 @@ def xpopen command, *mode, &block 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} @@ -1497,6 +1497,7 @@ def create_header(header = "extconf.h") end hdr << "#endif\n" hdr = hdr.join + log_src(hdr, "#{header} is") unless (IO.read(header) == hdr rescue false) open(header, "wb") do |hfile| hfile.write(hdr) |