diff options
Diffstat (limited to 'qpid/cpp/rubygen')
| -rwxr-xr-x | qpid/cpp/rubygen/amqpgen.rb | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/qpid/cpp/rubygen/amqpgen.rb b/qpid/cpp/rubygen/amqpgen.rb index f42e177225..7eee953c04 100755 --- a/qpid/cpp/rubygen/amqpgen.rb +++ b/qpid/cpp/rubygen/amqpgen.rb @@ -489,6 +489,7 @@ class Generator @prefix=[''] # For indentation or comments. @indentstr=' ' # One indent level. @outdent=2 + @verbose=false end # Declare next file to be public API @@ -504,10 +505,14 @@ class Generator @out=String.new # Generate in memory first yield if block if @path.exist? and @path.read == @out - puts "Skipped #{@path} - unchanged" # Dont generate if unchanged + if @verbose + puts "Skipped #{@path} - unchanged" # Dont generate if unchanged + end else @path.open('w') { |f| f << @out } - puts "Generated #{@path}" + if @verbose + puts "Generated #{@path}" + end end end end |
