Changeset View
Changeset View
Standalone View
Standalone View
data/syntax/makefile.xml
1 | <?xml version="1.0" encoding="UTF-8"?> | 1 | <?xml version="1.0" encoding="UTF-8"?> | ||
---|---|---|---|---|---|
2 | <!DOCTYPE language SYSTEM "language.dtd"> | 2 | <!DOCTYPE language SYSTEM "language.dtd"> | ||
3 | <!-- Makefile syntaxfile v0.9 by Per Wigren <wigren@home.se> --> | 3 | <!-- Makefile syntaxfile v0.9 by Per Wigren <wigren@home.se> --> | ||
4 | <!-- Modified by Joseph Wenninger <jowenn@kde.org> --> | 4 | <!-- Modified by Joseph Wenninger <jowenn@kde.org> --> | ||
5 | <!-- Modified by Rui Santana <santana.rui@gmail.com> --> | 5 | <!-- Modified by Rui Santana <santana.rui@gmail.com> --> | ||
6 | <!-- v2.0 by Andreas Nordal <andreas.nordal@gmail.com> --> | 6 | <!-- v2.0 by Andreas Nordal <andreas.nordal@gmail.com> --> | ||
7 | <!-- small priority to allow for example Makefile.cpp to be detected as cpp file --> | 7 | <!-- small priority to allow for example Makefile.cpp to be detected as cpp file --> | ||
8 | <!-- v2.1 by Alex Turbov <i.zaufi@gmail.com> | 8 | <!-- v2.1 by Alex Turbov <i.zaufi@gmail.com> | ||
9 | improve comments handling --> | 9 | improve comments handling --> | ||
10 | <!-- v4 by Alex Richardson <arichardson.kde@gmail.com> | 10 | <!-- v4 by Alex Richardson <arichardson.kde@gmail.com> | ||
11 | added bmake support --> | 11 | added bmake support --> | ||
12 | <language name="Makefile" section="Other" | 12 | <language name="Makefile" section="Other" | ||
13 | version="8" kateversion="3.4" | 13 | version="9" kateversion="3.4" | ||
14 | extensions="GNUmakefile;Makefile;makefile;GNUmakefile.*;Makefile.*;makefile.*;*.mk" | 14 | extensions="GNUmakefile;Makefile;makefile;GNUmakefile.*;Makefile.*;makefile.*;*.mk" | ||
15 | mimetype="text/x-makefile" priority="11" | 15 | mimetype="text/x-makefile" priority="11" | ||
16 | author="Per Wigren (wigren@home.se)" license=""> | 16 | author="Per Wigren (wigren@home.se)" license=""> | ||
17 | <highlighting> | 17 | <highlighting> | ||
18 | <list name = "keywords" > | 18 | <list name = "keywords" > | ||
19 | <item>include</item> | 19 | <item>include</item> | ||
20 | <item>-include</item> | 20 | <item>-include</item> | ||
21 | <item>define</item> | 21 | <item>define</item> | ||
▲ Show 20 Lines • Show All 158 Lines • ▼ Show 20 Line(s) | 165 | <context name="normal" attribute="Normal" lineEndContext="#stay"> | |||
180 | <RegExpr attribute="Variable" context="assign" String="[^\s+:?+]*\s*(?=:=|=|\+=|\?=)"/> | 180 | <RegExpr attribute="Variable" context="assign" String="[^\s+:?+]*\s*(?=:=|=|\+=|\?=)"/> | ||
181 | <keyword attribute="SpecialTarget" context="bmake_special_target" String="bmake_special_targets" firstNonSpace="true"/> | 181 | <keyword attribute="SpecialTarget" context="bmake_special_target" String="bmake_special_targets" firstNonSpace="true"/> | ||
182 | <RegExpr attribute="SpecialTarget" context="prereq" String="\.PATH\.[^:]*:" firstNonSpace="true"/> | 182 | <RegExpr attribute="SpecialTarget" context="prereq" String="\.PATH\.[^:]*:" firstNonSpace="true"/> | ||
183 | <keyword attribute="Keyword" context="bmake_include" String="bmake_include_stmt" firstNonSpace="true"/> | 183 | <keyword attribute="Keyword" context="bmake_include" String="bmake_include_stmt" firstNonSpace="true"/> | ||
184 | <keyword attribute="Keyword" context="bmake_message" String="bmake_message_stmt" firstNonSpace="true"/> | 184 | <keyword attribute="Keyword" context="bmake_message" String="bmake_message_stmt" firstNonSpace="true"/> | ||
185 | <keyword attribute="Keyword" context="bmake_for_loop" String="bmake_for_stmt" firstNonSpace="true" beginRegion="for"/> | 185 | <keyword attribute="Keyword" context="bmake_for_loop" String="bmake_for_stmt" firstNonSpace="true" beginRegion="for"/> | ||
186 | <keyword attribute="Keyword" context="#stay" String="bmake_endfor_stmt" firstNonSpace="true" endRegion="for"/> | 186 | <keyword attribute="Keyword" context="#stay" String="bmake_endfor_stmt" firstNonSpace="true" endRegion="for"/> | ||
187 | 187 | | |||
188 | <RegExpr attribute="Section" context="prereq" String="^\.[^.][^:]*:"/> | 188 | <RegExpr attribute="Section" context="prereq" String="^\.[^.][^:]*:" column="0"/> | ||
189 | <RegExpr attribute="Target" context="prereq" String="^[^:]*:"/> | 189 | <RegExpr attribute="Target" context="prereq" String="^[^:]*:" column="0"/> | ||
190 | <DetectIdentifier/> | 190 | <DetectIdentifier/> | ||
191 | <DetectChar attribute="String" context="string"" char="""/> | 191 | <DetectChar attribute="String" context="string"" char="""/> | ||
192 | <DetectChar attribute="String" context="string'" char="'"/> | 192 | <DetectChar attribute="String" context="string'" char="'"/> | ||
193 | <DetectChar attribute="Operator" context="dollar" char="$"/> | 193 | <DetectChar attribute="Operator" context="dollar" char="$"/> | ||
194 | <Detect2Chars attribute="Special" context="#stay" char="\" char1="#"/> | 194 | <Detect2Chars attribute="Special" context="#stay" char="\" char1="#"/> | ||
195 | <Detect2Chars attribute="Special" context="#stay" char="\" char1="\"/> | 195 | <Detect2Chars attribute="Special" context="#stay" char="\" char1="\"/> | ||
196 | <AnyChar attribute="Operator" context="silent" String="@-" firstNonSpace="1"/> | 196 | <AnyChar attribute="Operator" context="silent" String="@-" firstNonSpace="1"/> | ||
197 | </context> | 197 | </context> | ||
198 | 198 | | |||
199 | <context name="strings_and_vars" attribute="Normal" lineEndContext="#pop"> | 199 | <context name="strings_and_vars" attribute="Normal" lineEndContext="#pop"> | ||
200 | <DetectChar attribute="Operator" context="dollar" char="$"/> | 200 | <DetectChar attribute="Operator" context="dollar" char="$"/> | ||
201 | <DetectChar attribute="String" context="string"" char="""/> | 201 | <DetectChar attribute="String" context="string"" char="""/> | ||
202 | <DetectChar attribute="String" context="string'" char="'"/> | 202 | <DetectChar attribute="String" context="string'" char="'"/> | ||
203 | <DetectChar attribute="Comment" context="Comment" char="#"/> | 203 | <DetectChar attribute="Comment" context="Comment" char="#"/> | ||
204 | </context> | 204 | </context> | ||
205 | 205 | | |||
206 | <context name="gmake_else" attribute="Error" lineEndContext="#pop"> | 206 | <context name="gmake_else" attribute="Normal" lineEndContext="#pop"> | ||
207 | <DetectSpaces attribute="Normal"/> | 207 | <DetectSpaces attribute="Normal"/> | ||
208 | <keyword attribute="ControlFlow" String="gmake_if_keywords" context="#stay"/> | 208 | <keyword attribute="ControlFlow" String="gmake_if_keywords" context="#stay"/> | ||
209 | <IncludeRules context="strings_and_vars"/> | 209 | <IncludeRules context="strings_and_vars"/> | ||
210 | <Detect2Chars attribute="Special" context="#stay" char="\" char1="#"/> | ||||
211 | <Detect2Chars attribute="Special" context="#stay" char="\" char1="\"/> | ||||
212 | <!-- NOTE: Allow highlighting any variable name (see bug #417379), for example: | ||||
213 | else ifdef foo | ||||
214 | else ifeq (bar, foo) | ||||
215 | --> | ||||
210 | </context> | 216 | </context> | ||
211 | 217 | | |||
212 | <context name="bmake_include" attribute="Normal" lineEndContext="#pop"> | 218 | <context name="bmake_include" attribute="Normal" lineEndContext="#pop"> | ||
213 | <DetectSpaces /> | 219 | <DetectSpaces /> | ||
214 | <RangeDetect char="<" char1=">" context="#stay" attribute="Include" /> | 220 | <RangeDetect char="<" char1=">" context="#stay" attribute="Include" /> | ||
215 | <RangeDetect char=""" char1=""" context="#stay" attribute="Include" /> | 221 | <RangeDetect char=""" char1=""" context="#stay" attribute="Include" /> | ||
216 | </context> | 222 | </context> | ||
217 | 223 | | |||
▲ Show 20 Lines • Show All 292 Lines • Show Last 20 Lines |