annotate runtime/syntax/automake.vim @ 10952:835604f3c37a v8.0.0365

patch 8.0.0365: might free a dict item that wasn't allocated commit https://github.com/vim/vim/commit/95c526e1f6d76acafee4b21f5701d6d6ac8c4b5f Author: Bram Moolenaar <Bram@vim.org> Date: Sat Feb 25 14:59:34 2017 +0100 patch 8.0.0365: might free a dict item that wasn't allocated Problem: Might free a dict item that wasn't allocated. Solution: Call dictitem_free(). (Nikolai Pavlov) Use this for b:changedtick.
author Christian Brabandt <cb@256bit.org>
date Sat, 25 Feb 2017 15:00:05 +0100
parents 46763b01cd9a
children 9d3d7b0f4861
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1 " Vim syntax file
1620
73fe8baea242 updated for version 7.2a
vimboss
parents: 1121
diff changeset
2 " Language: automake Makefile.am
73fe8baea242 updated for version 7.2a
vimboss
parents: 1121
diff changeset
3 " Maintainer: Debian VIM Maintainers <pkg-vim-maintainers@lists.alioth.debian.org>
73fe8baea242 updated for version 7.2a
vimboss
parents: 1121
diff changeset
4 " Former Maintainer: John Williams <jrw@pobox.com>
2908
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1620
diff changeset
5 " Last Change: 2011-06-13
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1620
diff changeset
6 " URL: http://anonscm.debian.org/hg/pkg-vim/vim/raw-file/unstable/runtime/syntax/automake.vim
1620
73fe8baea242 updated for version 7.2a
vimboss
parents: 1121
diff changeset
7 "
73fe8baea242 updated for version 7.2a
vimboss
parents: 1121
diff changeset
8 " XXX This file is in need of a new maintainer, Debian VIM Maintainers maintain
73fe8baea242 updated for version 7.2a
vimboss
parents: 1121
diff changeset
9 " it only because patches have been submitted for it by Debian users and the
73fe8baea242 updated for version 7.2a
vimboss
parents: 1121
diff changeset
10 " former maintainer was MIA (Missing In Action), taking over its
73fe8baea242 updated for version 7.2a
vimboss
parents: 1121
diff changeset
11 " maintenance was thus the only way to include those patches.
73fe8baea242 updated for version 7.2a
vimboss
parents: 1121
diff changeset
12 " If you care about this file, and have time to maintain it please do so!
835
8bebcabccc2c updated for version 7.0e01
vimboss
parents: 7
diff changeset
13 "
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 " This script adds support for automake's Makefile.am format. It highlights
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15 " Makefile variables significant to automake as well as highlighting
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 " autoconf-style @variable@ substitutions . Subsitutions are marked as errors
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 " when they are used in an inappropriate place, such as in defining
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 " EXTRA_SOURCES.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19
2908
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1620
diff changeset
20 " Standard syntax initialization
10048
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 2908
diff changeset
21 if exists("b:current_syntax")
2908
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1620
diff changeset
22 finish
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1620
diff changeset
23 endif
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 " Read the Makefile syntax to start with
10048
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 2908
diff changeset
26 runtime! syntax/make.vim
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27
2908
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1620
diff changeset
28 syn match automakePrimary "^\w\+\(_PROGRAMS\|_LIBRARIES\|_LISP\|_PYTHON\|_JAVA\|_SCRIPTS\|_DATA\|_HEADERS\|_MANS\|_TEXINFOS\|_LTLIBRARIES\)\s*\ze+\=="
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1620
diff changeset
29 syn match automakePrimary "^TESTS\s*\ze+\=="me=e-1
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1620
diff changeset
30 syn match automakeSecondary "^\w\+\(_SOURCES\|_LIBADD\|_LDADD\|_LDFLAGS\|_DEPENDENCIES\|_AR\|_CCASFLAGS\|_CFLAGS\|_CPPFLAGS\|_CXXFLAGS\|_FCFLAGS\|_FFLAGS\|_GCJFLAGS\|_LFLAGS\|_LIBTOOLFLAGS\|OBJCFLAGS\|RFLAGS\|UPCFLAGS\|YFLAGS\)\s*\ze+\=="
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1620
diff changeset
31 syn match automakeSecondary "^\(LDADD\|ARFLAGS\|OMIT_DEPENDENCIES\|AM_MAKEFLAGS\|\(AM_\)\=\(MAKEINFOFLAGS\|RUNTESTDEFAULTFLAGS\|ETAGSFLAGS\|CTAGSFLAGS\|JAVACFLAGS\)\)\s*\ze+\=="
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1620
diff changeset
32 syn match automakeExtra "^EXTRA_\w\+\s*\ze+\=="
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1620
diff changeset
33 syn match automakeOptions "^\(ACLOCAL_AMFLAGS\|AUTOMAKE_OPTIONS\|DISTCHECK_CONFIGURE_FLAGS\|ETAGS_ARGS\|TAGS_DEPENDENCIES\)\s*\ze+\=="
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1620
diff changeset
34 syn match automakeClean "^\(MOSTLY\|DIST\|MAINTAINER\)\=CLEANFILES\s*\ze+\=="
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1620
diff changeset
35 syn match automakeSubdirs "^\(DIST_\)\=SUBDIRS\s*\ze+\=="
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1620
diff changeset
36 syn match automakeConditional "^\(if\s*!\=\w\+\|else\|endif\)\s*$"
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37
2908
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1620
diff changeset
38 syn match automakeSubst "@\w\+@"
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1620
diff changeset
39 syn match automakeSubst "^\s*@\w\+@"
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40 syn match automakeComment1 "#.*$" contains=automakeSubst
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 syn match automakeComment2 "##.*$"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43 syn match automakeMakeError "$[{(][^})]*[^a-zA-Z0-9_})][^})]*[})]" " GNU make function call
2908
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1620
diff changeset
44 syn match automakeMakeError "^AM_LDADD\s*\ze+\==" " Common mistake
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45
2908
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1620
diff changeset
46 syn region automakeNoSubst start="^EXTRA_\w*\s*+\==" end="$" contains=ALLBUT,automakeNoSubst transparent
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1620
diff changeset
47 syn region automakeNoSubst start="^DIST_SUBDIRS\s*+\==" end="$" contains=ALLBUT,automakeNoSubst transparent
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1620
diff changeset
48 syn region automakeNoSubst start="^\w*_SOURCES\s*+\==" end="$" contains=ALLBUT,automakeNoSubst transparent
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1620
diff changeset
49 syn match automakeBadSubst "@\(\w*@\=\)\=" contained
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51 syn region automakeMakeDString start=+"+ skip=+\\"+ end=+"+ contains=makeIdent,automakeSubstitution
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52 syn region automakeMakeSString start=+'+ skip=+\\'+ end=+'+ contains=makeIdent,automakeSubstitution
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53 syn region automakeMakeBString start=+`+ skip=+\\`+ end=+`+ contains=makeIdent,makeSString,makeDString,makeNextLine,automakeSubstitution
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55 " Define the default highlighting.
10048
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 2908
diff changeset
56 " Only when an item doesn't have highlighting yet
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57
10051
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
58 hi def link automakePrimary Statement
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
59 hi def link automakeSecondary Type
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
60 hi def link automakeExtra Special
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
61 hi def link automakeOptions Special
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
62 hi def link automakeClean Special
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
63 hi def link automakeSubdirs Statement
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
64 hi def link automakeConditional PreProc
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
65 hi def link automakeSubst PreProc
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
66 hi def link automakeComment1 makeComment
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
67 hi def link automakeComment2 makeComment
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
68 hi def link automakeMakeError makeError
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
69 hi def link automakeBadSubst makeError
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
70 hi def link automakeMakeDString makeDString
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
71 hi def link automakeMakeSString makeSString
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
72 hi def link automakeMakeBString makeBString
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
73
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
74
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
75 let b:current_syntax = "automake"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
76
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
77 " vi: ts=8 sw=4 sts=4