summary refs log tree commit diff
path: root/bin
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2019-02-20 23:02:30 -0500
committerJune McEnroe <june@causal.agency>2019-02-20 23:02:30 -0500
commit9a78318ce0ddeafdce163fd8f9a99405c0ffc03d (patch)
tree812c683eac1ad7cb1ba6544011f0b4e7456316ea /bin
parentUse $PWD in html.sh to pass absolute path to man (diff)
downloadsrc-9a78318ce0ddeafdce163fd8f9a99405c0ffc03d.tar.gz
src-9a78318ce0ddeafdce163fd8f9a99405c0ffc03d.zip
Match make targets as Tag
Diffstat (limited to 'bin')
-rw-r--r--bin/hi.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/bin/hi.c b/bin/hi.c
index c55d617c..cb684209 100644
--- a/bin/hi.c
+++ b/bin/hi.c
@@ -126,11 +126,14 @@ static const struct Syntax CSyntax[] = {
 // }}}
 
 // make syntax {{{
+#define MAKE_TARGET "[-./_[:alnum:]]+"
 static const struct Syntax MakeSyntax[] = {
 	{ Keyword, .subexp = 2,
 		.pattern = WB "([.](PHONY|PRECIOUS|SUFFIXES))" WB },
 	{ Macro,
 		.pattern = "^ *-?include" },
+	{ Tag, .parent = ~SET(Keyword), .subexp = 1,
+		.pattern = "(" MAKE_TARGET ")" "(" BL0 MAKE_TARGET ")*" BL0 ":" },
 	{ String, .subexp = 1,
 		.pattern = "[._[:alnum:]]+" BL0 "[!+:?]?=" BL0 "(.*)" },
 	{ Normal,