summaryrefslogtreecommitdiffstats
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
commitd1bc8a775b431df2813e90593a9bc191f50319bb (patch)
tree604a3d78d3322e8a13b853cc1778acc20132a45d /tool
parent1b40fba32c6bcab128548b1557dba2d33c4f6b19 (diff)
downloadruby-d1bc8a775b431df2813e90593a9bc191f50319bb.tar.gz
ruby-d1bc8a775b431df2813e90593a9bc191f50319bb.tar.xz
ruby-d1bc8a775b431df2813e90593a9bc191f50319bb.zip
* 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: http://svn.ruby-lang.org/repos/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 c234f3a52..f7ef48dee 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