diff --git a/syntax/makefile.nanorc b/syntax/makefile.nanorc index 96bf3557..a1c116c0 100644 --- a/syntax/makefile.nanorc +++ b/syntax/makefile.nanorc @@ -4,11 +4,21 @@ syntax makefile "(/((GNU)?m|M)akefile[^/]*$|\.(make|mk)$)" magic "makefile script" comment "#" -color red "[:=]" -color magenta "\<(if|ifeq|else|endif)\>" +# 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. color blue "\$+[{(][a-zA-Z0-9_-]+[})]" + +# Targets. color brightblue "^[^ ]+:" + +# Comments. color green "(^|[[:space:]]+)#.*" -## Trailing whitespace. +# Trailing whitespace. color ,green "[[:space:]]+$"