2020-04-20 17:15:43 +00:00
|
|
|
## Syntax highlighting for Makefiles.
|
2009-11-28 04:11:04 +00:00
|
|
|
|
2018-05-18 12:52:46 +00:00
|
|
|
syntax makefile "(/((GNU)?m|M)akefile[^/]*$|\.(make|mk)$)"
|
2017-11-19 10:10:53 +00:00
|
|
|
magic "makefile script"
|
2016-05-25 20:13:50 +00:00
|
|
|
comment "#"
|
2014-05-16 20:21:34 +00:00
|
|
|
|
2018-05-30 09:29:08 +00:00
|
|
|
# Assignments.
|
|
|
|
color red " (:?:|\+|\?)?= "
|
|
|
|
|
|
|
|
# Keywords.
|
|
|
|
color magenta "^(if|ifn?def|ifn?eq|else|endif|(-|s)?include)\>"
|
|
|
|
color magenta "^((override +)?(un)?define|endef|(un)?export|private|vpath)\>"
|
|
|
|
|
|
|
|
# Variable expansions.
|
2009-12-04 03:46:04 +00:00
|
|
|
color blue "\$+[{(][a-zA-Z0-9_-]+[})]"
|
2018-05-30 09:29:08 +00:00
|
|
|
|
|
|
|
# Targets.
|
2009-11-28 04:11:04 +00:00
|
|
|
color brightblue "^[^ ]+:"
|
2018-05-30 09:29:08 +00:00
|
|
|
|
|
|
|
# Comments.
|
2017-05-09 15:37:05 +00:00
|
|
|
color green "(^|[[:space:]]+)#.*"
|
2014-05-16 20:21:34 +00:00
|
|
|
|
2018-05-30 09:29:08 +00:00
|
|
|
# Trailing whitespace.
|
2014-02-26 21:42:53 +00:00
|
|
|
color ,green "[[:space:]]+$"
|