summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorrillig <rillig@pkgsrc.org>2017-10-31 16:24:42 +0000
committerrillig <rillig@pkgsrc.org>2017-10-31 16:24:42 +0000
commitba05cb5136e4083249079b198bae5592814e5a8c (patch)
tree34212c6d7ac8e9e6ff5c1d1d1008db632b43e852 /mk
parent9d5c2d8f227c01f6f514980d26a704d99757c2f9 (diff)
downloadpkgsrc-ba05cb5136e4083249079b198bae5592814e5a8c.tar.gz
Improved index generation for "make help".
The index is sorted alphabetically and mentioned in a plain "make help" call.
Diffstat (limited to 'mk')
-rw-r--r--mk/help/help.awk6
-rw-r--r--mk/help/help.mk11
2 files changed, 11 insertions, 6 deletions
diff --git a/mk/help/help.awk b/mk/help/help.awk
index 8fb26d1fa1e..bd9fdcd3025 100644
--- a/mk/help/help.awk
+++ b/mk/help/help.awk
@@ -1,4 +1,4 @@
-# $NetBSD: help.awk,v 1.27 2013/08/31 21:27:53 rillig Exp $
+# $NetBSD: help.awk,v 1.28 2017/10/31 16:24:42 rillig Exp $
#
# This program extracts the inline documentation from *.mk files.
@@ -180,8 +180,10 @@ always {
END {
end_of_topic();
if (print_index) {
+ print "Available help topics:";
+ print "";
for (k in all_keywords) {
- print all_keywords[k] "\t" k;
+ print k | "LC_ALL=C sort";
}
} else if (!found_anything) {
print "No help found for "topic".";
diff --git a/mk/help/help.mk b/mk/help/help.mk
index bf377baaca3..67fbe379eaa 100644
--- a/mk/help/help.mk
+++ b/mk/help/help.mk
@@ -1,4 +1,4 @@
-# $NetBSD: help.mk,v 1.12 2016/02/01 18:47:23 leot Exp $
+# $NetBSD: help.mk,v 1.13 2017/10/31 16:24:42 rillig Exp $
#
# This is the integrated pkgsrc online help system. To query for the
@@ -31,9 +31,12 @@ help:
@${ECHO} "usage: "${MAKE:Q}" help topic=<topic>"
@${ECHO} ""
@${ECHO} " <topic> may be a variable name or a make target,"
- @${ECHO} " for example CONFIGURE_DIRS or patch. For convenience,"
- @${ECHO} " you don't need to use uppercase letters when typing"
- @${ECHO} " variable names."
+ @${ECHO} " for example CONFIGURE_DIRS or patch."
+ @${ECHO} ""
+ @${ECHO} " For convenience, all-uppercase topics such as variable"
+ @${ECHO} " names may also be given in all-lowercase."
+ @${ECHO} ""
+ @${ECHO} " The special topic :index lists all available topics."
@${ECHO} ""
.else
${RUN} cd ${PKGSRCDIR}; \