summaryrefslogtreecommitdiff
path: root/mk/help
diff options
context:
space:
mode:
authorrillig <rillig>2008-02-20 10:40:42 +0000
committerrillig <rillig>2008-02-20 10:40:42 +0000
commit0d40bfc141dd18fbdaea248b9e14889d6c538d57 (patch)
treeeef01ffd1c673a7d84252ec70f9f8ca1cabbc3d2 /mk/help
parent073957ec7891108adc9b0183b431447b75d5d5a2 (diff)
downloadpkgsrc-0d40bfc141dd18fbdaea248b9e14889d6c538d57.tar.gz
Changed the order of the checks for automatic keywords, so that the
latter checks are not run that much.
Diffstat (limited to 'mk/help')
-rw-r--r--mk/help/help.awk10
1 files changed, 5 insertions, 5 deletions
diff --git a/mk/help/help.awk b/mk/help/help.awk
index 442dd935660..f2f92ff99f3 100644
--- a/mk/help/help.awk
+++ b/mk/help/help.awk
@@ -1,4 +1,4 @@
-# $NetBSD: help.awk,v 1.23 2008/02/19 22:12:00 rillig Exp $
+# $NetBSD: help.awk,v 1.24 2008/02/20 10:40:42 rillig Exp $
#
# This program extracts the inline documentation from *.mk files.
@@ -136,6 +136,10 @@ 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](:|\?=|=)?$/) {
+ # Keywords must consist only of letters, digits, hyphens
+ # and underscores; except for some trailing type specifier.
+
} else if (w == tolower(w) && !(w ~ /:$/)) {
# Lower-case words (often make targets) must be followed
# by a colon to be recognized as keywords.
@@ -144,10 +148,6 @@ NF >= 1 && !/^[\t.]/ && !/^#*$/ {
# Upper-case words ending with a colon are probably not
# make targets, so ignore them.
- } else if (w !~ /^[A-Za-z].*[0-9A-Za-z](:|\?=|=)?$/) {
- # Keywords must start with a letter and end with a letter
- # or digit.
-
} else if (w ~ /^(FIXME|TODO|XXX):?$/) {
# These are not keywords.