diff options
author | rillig <rillig@pkgsrc.org> | 2020-08-04 21:46:44 +0000 |
---|---|---|
committer | rillig <rillig@pkgsrc.org> | 2020-08-04 21:46:44 +0000 |
commit | ef6e04bfaa7c4c09a6171406e6ed01a5fda3336d (patch) | |
tree | bd80a5ad1c8f1a98365f6df186f5571011e0cef5 /mk | |
parent | 401464832eb95f6f2da96dd948a250942920c514 (diff) | |
download | pkgsrc-ef6e04bfaa7c4c09a6171406e6ed01a5fda3336d.tar.gz |
mk/help: fix help parser for variable names followed by comma
Seen in mk/fetch/fetch.mk for FETCH_USE_IPV4_ONLY.
Diffstat (limited to 'mk')
-rw-r--r-- | mk/help/help.awk | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/mk/help/help.awk b/mk/help/help.awk index b4b2803744c..3d04402495d 100644 --- a/mk/help/help.awk +++ b/mk/help/help.awk @@ -1,4 +1,4 @@ -# $NetBSD: help.awk,v 1.41 2020/05/03 10:57:06 rillig Exp $ +# $NetBSD: help.awk,v 1.42 2020/08/04 21:46:44 rillig Exp $ # # This program extracts the inline documentation from *.mk files. @@ -192,7 +192,7 @@ eval_this_line && NF >= 1 && !/^[\t.]/ && !/^#*$/ && !/^#\t\t/ { # want them anyway, list them in a "Keywords:" line. dprint_skip(w, "it is mixed case"); - } 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. dprint_skip(w, "it contains special characters"); @@ -212,12 +212,12 @@ eval_this_line && NF >= 1 && !/^[\t.]/ && !/^#*$/ && !/^#\t\t/ { # Upper-case words ending with a colon are probably not # make targets, so ignore them. Common cases are tags # like FIXME and TODO. - dprint_skip(w, "it is uppercase and followed by a hyphen"); + dprint_skip(w, "it is uppercase and followed by a colon"); } else { sub(/^#[ \t]*/, "", w); sub(/(:|\?=|=)$/, "", w); - sub(/:$/, "", w); + sub(/[,:]$/, "", w); if (w != "") { if (debug) dprint("Adding keyword \"" w "\""); keywords[w] = yes; |