annotate runtime/syntax/automake.vim @ 1624:18ee39301b82 v7.2a

updated for version 7.2a
author vimboss
date Tue, 24 Jun 2008 22:58:06 +0000
parents 73fe8baea242
children fd09a9c8468e
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>
73fe8baea242 updated for version 7.2a
vimboss
parents: 1121
diff changeset
5 " Last Change: 2007-10-14
73fe8baea242 updated for version 7.2a
vimboss
parents: 1121
diff changeset
6 " URL: http://git.debian.org/?p=pkg-vim/vim.git;a=blob_plain;f=runtime/syntax/automake.vim;hb=debian
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
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21 " Read the Makefile syntax to start with
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 if version < 600
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 source <sfile>:p:h/make.vim
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 runtime! syntax/make.vim
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27
1620
73fe8baea242 updated for version 7.2a
vimboss
parents: 1121
diff changeset
28 syn match automakePrimary "^[A-Za-z0-9_]\+\(_PROGRAMS\|LIBRARIES\|_LIST\|_SCRIPTS\|_DATA\|_HEADERS\|_MANS\|_TEXINFOS\|_JAVA\|_LTLIBRARIES\)\s*="me=e-1
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 syn match automakePrimary "^TESTS\s*="me=e-1
1620
73fe8baea242 updated for version 7.2a
vimboss
parents: 1121
diff changeset
30 syn match automakeSecondary "^[A-Za-z0-9_]\+\(_SOURCES\|_LDADD\|_LIBADD\|_LDFLAGS\|_DEPENDENCIES\|_CPPFLAGS\)\s*="me=e-1
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31 syn match automakeSecondary "^OMIT_DEPENDENCIES\s*="me=e-1
1620
73fe8baea242 updated for version 7.2a
vimboss
parents: 1121
diff changeset
32 syn match automakeExtra "^EXTRA_[A-Za-z0-9_]\+\s*="me=e-1
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33 syn match automakeOptions "^\(AUTOMAKE_OPTIONS\|ETAGS_ARGS\|TAGS_DEPENDENCIES\)\s*="me=e-1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34 syn match automakeClean "^\(MOSTLY\|DIST\|MAINTAINER\)\=CLEANFILES\s*="me=e-1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35 syn match automakeSubdirs "^\(DIST_\)\=SUBDIRS\s*="me=e-1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 syn match automakeConditional "^\(if\s*[a-zA-Z0-9_]\+\|else\|endif\)\s*$"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38 syn match automakeSubst "@[a-zA-Z0-9_]\+@"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39 syn match automakeSubst "^\s*@[a-zA-Z0-9_]\+@"
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
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45 syn region automakeNoSubst start="^EXTRA_[a-zA-Z0-9_]*\s*=" end="$" contains=ALLBUT,automakeNoSubst transparent
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46 syn region automakeNoSubst start="^DIST_SUBDIRS\s*=" end="$" contains=ALLBUT,automakeNoSubst transparent
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47 syn region automakeNoSubst start="^[a-zA-Z0-9_]*_SOURCES\s*=" end="$" contains=ALLBUT,automakeNoSubst transparent
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48 syn match automakeBadSubst "@\([a-zA-Z0-9_]*@\=\)\=" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50 syn region automakeMakeDString start=+"+ skip=+\\"+ end=+"+ contains=makeIdent,automakeSubstitution
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51 syn region automakeMakeSString start=+'+ skip=+\\'+ end=+'+ contains=makeIdent,automakeSubstitution
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52 syn region automakeMakeBString start=+`+ skip=+\\`+ end=+`+ contains=makeIdent,makeSString,makeDString,makeNextLine,automakeSubstitution
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54 " Define the default highlighting.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55 " For version 5.7 and earlier: only when not done already
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56 " For version 5.8 and later: only when an item doesn't have highlighting yet
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57 if version >= 508 || !exists("did_automake_syntax_inits")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58 if version < 508
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
59 let did_automake_syntax_inits = 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60 command -nargs=+ HiLink hi link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62 command -nargs=+ HiLink hi def link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
65 HiLink automakePrimary Statement
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
66 HiLink automakeSecondary Type
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
67 HiLink automakeExtra Special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
68 HiLink automakeOptions Special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
69 HiLink automakeClean Special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
70 HiLink automakeSubdirs Statement
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
71 HiLink automakeConditional PreProc
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
72 HiLink automakeSubst PreProc
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
73 HiLink automakeComment1 makeComment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
74 HiLink automakeComment2 makeComment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
75 HiLink automakeMakeError makeError
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
76 HiLink automakeBadSubst makeError
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
77 HiLink automakeMakeDString makeDString
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
78 HiLink automakeMakeSString makeSString
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
79 HiLink automakeMakeBString makeBString
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
80
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
81 delcommand HiLink
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
82 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
83
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
84 let b:current_syntax = "automake"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
85
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
86 " vi: ts=8 sw=4 sts=4