118 lines
3.8 KiB
XML
118 lines
3.8 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<language id="makefile" _name="Makefile" version="2.0" _section="Sources"
|
|
mimetypes="text/x-makefile" globs="Makefile*">
|
|
<styles>
|
|
<style id="comment" name="Comment" map-to="def:comment"/>
|
|
<style id="function" name="Function" map-to="def:function"/>
|
|
<style id="string" name="String" map-to="def:string"/>
|
|
<style id="keyword" name="Keyword" map-to="def:keyword"/>
|
|
<style id="variable" name="Variable" map-to="def:data-type"/>
|
|
<style id="target" name="Target" map-to="def:function"/>
|
|
</styles>
|
|
|
|
<definitions>
|
|
<define-regex id="variable">[a-zA-Z_][a-zA-Z0-9_]*</define-regex>
|
|
|
|
<context id="variable">
|
|
<match>\$\((\%{variable})\)</match>
|
|
<include>
|
|
<context sub-pattern="1" style-ref="variable"/>
|
|
</include>
|
|
</context>
|
|
|
|
<context id="makefile">
|
|
<include>
|
|
<context ref="def:shebang"/>
|
|
|
|
<context id="line-comment" style-ref="comment" end-at-line-end="true">
|
|
<start>#</start>
|
|
<include>
|
|
<context ref="def:line-continue"/>
|
|
<context ref="def:comment:*"/>
|
|
</include>
|
|
</context>
|
|
|
|
<context ref="def:string"/>
|
|
<context ref="def:single-quoted-string"/>
|
|
|
|
<context id="backtick-string" style-ref="function" end-at-line-end="true">
|
|
<start>`</start>
|
|
<end>`</end>
|
|
<include>
|
|
<context ref="def:escape"/>
|
|
<context ref="def:line-continue"/>
|
|
</include>
|
|
</context>
|
|
|
|
<context id="variable-1" style-ref="variable" end-at-line-end="true">
|
|
<start>^(\%{variable})\s*=</start>
|
|
<include>
|
|
<context sub-pattern="1" where="start"/>
|
|
<context ref="variable"/>
|
|
<context ref="def:line-continue"/>
|
|
</include>
|
|
</context>
|
|
|
|
<context id="targets">
|
|
<match>^\s*([^\s]+)\s*\:</match>
|
|
<include>
|
|
<context sub-pattern="1" style-ref="target"/>
|
|
</include>
|
|
</context>
|
|
|
|
<context id="directives" style-ref="keyword">
|
|
<keyword>define</keyword>
|
|
<keyword>else</keyword>
|
|
<keyword>endef</keyword>
|
|
<keyword>endif</keyword>
|
|
<keyword>ifdef</keyword>
|
|
<keyword>ifeq</keyword>
|
|
<keyword>ifndef</keyword>
|
|
<keyword>ifneq</keyword>
|
|
<keyword>override</keyword>
|
|
<keyword>unexport</keyword>
|
|
</context>
|
|
|
|
<context id="functions" style-ref="function">
|
|
<keyword>addprefix</keyword>
|
|
<keyword>addsuffix</keyword>
|
|
<keyword>basename</keyword>
|
|
<keyword>call</keyword>
|
|
<keyword>dir</keyword>
|
|
<keyword>error</keyword>
|
|
<keyword>filter</keyword>
|
|
<keyword>filter-out</keyword>
|
|
<keyword>findstring</keyword>
|
|
<keyword>firstword</keyword>
|
|
<keyword>foreach</keyword>
|
|
<keyword>join</keyword>
|
|
<keyword>notdir</keyword>
|
|
<keyword>origin</keyword>
|
|
<keyword>patsubst</keyword>
|
|
<keyword>shell</keyword>
|
|
<keyword>sort</keyword>
|
|
<keyword>strip</keyword>
|
|
<keyword>subst</keyword>
|
|
<keyword>suffix</keyword>
|
|
<keyword>warning</keyword>
|
|
<keyword>wildcard</keyword>
|
|
<keyword>word</keyword>
|
|
<keyword>words</keyword>
|
|
</context>
|
|
|
|
<context id="special-targets" style-ref="keyword">
|
|
<prefix>^</prefix>
|
|
<suffix>\b</suffix>
|
|
<keyword>\.DEFAULT</keyword>
|
|
<keyword>\.EXPORT_ALL_VARIABLES</keyword>
|
|
<keyword>\.IGNORE</keyword>
|
|
<keyword>\.PHONY</keyword>
|
|
<keyword>\.PRECIOUS</keyword>
|
|
<keyword>\.SILENT</keyword>
|
|
<keyword>\.SUFFIXES</keyword>
|
|
</context>
|
|
</include>
|
|
</context>
|
|
</definitions>
|
|
</language>
|