/usr/share/medit-1/language-specs/makefile.lang is in medit 1.0.3-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 | <?xml version="1.0" encoding="UTF-8"?>
<!--
Author: Paolo Borelli <pborelli@katamail.com>
Copyright (C) 2005 Paolo Borelli <pborelli@katamail.com>
Copyright (C) 2005 Ricardo Lenz
GtkSourceView is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
GtkSourceView is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-->
<language id="makefile" _name="Makefile" version="2.0" _section="Sources">
<metadata>
<property name="mimetypes">text/x-makefile</property>
<property name="globs">[Mm]akefile;GNUmakefile;[Mm]akefile.*;*.make;*.mak;*.mk</property>
<property name="line-comment-start">#</property>
</metadata>
<styles>
<style id="variable" _name="Variable" map-to="def:type"/>
<style id="assignment-rhs" _name="Assignment Right Hand Side"/>
<style id="assignment-lhs" _name="Assignment Left Hand Side"/>
<style id="targets" _name="targets" map-to="def:function"/>
<style id="prereq" _name="prereq"/>
<style id="command" _name="command"/>
<!-- Translators: Trailing Tabs refers to tabulation characters present at
the end of the line -->
<style id="trailing-tab" _name="Trailing Tab"/>
<style id="function" _name="function" map-to="def:function"/>
<style id="keyword" _name="keyword" map-to="def:keyword"/>
</styles>
<definitions>
<define-regex id="variable">[a-zA-Z_][a-zA-Z0-9_]*</define-regex>
<context id="variable-1">
<match>\$\((\%{variable})\)</match>
<include>
<context sub-pattern="1" style-ref="variable"/>
</include>
</context>
<context id="variable-2">
<match>\$\{(\%{variable})\}</match>
<include>
<context sub-pattern="1" style-ref="variable"/>
</include>
</context>
<context id="variable">
<include>
<context ref="variable-1"/>
<context ref="variable-2"/>
</include>
</context>
<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="string">
<include>
<!-- skip escaped characters -->
<context>
<match>\\.</match>
</context>
<context ref="def:string"/>
</include>
</context>
<context id="assignment-rhs" style-ref="assignment-rhs" end-at-line-end="true">
<start></start>
<include>
<context ref="def:line-continue"/>
<context ref="def:shell-like-comment"/>
<context ref="variable"/>
<context ref="string"/>
<context ref="def:single-quoted-string"/>
<context ref="backtick-string"/>
</include>
</context>
<context id="command" style-ref="command" extend-parent="false" end-at-line-end="true">
<start></start>
<include>
<context ref="def:line-continue"/>
<context ref="def:shell-like-comment"/>
<context ref="variable"/>
<context ref="string"/>
<context ref="def:single-quoted-string"/>
<context ref="backtick-string"/>
</include>
</context>
<context id="directives" style-ref="keyword">
<keyword>define</keyword>
<keyword>else</keyword>
<keyword>endef</keyword>
<keyword>endif</keyword>
<keyword>if</keyword>
<keyword>ifdef</keyword>
<keyword>ifeq</keyword>
<keyword>ifndef</keyword>
<keyword>ifneq</keyword>
<keyword>include</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="makefile">
<include>
<context ref="def:shebang"/>
<context ref="def:shell-like-comment"/>
<context id="assignment" end-at-line-end="true">
<start>^(\%{variable})\s*[\+]?=</start>
<include>
<context sub-pattern="1" where="start" style-ref="assignment-lhs"/>
<context ref="assignment-rhs"/>
</include>
</context>
<context id="rule">
<start>^([^\t\:][^\:]*)\:</start>
<end>^(?!\t)</end>
<include>
<context sub-pattern="1" where="start" style-ref="targets"/>
<context ref="def:shell-like-comment"/>
<context ref="directives"/>
<context id="prereq" end-at-line-end="true" style-ref="prereq">
<start>(?<=:)(?=.)</start>
<end>;</end>
<include>
<context ref="def:escape"/>
<context ref="def:line-continue"/>
<context ref="variable"/>
<context ref="functions"/>
</include>
</context>
<context id="trailing-tab" style-ref="trailing-tab">
<match>^\t+$</match>
</context>
<context ref="command"/>
</include>
</context>
<context ref="directives"/>
<context ref="functions"/>
</include>
</context>
</definitions>
</language>
|