aboutsummaryrefslogtreecommitdiff
path: root/libexec/build-help
diff options
context:
space:
mode:
authorMark Ferrell <major@homeonderanged.org>2014-04-08 08:45:26 -0700
committerMark Ferrell <major@homeonderanged.org>2014-04-08 08:45:26 -0700
commit0079cb176a470615cfa87443bfa485d7fc281ffe (patch)
treef19923e7da4ccd4c4d3329b9e5e51c316c398ee9 /libexec/build-help
parent84700fc8052f737534136c622f9efd88702f0222 (diff)
Properly support arguments to sub commands
* We needed some way to detect when a sub-command was being called by the make engine vs by a user so we could properly handle the 'help' command. This involved a lot of decoupling of the make handling out of the top-level 'build' tool and placing it into a newly created 'build-make'. * While we where at it we cleaned up the handling of various targets in makedeps so that 'all/all' is now a valid target, and subsequently, the default target.
Diffstat (limited to 'libexec/build-help')
-rwxr-xr-xlibexec/build-help5
1 files changed, 4 insertions, 1 deletions
diff --git a/libexec/build-help b/libexec/build-help
index e6f2dc5..d1eefdf 100755
--- a/libexec/build-help
+++ b/libexec/build-help
@@ -4,7 +4,10 @@ while test "$#" -gt '0'; do
case "${1}" in
(--) shift; break;;
(-*) die "unknown option '${1}'";;
- (*) exec build "${1}" --help;;
+ (*) if test -x "${BUILDER_LIBDIR}/build-make-${1}"; then
+ exec build "make-${1}" --help
+ fi
+ exec build "${1}" --help;;
esac
done