diff options
author | rillig <rillig@pkgsrc.org> | 2013-08-31 21:27:53 +0000 |
---|---|---|
committer | rillig <rillig@pkgsrc.org> | 2013-08-31 21:27:53 +0000 |
commit | 6d16bdaf03af88f06f210e4761806af7086a77ec (patch) | |
tree | c13dfed8c3d08a94246ad670ec2b0fcdc19172ca /mk/help | |
parent | 7697d285d153d20d30a2990cff81805ed6520c30 (diff) | |
download | pkgsrc-6d16bdaf03af88f06f210e4761806af7086a77ec.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/help')
-rw-r--r-- | mk/help/help.awk | 7 |
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. |