diff options
Diffstat (limited to 'tasks/ruby_ext.rake')
| -rw-r--r-- | tasks/ruby_ext.rake | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/tasks/ruby_ext.rake b/tasks/ruby_ext.rake index 2cc1738c3..6817f6018 100644 --- a/tasks/ruby_ext.rake +++ b/tasks/ruby_ext.rake @@ -57,6 +57,10 @@ else $pp_show = false if $verbose end -def _pp(cmd, src, tgt=nil) - puts '%-5s %s %s' % [cmd, src, tgt ? "-> #{tgt}" : nil] if $pp_show +def _pp(cmd, src, tgt=nil, options={}) + return unless $pp_show + + width = 5 + template = options[:indent] ? "%#{width*options[:indent]}s %s %s" : "%-#{width}s %s %s" + puts template % [cmd, src, tgt ? "-> #{tgt}" : nil] end |
