Mercurial > vim
annotate runtime/syntax/automake.vim @ 10048:43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Aug 30 23:26:57 2016 +0200
Updated runtime files. Remove version checks for Vim older than 6.0.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Tue, 30 Aug 2016 23:30:09 +0200 |
parents | fd09a9c8468e |
children | 46763b01cd9a |
rev | line source |
---|---|
7 | 1 " Vim syntax file |
1620 | 2 " Language: automake Makefile.am |
3 " Maintainer: Debian VIM Maintainers <pkg-vim-maintainers@lists.alioth.debian.org> | |
4 " Former Maintainer: John Williams <jrw@pobox.com> | |
2908 | 5 " Last Change: 2011-06-13 |
6 " URL: http://anonscm.debian.org/hg/pkg-vim/vim/raw-file/unstable/runtime/syntax/automake.vim | |
1620 | 7 " |
8 " XXX This file is in need of a new maintainer, Debian VIM Maintainers maintain | |
9 " it only because patches have been submitted for it by Debian users and the | |
10 " former maintainer was MIA (Missing In Action), taking over its | |
11 " maintenance was thus the only way to include those patches. | |
12 " If you care about this file, and have time to maintain it please do so! | |
835 | 13 " |
7 | 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 | |
2908 | 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 | 22 finish |
23 endif | |
7 | 24 |
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 | 27 |
2908 | 28 syn match automakePrimary "^\w\+\(_PROGRAMS\|_LIBRARIES\|_LISP\|_PYTHON\|_JAVA\|_SCRIPTS\|_DATA\|_HEADERS\|_MANS\|_TEXINFOS\|_LTLIBRARIES\)\s*\ze+\==" |
29 syn match automakePrimary "^TESTS\s*\ze+\=="me=e-1 | |
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+\==" | |
31 syn match automakeSecondary "^\(LDADD\|ARFLAGS\|OMIT_DEPENDENCIES\|AM_MAKEFLAGS\|\(AM_\)\=\(MAKEINFOFLAGS\|RUNTESTDEFAULTFLAGS\|ETAGSFLAGS\|CTAGSFLAGS\|JAVACFLAGS\)\)\s*\ze+\==" | |
32 syn match automakeExtra "^EXTRA_\w\+\s*\ze+\==" | |
33 syn match automakeOptions "^\(ACLOCAL_AMFLAGS\|AUTOMAKE_OPTIONS\|DISTCHECK_CONFIGURE_FLAGS\|ETAGS_ARGS\|TAGS_DEPENDENCIES\)\s*\ze+\==" | |
34 syn match automakeClean "^\(MOSTLY\|DIST\|MAINTAINER\)\=CLEANFILES\s*\ze+\==" | |
35 syn match automakeSubdirs "^\(DIST_\)\=SUBDIRS\s*\ze+\==" | |
36 syn match automakeConditional "^\(if\s*!\=\w\+\|else\|endif\)\s*$" | |
7 | 37 |
2908 | 38 syn match automakeSubst "@\w\+@" |
39 syn match automakeSubst "^\s*@\w\+@" | |
7 | 40 syn match automakeComment1 "#.*$" contains=automakeSubst |
41 syn match automakeComment2 "##.*$" | |
42 | |
43 syn match automakeMakeError "$[{(][^})]*[^a-zA-Z0-9_})][^})]*[})]" " GNU make function call | |
2908 | 44 syn match automakeMakeError "^AM_LDADD\s*\ze+\==" " Common mistake |
7 | 45 |
2908 | 46 syn region automakeNoSubst start="^EXTRA_\w*\s*+\==" end="$" contains=ALLBUT,automakeNoSubst transparent |
47 syn region automakeNoSubst start="^DIST_SUBDIRS\s*+\==" end="$" contains=ALLBUT,automakeNoSubst transparent | |
48 syn region automakeNoSubst start="^\w*_SOURCES\s*+\==" end="$" contains=ALLBUT,automakeNoSubst transparent | |
49 syn match automakeBadSubst "@\(\w*@\=\)\=" contained | |
7 | 50 |
51 syn region automakeMakeDString start=+"+ skip=+\\"+ end=+"+ contains=makeIdent,automakeSubstitution | |
52 syn region automakeMakeSString start=+'+ skip=+\\'+ end=+'+ contains=makeIdent,automakeSubstitution | |
53 syn region automakeMakeBString start=+`+ skip=+\\`+ end=+`+ contains=makeIdent,makeSString,makeDString,makeNextLine,automakeSubstitution | |
54 | |
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 |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
2908
diff
changeset
|
57 command -nargs=+ HiLink hi def link <args> |
7 | 58 |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
2908
diff
changeset
|
59 HiLink automakePrimary Statement |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
2908
diff
changeset
|
60 HiLink automakeSecondary Type |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
2908
diff
changeset
|
61 HiLink automakeExtra Special |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
2908
diff
changeset
|
62 HiLink automakeOptions Special |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
2908
diff
changeset
|
63 HiLink automakeClean Special |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
2908
diff
changeset
|
64 HiLink automakeSubdirs Statement |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
2908
diff
changeset
|
65 HiLink automakeConditional PreProc |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
2908
diff
changeset
|
66 HiLink automakeSubst PreProc |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
2908
diff
changeset
|
67 HiLink automakeComment1 makeComment |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
2908
diff
changeset
|
68 HiLink automakeComment2 makeComment |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
2908
diff
changeset
|
69 HiLink automakeMakeError makeError |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
2908
diff
changeset
|
70 HiLink automakeBadSubst makeError |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
2908
diff
changeset
|
71 HiLink automakeMakeDString makeDString |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
2908
diff
changeset
|
72 HiLink automakeMakeSString makeSString |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
2908
diff
changeset
|
73 HiLink automakeMakeBString makeBString |
7 | 74 |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
2908
diff
changeset
|
75 delcommand HiLink |
7 | 76 |
77 let b:current_syntax = "automake" | |
78 | |
79 " vi: ts=8 sw=4 sts=4 |