/usr/share/gtksourceview-3.0/language-specs/automake.lang is in libgtksourceview-3.0-common 3.18.2-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 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 | <?xml version="1.0" encoding="UTF-8"?>
<!--
This file is part of GtkSourceView
Author: P. F. Chimento <philip.chimento@gmail.com>
Copyright (C) 2011 P. F. Chimento <philip.chimento@gmail.com>
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="automake" _name="Automake" version="2.0" _section="Source">
<metadata>
<property name="globs">Makefile.am;GNUmakefile.am</property>
<property name="line-comment-start">#</property>
</metadata>
<!--
Early versions of this were based on Vim's Automake syntax highlighting
file. This language definition is for Automake's Makefile.am files. It is
based on the definition of Makefile, except it highlights Makefile variables
which are significant to Automake, as well as Autoconf-style @variable@
substitutions.
-->
<styles>
<style id="lhs" _name="Automake Variable" map-to="def:identifier"/>
<style id="primary" _name="Primary" map-to="def:type"/>
<style id="secondary" _name="Secondary" map-to="def:statement"/>
<style id="prefix" _name="Prefix" map-to="def:statement"/>
<style id="target" _name="Optional Target" map-to="def:statement"/>
<style id="dirname" _name="Built-in Target" map-to="def:statement"/>
<style id="keyword" _name="Other Keyword" map-to="def:statement"/>
<style id="subst" _name="Substitution" map-to="def:preprocessor"/>
</styles>
<definitions>
<!-- Allow substitutions on RHS of assignment -->
<replace id="makefile:assignment-rhs" ref="assignment-rhs"/>
<!-- Also allow substitutions in makefile's shell code -->
<replace id="makefile:command" ref="command"/>
<!-- Also allow substitutions in automake variable names, that's why the
@ is in here; as in libfoobar_@VERSION@_SOURCES -->
<define-regex id="variable">[A-Za-z0-9_@]+</define-regex>
<!-- What is allowed on a line before an Automake variable - no tabs! -->
<define-regex id="space">^ *</define-regex>
<!-- What must come after an Automake variable - one of the assignment
operators =, +=, ?=, := (Not sure what := does, but Webkit's GNUmakefile.am
uses it, for example -->
<define-regex id="operator">\s*[\+\?:]?=</define-regex>
<!-- Prefixes for primaries and secondaries -->
<define-regex id="prefix">(?:no)?dist|no(?:base|trans)</define-regex>
<!-- "Primaries", or the last component of Product List Variables -->
<define-regex id="primary" extended="true">
PROGRAMS|
(?:LT)?LIBRARIES|
LISP|
PYTHON|
JAVA|
SCRIPTS|
DATA|
HEADERS|
MANS|
TEXINFOS
</define-regex>
<!-- Non-directory installation targets -->
<define-regex id="target">noinst|check|EXTRA</define-regex>
<!-- The list of things that can go before "FLAGS" -->
<define-regex id="flags" extended="true">
C|
CCAS|
CPP|
CXX|
F|
GCJ|
JAVAC|
L|
LD|
LIBTOOL|
(?:[A-Z]+_)?LOG|
MAKEINFO(?:HTML)?|
OBJC|
R|
UPC|
VALA|
Y
</define-regex>
<!-- "Secondaries", or the last component of Product Source Variables -->
<define-regex id="secondary" extended="true">
AR|
DEPENDENCIES|
LDADD|
LIBADD|
LINK|
SHORTNAME|
SOURCES|
\%{flags}FLAGS
</define-regex>
<!-- Names of other Automake variables that aren't primaries, secondaries,
flags, or target directories -->
<define-regex id="keyword" extended="true">
ACLOCAL_AMFLAGS|
AM_DEFAULT_SOURCE_EXT|
AUTOMAKE_OPTIONS|
BUILT_SOURCES|
CC|
CLASSPATH_ENV|
(?:DIST|MAINTAINER|MOSTLY)?CLEANFILES|
COMPILE|
(?:CXX|FC|OBJC|UPC)(?:COMPILE|LINK)?|
DEFAULT_INCLUDES|
DEFS|
DISTCHECK_CONFIGURE_FLAGS|
DVIPS|
ETAGS_ARGS|
EXTRA_DIST|
F77(?:COMPILE)?|
FLINK|
INCLUDE|
JAVAC|
JAVAROOT|
LIBS|
LINK|
(?:[A-Z]+_)?LOG_COMPILER|
MAKEINFO(?:HTML)?|
(?:OMIT|TAGS)_DEPENDENCIES|
(?:DIST_)?SUBDIRS|
SUFFIXES|
(?:AM_)?TESTS_ENVIRONMENT|
TESTS|
TEXI2(?:DVI|PDF)|
TEXINFO_TEX|
VALAC
</define-regex>
<!-- Predefined directory targets -->
<define-regex id="dirname" extended="true">
s?bin|
(?:pkg)?lib(?:exec)?|
(?:pkg)?data|
(?:pkg|old)?include|
dataroot|
sysconf|
(?:shared|local)state|
doc|
info|
html|
dvi|
pdf|
ps|
lisp|
locale|
man[1-8]?(?:ext)?|
src|
(?:pkg)?python|
(?:pkg)?pyexec
</define-regex>
<!-- Substitutions from AC_SUBST -->
<context id="subst" style-ref="subst">
<match>@\%{variable}@</match>
</context>
<!-- Lines starting with ## are not copied into Makefile.in, and no
substitutions are performed -->
<context id="nosubcomment" end-at-line-end="true" class-disabled="no-spell-check">
<start>^##</start>
<include>
<context ref="def:in-comment"/>
</include>
</context>
<!-- Copy of def:shell-like-comment, except it includes substitutions -->
<context id="comment" end-at-line-end="true" class-disabled="no-spell-check">
<start>#</start>
<include>
<context ref="subst"/>
<context ref="def:in-comment"/>
</include>
</context>
<!-- Assignment to a FLAGS variable -->
<context id="flags-assignment" end-at-line-end="true">
<start>\%{space}((?:AM_)?\%{flags}FLAGS)\%{operator}</start>
<include>
<context sub-pattern="1" where="start" style-ref="keyword"/>
<context ref="assignment-rhs"/>
</include>
</context>
<!-- Assignment to a non-primary, secondary, flags, or dir variable -->
<context id="keyword-assignment" end-at-line-end="true">
<start>\%{space}(\%{keyword})\%{operator}</start>
<include>
<context sub-pattern="1" where="start" style-ref="keyword"/>
<context ref="assignment-rhs"/>
</include>
</context>
<!-- Assignment to a primary. The subpatterns are named. Subpattern names
must not conflict subpattern names in other expressions, so some are
prefixed with a 'p' -->
<context id="primary-assignment" end-at-line-end="true">
<start extended="true">
\%{space} # beginning of line
(?P<pprefix>(?:\%{prefix}_)*) # any number of prefixes_
(?: # either...
(?P<target>\%{target})| # ...a nondir target (e.g. noinst),
(?P<dirname>\%{dirname})| # ...a dir target (e.g. bin)
(?P<pvariable>\%{variable}) # ...or a user-defined dir
)
(?P<primary>_\%{primary}) # and a _PRIMARY
\%{operator} # an assignment operator
</start>
<include>
<context sub-pattern="primary" where="start" style-ref="primary"/>
<context sub-pattern="pprefix" where="start" style-ref="prefix"/>
<context sub-pattern="target" where="start" style-ref="target"/>
<context sub-pattern="dirname" where="start" style-ref="dirname"/>
<context sub-pattern="pvariable" where="start" style-ref="lhs"/>
<context ref="assignment-rhs"/>
</include>
</context>
<!-- Assignment to a secondary. Again, some subpatterns have to be prefixed
with an 's' -->
<context id="secondary-assignment" end-at-line-end="true">
<start extended="true">
\%{space} # beginning of line
(?P<sprefix>
(?:(?:\%{prefix}|EXTRA)_)*) # any number of prefix_ or EXTRA_
(?P<svariable>\%{variable}) # the canonicalized_program_name
(?P<secondary>_\%{secondary}) # and a _SECONDARY
\%{operator} # an assignment operator
</start>
<include>
<context sub-pattern="sprefix" where="start" style-ref="prefix"/>
<context sub-pattern="svariable" where="start" style-ref="lhs"/>
<context sub-pattern="secondary" where="start" style-ref="secondary"/>
<context ref="assignment-rhs"/>
</include>
</context>
<!-- Assignment to a directory variable (e.g. foobardir) -->
<context id="dir-assignment" end-at-line-end="true">
<start>\%{space}(\%{variable})(dir)\%{operator}</start>
<include>
<context id="dir-lhs" sub-pattern="1" where="start" style-ref="lhs"/>
<context id="dir" sub-pattern="2" where="start" style-ref="keyword"/>
<context ref="assignment-rhs"/>
</include>
</context>
<!-- What is allowed on the right-hand side of an assignment -->
<context id="assignment-rhs" end-at-line-end="true">
<start></start>
<include>
<context ref="def:line-continue"/>
<context ref="def:shell-like-comment"/>
<context ref="makefile:variable"/>
<context ref="makefile:string"/>
<context ref="def:single-quoted-string"/>
<context ref="sh:backtick-subshell"/>
<context ref="subst"/>
</include>
</context>
<!-- Copy of makefile:command, except it includes substitutions -->
<context id="command" extend-parent="false" end-at-line-end="true">
<start></start>
<include>
<context ref="def:line-continue"/>
<context ref="subst"/>
<context ref="sh:sh" original="true"/>
</include>
</context>
<!-- All the contexts listed here represent an assignment to a variable
(Automake variable or otherwise), and they all contain the "assignment-rhs"
context -->
<context id="assignment">
<include>
<context ref="flags-assignment"/>
<context ref="keyword-assignment"/>
<context ref="primary-assignment"/>
<context ref="secondary-assignment"/>
<context ref="dir-assignment"/>
<context ref="makefile:assignment"/>
</include>
</context>
<!-- The main context -->
<context id="automake">
<include>
<context ref="makefile:directives" style-ref="def:keyword"/>
<context ref="makefile:functions" style-ref="def:function"/>
<context ref="subst" style-ref="subst"/>
<!-- Must come before 'comment' -->
<context ref="nosubcomment" style-ref="def:comment"/>
<context ref="comment" style-ref="def:comment"/>
<context ref="assignment"/>
<!-- Must come after 'comment', otherwise we can get rules starting
with #; must also come after 'assignment' because of := operator -->
<context ref="makefile:rule"/>
</include>
</context>
</definitions>
</language>
|