aboutsummaryrefslogtreecommitdiffstats
path: root/tool/lib
diff options
context:
space:
mode:
Diffstat (limited to 'tool/lib')
-rw-r--r--tool/lib/output.rb1
-rw-r--r--tool/lib/vpath.rb5
2 files changed, 6 insertions, 0 deletions
diff --git a/tool/lib/output.rb b/tool/lib/output.rb
index 5e0e878322..584be76974 100644
--- a/tool/lib/output.rb
+++ b/tool/lib/output.rb
@@ -10,6 +10,7 @@ class Output
end
def def_options(opt)
+ opt.separator(" Output common options:")
opt.on('-o', '--output=PATH') {|v| @path = v}
opt.on('-t', '--timestamp[=PATH]') {|v| @timestamp = v || true}
opt.on('-c', '--[no-]if-change') {|v| @ifchange = v}
diff --git a/tool/lib/vpath.rb b/tool/lib/vpath.rb
index a52f840c30..fa819f3242 100644
--- a/tool/lib/vpath.rb
+++ b/tool/lib/vpath.rb
@@ -53,6 +53,7 @@ class VPath
end
def def_options(opt)
+ opt.separator(" VPath common options:")
opt.on("-I", "--srcdir=DIR", "add a directory to search path") {|dir|
@additional << dir
}
@@ -80,6 +81,10 @@ class VPath
@list
end
+ def add(path)
+ @additional << path
+ end
+
def strip(path)
prefix = list.map {|dir| Regexp.quote(dir)}
path.sub(/\A#{prefix.join('|')}(?:\/|\z)/, '')