From 054f4eb585046e0b3d89e414d20bc2714e27959a Mon Sep 17 00:00:00 2001 From: rillig Date: Sat, 31 Aug 2013 21:27:53 +0000 Subject: [PATCH] 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". --- mk/help/help.awk | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/mk/help/help.awk b/mk/help/help.awk index 453c74d220e0..8fb26d1fa1e0 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. and FOO.${param} to FOO. + # Reduce VAR., 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.