summaryrefslogtreecommitdiff
path: root/mk/help
diff options
context:
space:
mode:
authorrillig <rillig@pkgsrc.org>2018-01-07 11:23:37 +0000
committerrillig <rillig@pkgsrc.org>2018-01-07 11:23:37 +0000
commit51b6c08bc7efbc85942cea54d2ec9dc8150e2fce (patch)
tree128727faf080a7f6baef19e086b762fabe3760e2 /mk/help
parentffa1573387a9c3c7a1d285e1915804d0273f07ac (diff)
downloadpkgsrc-51b6c08bc7efbc85942cea54d2ec9dc8150e2fce.tar.gz
Improved documentation for "make help".
The check for target(help) prevents a warning when "make help" is run from a category directory.
Diffstat (limited to 'mk/help')
-rw-r--r--mk/help/help.mk8
1 files changed, 5 insertions, 3 deletions
diff --git a/mk/help/help.mk b/mk/help/help.mk
index 67fbe379eaa..9f95ad1d5c8 100644
--- a/mk/help/help.mk
+++ b/mk/help/help.mk
@@ -1,4 +1,4 @@
-# $NetBSD: help.mk,v 1.13 2017/10/31 16:24:42 rillig Exp $
+# $NetBSD: help.mk,v 1.14 2018/01/07 11:23:37 rillig Exp $
#
# This is the integrated pkgsrc online help system. To query for the
@@ -25,9 +25,10 @@ TOPIC?= ${VARNAME}
TOPIC?= ${topic}
.endif
+.if !target(help)
.PHONY: help
help:
-.if !defined(TOPIC)
+. if !defined(TOPIC)
@${ECHO} "usage: "${MAKE:Q}" help topic=<topic>"
@${ECHO} ""
@${ECHO} " <topic> may be a variable name or a make target,"
@@ -38,7 +39,8 @@ help:
@${ECHO} ""
@${ECHO} " The special topic :index lists all available topics."
@${ECHO} ""
-.else
+. else
${RUN} cd ${PKGSRCDIR}; \
env TOPIC=${TOPIC:Q} ${AWK} -f ${PKGSRCDIR}/mk/help/help.awk ${_HELP_FILES}
+. endif
.endif