summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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)