Mercurial > hg > RemoteEditor > vim7
annotate runtime/syntax/automake.vim @ 39:c16898406ff2
synchorinize version 7.3.081
author | one@zeus.cr.ie.u-ryukyu.ac.jp |
---|---|
date | Fri, 17 Dec 2010 17:43:06 +0900 |
parents | e170173ecb68 |
children | 67300faee616 |
rev | line source |
---|---|
0 | 1 " Vim syntax file |
34
e170173ecb68
before ack base protocol.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
2 " Language: automake Makefile.am |
e170173ecb68
before ack base protocol.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
3 " Maintainer: Debian VIM Maintainers <pkg-vim-maintainers@lists.alioth.debian.org> |
e170173ecb68
before ack base protocol.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
4 " Former Maintainer: John Williams <jrw@pobox.com> |
e170173ecb68
before ack base protocol.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
5 " Last Change: 2007-10-14 |
e170173ecb68
before ack base protocol.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
6 " URL: http://git.debian.org/?p=pkg-vim/vim.git;a=blob_plain;f=runtime/syntax/automake.vim;hb=debian |
e170173ecb68
before ack base protocol.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
7 " |
e170173ecb68
before ack base protocol.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
8 " XXX This file is in need of a new maintainer, Debian VIM Maintainers maintain |
e170173ecb68
before ack base protocol.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
9 " it only because patches have been submitted for it by Debian users and the |
e170173ecb68
before ack base protocol.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
10 " former maintainer was MIA (Missing In Action), taking over its |
e170173ecb68
before ack base protocol.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
11 " maintenance was thus the only way to include those patches. |
e170173ecb68
before ack base protocol.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
12 " If you care about this file, and have time to maintain it please do so! |
0 | 13 " |
14 " This script adds support for automake's Makefile.am format. It highlights | |
15 " Makefile variables significant to automake as well as highlighting | |
16 " autoconf-style @variable@ substitutions . Subsitutions are marked as errors | |
17 " when they are used in an inappropriate place, such as in defining | |
18 " EXTRA_SOURCES. | |
19 | |
20 | |
21 " Read the Makefile syntax to start with | |
22 if version < 600 | |
23 source <sfile>:p:h/make.vim | |
24 else | |
25 runtime! syntax/make.vim | |
26 endif | |
27 | |
34
e170173ecb68
before ack base protocol.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
28 syn match automakePrimary "^[A-Za-z0-9_]\+\(_PROGRAMS\|LIBRARIES\|_LIST\|_SCRIPTS\|_DATA\|_HEADERS\|_MANS\|_TEXINFOS\|_JAVA\|_LTLIBRARIES\)\s*="me=e-1 |
0 | 29 syn match automakePrimary "^TESTS\s*="me=e-1 |
34
e170173ecb68
before ack base protocol.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
30 syn match automakeSecondary "^[A-Za-z0-9_]\+\(_SOURCES\|_LDADD\|_LIBADD\|_LDFLAGS\|_DEPENDENCIES\|_CPPFLAGS\)\s*="me=e-1 |
0 | 31 syn match automakeSecondary "^OMIT_DEPENDENCIES\s*="me=e-1 |
34
e170173ecb68
before ack base protocol.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
32 syn match automakeExtra "^EXTRA_[A-Za-z0-9_]\+\s*="me=e-1 |
0 | 33 syn match automakeOptions "^\(AUTOMAKE_OPTIONS\|ETAGS_ARGS\|TAGS_DEPENDENCIES\)\s*="me=e-1 |
34 syn match automakeClean "^\(MOSTLY\|DIST\|MAINTAINER\)\=CLEANFILES\s*="me=e-1 | |
35 syn match automakeSubdirs "^\(DIST_\)\=SUBDIRS\s*="me=e-1 | |
36 syn match automakeConditional "^\(if\s*[a-zA-Z0-9_]\+\|else\|endif\)\s*$" | |
37 | |
38 syn match automakeSubst "@[a-zA-Z0-9_]\+@" | |
39 syn match automakeSubst "^\s*@[a-zA-Z0-9_]\+@" | |
40 syn match automakeComment1 "#.*$" contains=automakeSubst | |
41 syn match automakeComment2 "##.*$" | |
42 | |
43 syn match automakeMakeError "$[{(][^})]*[^a-zA-Z0-9_})][^})]*[})]" " GNU make function call | |
44 | |
45 syn region automakeNoSubst start="^EXTRA_[a-zA-Z0-9_]*\s*=" end="$" contains=ALLBUT,automakeNoSubst transparent | |
46 syn region automakeNoSubst start="^DIST_SUBDIRS\s*=" end="$" contains=ALLBUT,automakeNoSubst transparent | |
47 syn region automakeNoSubst start="^[a-zA-Z0-9_]*_SOURCES\s*=" end="$" contains=ALLBUT,automakeNoSubst transparent | |
48 syn match automakeBadSubst "@\([a-zA-Z0-9_]*@\=\)\=" contained | |
49 | |
50 syn region automakeMakeDString start=+"+ skip=+\\"+ end=+"+ contains=makeIdent,automakeSubstitution | |
51 syn region automakeMakeSString start=+'+ skip=+\\'+ end=+'+ contains=makeIdent,automakeSubstitution | |
52 syn region automakeMakeBString start=+`+ skip=+\\`+ end=+`+ contains=makeIdent,makeSString,makeDString,makeNextLine,automakeSubstitution | |
53 | |
54 " Define the default highlighting. | |
55 " For version 5.7 and earlier: only when not done already | |
56 " For version 5.8 and later: only when an item doesn't have highlighting yet | |
57 if version >= 508 || !exists("did_automake_syntax_inits") | |
58 if version < 508 | |
59 let did_automake_syntax_inits = 1 | |
60 command -nargs=+ HiLink hi link <args> | |
61 else | |
62 command -nargs=+ HiLink hi def link <args> | |
63 endif | |
64 | |
65 HiLink automakePrimary Statement | |
66 HiLink automakeSecondary Type | |
67 HiLink automakeExtra Special | |
68 HiLink automakeOptions Special | |
69 HiLink automakeClean Special | |
70 HiLink automakeSubdirs Statement | |
71 HiLink automakeConditional PreProc | |
72 HiLink automakeSubst PreProc | |
73 HiLink automakeComment1 makeComment | |
74 HiLink automakeComment2 makeComment | |
75 HiLink automakeMakeError makeError | |
76 HiLink automakeBadSubst makeError | |
77 HiLink automakeMakeDString makeDString | |
78 HiLink automakeMakeSString makeSString | |
79 HiLink automakeMakeBString makeBString | |
80 | |
81 delcommand HiLink | |
82 endif | |
83 | |
84 let b:current_syntax = "automake" | |
85 | |
86 " vi: ts=8 sw=4 sts=4 |