summaryrefslogtreecommitdiffstats
path: root/scripts/tdesvn-buildrc.xml
blob: 887e87f626f442f05ecb4089c9c7e5a7c1412045 (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
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
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE language SYSTEM "language.dtd">
<!-- This goes into $TDEDIR/share/apps/katepart/syntax, or
     it can go to $TDEHOME/share/apps/katepart/syntax
 -->
<language name="tdesvn-buildrc" version="0.2" kateversion="2.4" section="Configuration" extensions=".tdesvn-buildrc;tdesvn-buildrc" author="Michael Pyne &lt;michael.pyne@kdemail.net&gt;" license="LGPL">

  <highlighting>
    <list name="bools">
      <item>true</item>
      <item>false</item>
      <item>TRUE</item>
      <item>FALSE</item>
      <item>self</item> <!-- Only used by use-unsermake, don't feel like
                             forking a separate context for it though. -->
    </list>

    <list name="setEnvOptions">
      <item>set-env</item> <!-- Handled separately for special syntax highlighting. -->
    </list>

    <!-- These options should only have a boolean value passed to them. -->
    <list name="boolOptions">
      <item>apidox</item>
      <item>apply-qt-patches</item>
      <item>build-system-only</item>
      <item>colorful-output</item>
      <item>debug</item>
      <item>disable-agent-check</item>
      <item>manual-build</item>
      <item>manual-update</item>
      <item>no-svn</item>
      <item>no-rebuild-on-fail</item>
      <item>pretend</item>
      <item>reconfigure</item>
      <item>recreate-configure</item>
      <item>refresh-build</item>
      <item>remove-after-install</item>
      <item>stop-on-failure</item>
      <item>use-unsermake</item>
      <item>use-qt-builddir-hack</item>
    </list>

    <list name="options">
      <item>binpath</item>
      <item>branch</item>
      <item>build-dir</item>
      <item>checkout-only</item>
      <item>configure-flags</item>
      <item>cxxflags</item>
      <item>debug-level</item>
      <item>dest-dir</item>
      <item>do-not-compile</item>
      <item>email-address</item>
      <item>email-on-compile-error</item>
      <item>install-after-build</item>
      <item>inst-apps</item>
      <item>tdedir</item>
      <item>libpath</item>
      <item>log-dir</item>
      <item>make-install-prefix</item>
      <item>make-options</item>
      <item>module-base-path</item>
      <item>niceness</item>
      <item>override-url</item>
      <item>prefix</item>
      <item>qtdir</item>
      <item>revision</item>
      <item>source-dir</item>
      <item>svn-server</item>
      <item>tag</item>
      <item>unsermake-options</item>
      <item>unsermake-path</item>
    </list>

    <contexts>
      <context name="Module" attribute="Normal Text" lineEndContext="#stay">
        <DetectSpaces/>
	<RegExpr attribute="Comment" String="#.*$" context="#stay"/>
	<RegExpr attribute="Global Declaration" context="Module Options" String="global" beginRegion="Global Options" firstNonSpace="true" />
	<RegExpr attribute="Module Declaration" context="Module Decl" String="module\s+" firstNonSpace="true" />
      </context>

      <context name="Module Decl" attribute="Module Name" lineEndContext="Module Options">
        <RegExpr String="[a-zA-Z0-9-]*" context="#stay" beginRegion="Module Options"/>
	<RegExpr attribute="Comment" String="#.*$" context="#stay"/>
      </context>

      <context name="Module Options" attribute="Normal Text" lineEndContext="#stay">
        <DetectSpaces/>
	<RegExpr attribute="Comment" String="#.*$" context="#stay"/>
	<keyword attribute="Option Name" context="Environment Name" String="setEnvOptions" />
	<keyword attribute="Option Name" context="Option Value" String="options"/>
	<keyword attribute="Option Name" context="Bool Option Value" String="boolOptions"/>

	<RegExpr attribute="Module Declaration" context="Module" endRegion="Module Options" String="end module" firstNonSpace="true"/>
	<RegExpr attribute="Module Declaration" context="Module" endRegion="Global Options" String="end global" firstNonSpace="true"/>

	<!-- No tdesvn-build options start with digits or a dash. -->
	<RegExpr attribute="Possible Error" context="Option Value" String="[0-9-][a-zA-Z0-9-]+" />
	<RegExpr attribute="Unknown Option Name" context="Option Value" String="[a-zA-Z0-9-]+" />
      </context>

      <context name="Option Value" attribute="Normal Text" lineEndContext="#pop">
	<RegExpr attribute="Comment" String="#.*$" />
	<DetectSpaces/>
	<RegExpr attribute="Variable" String="\$\{[a-zA-Z0-9-]+\}"/>
	<RegExpr attribute="Option Value" String="[a-zA-Z:0-9,./+!=@-]*" context="#stay" />
        <LineContinue context="#stay"/>
	<AnyChar attribute="Option Value" String="\\"/>
      </context>

      <context name="Bool Option Value" attribute="Normal Text" lineEndContext="#pop">
        <keyword attribute="Option Value" context="#stay" String="bools"/>
	<RegExpr attribute="Comment" String="#.*$" />
	<DetectSpaces/>
	<RegExpr attribute="Possible Error" String="[^\\]*"/>
        <LineContinue attribute="Possible Error" context="#stay"/>
	<AnyChar attribute="Possible Error" String="\\"/>
      </context>

      <context name="Environment Name" attribute="Environment Variable Name" lineEndContext="#pop">
	<RegExpr attribute="Comment" String="#.*$" />
	<DetectSpaces/>
        <RegExpr attribute="Environment Variable Name" context="Option Value" String="[a-zA-Z0-9_-]+" />
      </context>
    </contexts>

    <itemDatas>
      <itemData name="Normal Text"         defStyleNum="dsNormal" />
      <itemData name="Comment"             defStyleNum="dsComment"/>
      <itemData name="Boolean"             defStyleNum="dsDecVal" bold="true" color="purple"/>
      <itemData name="Option Name"         defStyleNum="dsKeyword" bold="false" />
      <itemData name="Unknown Option Name" defStyleNum="dsKeyword" bold="false" color="#7D4C0B" />
      <itemData name="Environment Variable Name" defStyleNum="dsString" color="#EE6A50" />
      <itemData name="Option Value"        defStyleNum="dsDecVal" />
      <itemData name="Variable"            defStyleNum="dsOthers" />
      <itemData name="Module Declaration"  defStyleNum="dsKeyword"/>
      <itemData name="Module Name"         defStyleNum="dsOthers" bold="true" />
      <itemData name="Global Declaration"  defStyleNum="dsKeyword"/>
      <itemData name="Possible Error"      defStyleNum="dsError" />
    </itemDatas>
  </highlighting>

  <general>
    <comments>
      <comment name="singleLine" start="#"/>
    </comments>
    <keywords weakDeliminator="-"/>
  </general>

</language>