summaryrefslogtreecommitdiff
path: root/mk/help/help.awk
diff options
context:
space:
mode:
Diffstat (limited to 'mk/help/help.awk')
-rw-r--r--mk/help/help.awk10
1 files changed, 9 insertions, 1 deletions
diff --git a/mk/help/help.awk b/mk/help/help.awk
index 41bca22d7a5..4292ef1cb14 100644
--- a/mk/help/help.awk
+++ b/mk/help/help.awk
@@ -1,4 +1,4 @@
-# $NetBSD: help.awk,v 1.12 2007/02/20 11:45:40 rillig Exp $
+# $NetBSD: help.awk,v 1.13 2007/03/09 01:34:50 rillig Exp $
#
# This program extracts the inline documentation from *.mk files.
@@ -80,6 +80,14 @@ always {
ignore_next_empty_line = no;
}
+# Don't show the user the definition of make targets, since they are
+# usually not interesting enough. This allows the comments to reach
+# until the line directly above the target definition.
+#
+$1 ~ /:$/ && $2 == ".PHONY" {
+ end_of_topic();
+}
+
(!ignore_this_line) {
lines[nlines++] = $0;
}