diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-10-19 12:12:53 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-10-19 12:12:53 +0000 |
commit | de85d6e92ec7b7642ad02ca93cb6d5cdf75ac481 (patch) | |
tree | 604a3d78d3322e8a13b853cc1778acc20132a45d /tool | |
parent | b014f1bc021702ee2800752aa37bfe7848118f2a (diff) | |
download | ruby-de85d6e92ec7b7642ad02ca93cb6d5cdf75ac481.tar.gz |
* 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.rb | 12 |
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 |