| 1 |
filetype: makefile |
| 2 |
|
| 3 |
detect: |
| 4 |
filename: "([Mm]akefile|\\.ma?k)$" |
| 5 |
header: "^#!.*/(env +)?[bg]?make( |$)" |
| 6 |
|
| 7 |
rules: |
| 8 |
- preproc: "\\<(ifeq|ifdef|ifneq|ifndef|else|endif)\\>" |
| 9 |
- statement: "^(export|include|override)\\>" |
| 10 |
- symbol.operator: "^[^:= ]+:" |
| 11 |
- symbol.operator: "([=,%]|\\+=|\\?=|:=|&&|\\|\\|)" |
| 12 |
- statement: "\\$\\((abspath|addprefix|addsuffix|and|basename|call|dir)[[:space:]]" |
| 13 |
- statement: "\\$\\((error|eval|filter|filter-out|findstring|firstword)[[:space:]]" |
| 14 |
- statement: "\\$\\((flavor|foreach|if|info|join|lastword|notdir|or)[[:space:]]" |
| 15 |
- statement: "\\$\\((origin|patsubst|realpath|shell|sort|strip|suffix)[[:space:]]" |
| 16 |
- statement: "\\$\\((value|warning|wildcard|word|wordlist|words)[[:space:]]" |
| 17 |
- identifier: "^.+:" |
| 18 |
- identifier: "[()$]" |
| 19 |
- constant.string: |
| 20 |
start: "\"" |
| 21 |
end: "\"" |
| 22 |
skip: "\\\\." |
| 23 |
rules: |
| 24 |
- constant.specialChar: "\\\\." |
| 25 |
- constant.string: |
| 26 |
start: "'" |
| 27 |
end: "'" |
| 28 |
skip: "\\\\." |
| 29 |
rules: |
| 30 |
- constant.specialChar: "\\\\." |
| 31 |
- identifier: "\\$+(\\{[^} ]+\\}|\\([^) ]+\\))" |
| 32 |
- identifier: "\\$[@^<*?%|+]|\\$\\([@^<*?%+-][DF]\\)" |
| 33 |
- identifier: "\\$\\$|\\\\.?" |
| 34 |
- comment: |
| 35 |
start: "#" |
| 36 |
end: "$" |
| 37 |
rules: [] |
| 38 |
|