diff options
author | Bram Moolenaar <Bram@vim.org> | 2012-10-05 22:26:30 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2012-10-05 22:26:30 +0200 |
commit | 0c5fa7d740bafefbf0b2ea48a2a660901d7d4f10 (patch) | |
tree | 3dd614cf04a6ec0c1e8148f6aec23d5010519f1a /runtime/syntax/make.vim | |
parent | d1f13fd5978df5fd4b2e0fbc61e671edec958e15 (diff) | |
download | vim-git-0c5fa7d740bafefbf0b2ea48a2a660901d7d4f10.tar.gz |
Updated runtime files.
Diffstat (limited to 'runtime/syntax/make.vim')
-rw-r--r-- | runtime/syntax/make.vim | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/runtime/syntax/make.vim b/runtime/syntax/make.vim index e9d7ee99d..6fd46aaa5 100644 --- a/runtime/syntax/make.vim +++ b/runtime/syntax/make.vim @@ -2,7 +2,7 @@ " Language: Makefile " Maintainer: Claudio Fleiner <claudio@fleiner.com> " URL: http://www.fleiner.com/vim/syntax/make.vim -" Last Change: 2008 Aug 04 +" Last Change: 2012 Oct 05 " For version 5.x: Clear all syntax items " For version 6.x: Quit when a syntax file was already loaded @@ -12,6 +12,10 @@ elseif exists("b:current_syntax") finish endif +let s:cpo_save = &cpo +set cpo&vim + + " some special characters syn match makeSpecial "^\s*[@+-]\+" syn match makeNextLine "\\\n\s*" @@ -25,8 +29,8 @@ syn match makeOverride "^ *override" hi link makeOverride makeStatement hi link makeExport makeStatement -" Koehler: catch unmatched define/endef keywords. endef only matches it is by itself on a line -syn region makeDefine start="^\s*define\s" end="^\s*endef\s*$" contains=makeStatement,makeIdent,makePreCondit,makeDefine +" catch unmatched define/endef keywords. endef only matches it is by itself on a line, possibly followed by a commend +syn region makeDefine start="^\s*define\s" end="^\s*endef\s*\(#.*\)\?$" contains=makeStatement,makeIdent,makePreCondit,makeDefine " Microsoft Makefile specials syn case ignore @@ -48,8 +52,8 @@ syn match makeConfig "@[A-Za-z0-9_]\+@" " make targets " syn match makeSpecTarget "^\.\(SUFFIXES\|PHONY\|DEFAULT\|PRECIOUS\|IGNORE\|SILENT\|EXPORT_ALL_VARIABLES\|KEEP_STATE\|LIBPATTERNS\|NOTPARALLEL\|DELETE_ON_ERROR\|INTERMEDIATE\|POSIX\|SECONDARY\)\>" -syn match makeImplicit "^\.[A-Za-z0-9_./\t -]\+\s*:[^=]"me=e-2 nextgroup=makeSource syn match makeImplicit "^\.[A-Za-z0-9_./\t -]\+\s*:$"me=e-1 nextgroup=makeSource +syn match makeImplicit "^\.[A-Za-z0-9_./\t -]\+\s*:[^=]"me=e-2 nextgroup=makeSource syn region makeTarget transparent matchgroup=makeTarget start="^[A-Za-z0-9_./$()%-][A-Za-z0-9_./\t $()%-]*:\{1,2}[^:=]"rs=e-1 end=";"re=e-1,me=e-1 end="[^\\]$" keepend contains=makeIdent,makeSpecTarget,makeNextLine skipnl nextGroup=makeCommands syn match makeTarget "^[A-Za-z0-9_./$()%*@-][A-Za-z0-9_./\t $()%*@-]*::\=\s*$" contains=makeIdent,makeSpecTarget skipnl nextgroup=makeCommands,makeCommandError @@ -134,4 +138,6 @@ endif let b:current_syntax = "make" +let &cpo = s:cpo_save +unlet s:cpo_save " vim: ts=8 |