summaryrefslogtreecommitdiffstats
path: root/kate/data/makefile.xml
blob: fc322d7371547cba2fec760da385f2627195cde0 (plain)
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
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE language SYSTEM "language.dtd">
<!-- Makefile syntaxfile v0.9 by Per Wigren <wigren@home.se> -->
<!-- Modified by Joseph Wenninger <jowenn@kde.org> -->
<!-- Modified by Rui Santana <santana.rui@gmail.com> -->
<language name="Makefile" version="1.10" kateversion="2.4" section="Other" extensions="GNUmakefile;Makefile*;makefile*" mimetype="text/x-makefile" author="Per Wigren (wigren@home.se)" license="">
  <highlighting>
    <list name = "keywords">
      <item> include </item>
      <item> define </item>
      <item> else </item>
      <item> endef </item>
      <item> endif </item>
      <item> ifdef </item>
      <item> ifeq </item>
      <item> ifndef </item>
      <item> ifneq </item>
    </list>
    <list name = "functions">
        <item> call </item>
        <item> subst </item>
        <item> patsubst </item>
        <item> strip </item>
        <item> findstring </item>
        <item> filter </item>
        <item> filter-out </item>
        <item> sort </item>
        <item> word </item>
        <item> wordlist </item>
        <item> words </item>
        <item> firstword </item>
        <item> lastword </item>
        <item> dir </item>
        <item> notdir </item>
        <item> suffix </item>
        <item> basename </item>
        <item> addsuffix </item>
        <item> addprefix </item>
        <item> join </item>
        <item> wildcard </item>
        <item> realpath </item>
        <item> abspath </item>
        <item> if </item>
        <item> or </item>
        <item> and </item>
        <item> foreach </item>
        <item> value </item>
        <item> eval </item>
        <item> origin </item>
        <item> flavor </item>
        <item> shell </item>
        <item> error </item>
        <item> warning </item>
        <item> info </item>
    </list>

    <contexts>
      <context name="Normal" attribute="Normal Text" lineEndContext="#stay">
        <keyword attribute="Keyword"  context="#stay" String="keywords"/>
        <RegExpr attribute="Variable" context="Value" String="[_\w\d]*\s*(?=:=|=)"/>
        <RegExpr attribute="Target"   context="#stay" String="[_\w\d-]*\s*:" firstNonSpace="true"/>
        <RegExpr attribute="Section"  context="#stay" String="^[.].*:"/>
        <DetectChar attribute="String" context="String" char="&quot;"/>
        <RegExpr attribute="Operator"  context="VarFromNormal" String="[$][\({]"/>
        <Detect2Chars attribute="Special" context="#stay" char="\" char1="#"/>
        <Detect2Chars attribute="Special" context="#stay" char="\" char1="\"/>
        <AnyChar attribute="Operator" context="#stay" String="+*=%$():\&#059;"/>
        <AnyChar attribute="Operator" context="Commands" String="@-" firstNonSpace="true"/>
        <RegExpr attribute="Comment"  context="#stay" String="#.*$"/>
      </context>

      <context attribute="String" lineEndContext="#pop" name="String">
        <LineContinue attribute="String" context="#stay"/>
        <DetectChar attribute="String" context="#pop" char="&quot;"/>
      </context>

      <context name="Value" attribute="String" lineEndContext="#stay">
        <RegExpr attribute="Operator" String="\\$"     context="#stay"/>
        <RegExpr attribute="String"   String="[^\\]?$" context="#pop"/>
        <RegExpr attribute="Operator" String="[$][\({]" context="VarFromValue"/>
        <RegExpr attribute="Special" context="#pop" String="@[-_\d\w]*@" />
        <DetectChar attribute="Operator" char="&#059;" context="#pop"/>
      </context>

      <context name="VarFromValue" attribute="Variable" lineEndContext="#stay">
        <RegExpr attribute="Operator" String="[\)}](?=/)" context="#pop"/>
        <RegExpr attribute="Operator" String="[\)}][^$]" context="#pop"/>
        <RegExpr attribute="Operator" String="[\)}]$" context="#pop#pop"/>
      </context>

      <context name="VarFromNormal" attribute="Variable" lineEndContext="#stay">
        <keyword attribute="Keyword" context="FunctionCall" String="functions"/>
        <AnyChar attribute="Operator" String=")}" context="#pop"/>
      </context>

      <context name="FunctionCall" attribute="String" lineEndContext="#stay">
        <RegExpr attribute="Operator" context="VarFromNormal" String="[$][\({]"/>
        <AnyChar attribute="Operator" String=")}" context="#pop#pop"/>
      </context>

      <context name="Commands" attribute="Normal Text" lineEndContext="#pop">
        <RegExpr attribute="Operator" context="VarFromNormal" String="[$][\({]"/>
        <RegExpr attribute="Commands" context="#pop" String="[_\w-]*\b"/>
      </context>

    </contexts>
    <itemDatas>
      <itemData name="Normal Text" defStyleNum="dsNormal"/>
      <itemData name="Keyword"     defStyleNum="dsKeyword"/>
      <itemData name="Comment"     defStyleNum="dsComment"/>
      <itemData name="String"      defStyleNum="dsString"/>
      <itemData name="Variable"    defStyleNum="dsDataType"/>
      <itemData name="Target"      defStyleNum="dsDecVal"/>
      <itemData name="Section"     defStyleNum="dsOthers"/>
      <itemData name="Operator"    defStyleNum="dsChar"/>
      <itemData name="Commands"    defStyleNum="dsBaseN"/>
      <itemData name="Special"     defStyleNum="dsFloat"/>
    </itemDatas>
  </highlighting>
  <general>
    <comments>
      <comment name = "singleLine" start = "#"/>
    </comments>
    <keywords casesensitive = "1" />
  </general>
</language>