summaryrefslogtreecommitdiffhomepage
path: root/tasks/ruby_ext.rake
diff options
context:
space:
mode:
authorYuichiro MASUI <[email protected]>2013-01-24 11:21:39 +0900
committerYuichiro MASUI <[email protected]>2013-01-24 11:21:39 +0900
commitb1623b9e58544996b02a8a0050546521d7f738eb (patch)
treebf6859ec1006dd2108efa0c2d285509cd0ec06c7 /tasks/ruby_ext.rake
parenta1c4992905e6e3df1e6841085c552b33cf525b0f (diff)
parent65623d7d66c2ef4e3136ab90077ece988c451750 (diff)
downloadmruby-b1623b9e58544996b02a8a0050546521d7f738eb.tar.gz
mruby-b1623b9e58544996b02a8a0050546521d7f738eb.zip
merge master
Diffstat (limited to 'tasks/ruby_ext.rake')
-rw-r--r--tasks/ruby_ext.rake8
1 files changed, 6 insertions, 2 deletions
diff --git a/tasks/ruby_ext.rake b/tasks/ruby_ext.rake
index 2536a2e4b..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(msg)
- puts msg 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