summaryrefslogtreecommitdiff
path: root/tool
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-10-19 12:12:53 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-10-19 12:12:53 +0000
commitde85d6e92ec7b7642ad02ca93cb6d5cdf75ac481 (patch)
tree604a3d78d3322e8a13b853cc1778acc20132a45d /tool
parentb014f1bc021702ee2800752aa37bfe7848118f2a (diff)
* common.mk (srcs): removed ID_H_TARGET.
* tool/generic_erb.rb: always overwrites if no if-change option. * template/id.h.tmpl: shows which token differs. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19847 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'tool')
-rw-r--r--tool/generic_erb.rb12
1 files changed, 5 insertions, 7 deletions
diff --git a/tool/generic_erb.rb b/tool/generic_erb.rb
index c234f3a52f..f7ef48deea 100644
--- a/tool/generic_erb.rb
+++ b/tool/generic_erb.rb
@@ -16,13 +16,11 @@ erb = ERB.new(File.read(template), nil, '%')
erb.filename = template
result = erb.result
if output
- if ifchange
- if (IO.read(output) rescue nil) == result
- puts "#{output} unchanged"
- else
- open(output, "wb") {|f| f.print result}
- puts "#{output} updated"
- end
+ if ifchange and (IO.read(output) rescue nil) == result
+ puts "#{output} unchanged"
+ else
+ open(output, "wb") {|f| f.print result}
+ puts "#{output} updated"
end
if timestamp
if timestamp == true