summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorrillig <rillig>2013-08-31 21:27:53 +0000
committerrillig <rillig>2013-08-31 21:27:53 +0000
commit22cf113ce255b4249243771fc8273b76ac0f1fe8 (patch)
treec13dfed8c3d08a94246ad670ec2b0fcdc19172ca /mk
parent931790e48555e0679b46d7c022247d0b676db5cb (diff)
downloadpkgsrc-22cf113ce255b4249243771fc8273b76ac0f1fe8.tar.gz
Up to now there was no way to get help on pkgsrc internal variables,
like _PKG_VARS. Since there exists documentation on these internal variables, it should be found by "bmake help".
Diffstat (limited to 'mk')
-rw-r--r--mk/help/help.awk7
1 files changed, 4 insertions, 3 deletions
diff --git a/mk/help/help.awk b/mk/help/help.awk
index 453c74d220e..8fb26d1fa1e 100644
--- a/mk/help/help.awk
+++ b/mk/help/help.awk
@@ -1,4 +1,4 @@
-# $NetBSD: help.awk,v 1.26 2009/05/15 21:10:31 rillig Exp $
+# $NetBSD: help.awk,v 1.27 2013/08/31 21:27:53 rillig Exp $
#
# This program extracts the inline documentation from *.mk files.
@@ -126,8 +126,9 @@ $1 ~ /:$/ && $2 == ".PHONY" {
NF >= 1 && !/^[\t.]/ && !/^#*$/ {
w = ($1 ~ /^\#[A-Z]/) ? substr($1, 2) : ($1 == "#") ? $2 : $1;
- # Reduce FOO.<param> and FOO.${param} to FOO.
+ # Reduce VAR.<param>, VAR.${param} and VAR.* to VAR.
sub(/\.[<$].*[>}]$/, "", w);
+ sub(/\.\*$/, "", w);
if (w ~ /\+=$/) {
# Appending to a variable is usually not a definition.
@@ -136,7 +137,7 @@ NF >= 1 && !/^[\t.]/ && !/^#*$/ {
# Words in mixed case are not taken as keywords. If you
# want them anyway, list them in a "Keywords:" line.
- } else if (w !~ /^[A-Za-z][-0-9A-Z_a-z]*[0-9A-Za-z](:|\?=|=)?$/) {
+ } else if (w !~ /^[_A-Za-z][-0-9A-Z_a-z]*[0-9A-Za-z](:|\?=|=)?$/) {
# Keywords must consist only of letters, digits, hyphens
# and underscores; except for some trailing type specifier.