aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-02-17 00:56:25 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-02-17 00:56:25 +0000
commit7d0066c542628b0d356de76617ac980292c1c583 (patch)
tree264d07c45d965d333494b59e2d9b16dac5b42307
parent375fd3152f21feeb3e3cf2b02449c3a495b349a9 (diff)
downloadruby-7d0066c542628b0d356de76617ac980292c1c583.tar.gz
* 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
-rw-r--r--ChangeLog4
-rw-r--r--lib/mkmf.rb7
2 files changed, 8 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index d3173204ec..046387f151 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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
diff --git a/lib/mkmf.rb b/lib/mkmf.rb
index 5b32553da1..a29e5bafbd 100644
--- a/lib/mkmf.rb
+++ b/lib/mkmf.rb
@@ -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)