From cfa2fd81b68c2121b43d17ba35453c02f3f45af4 Mon Sep 17 00:00:00 2001 From: espie Date: Fri, 16 May 2008 20:19:12 +0000 Subject: [PATCH] improve syntax for our make. okay ckuethe@ --- editors/vim/Makefile | 4 +- .../vim/patches/patch-runtime_syntax_make_vim | 67 +++++++++++++++++++ 2 files changed, 69 insertions(+), 2 deletions(-) create mode 100644 editors/vim/patches/patch-runtime_syntax_make_vim diff --git a/editors/vim/Makefile b/editors/vim/Makefile index 89722973a60..d581d595e42 100644 --- a/editors/vim/Makefile +++ b/editors/vim/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.91 2008/03/20 06:02:08 ckuethe Exp $ +# $OpenBSD: Makefile,v 1.92 2008/05/16 20:19:12 espie Exp $ COMMENT-main= vi clone, many additional features COMMENT-lang= vi clone, NLS subpackage @@ -8,7 +8,7 @@ REVISION= 281 VERSION= 7.1.${REVISION} # keep PKGNAME for full version number PKGNAME= vim-${VERSION} -PKGNAME-main= vim-${VERSION}p0 +PKGNAME-main= vim-${VERSION}p1 PKGNAME-lang= vim-lang-${VERSION} P= ${DISTNAME:C/[-\.]//g} CATEGORIES= editors diff --git a/editors/vim/patches/patch-runtime_syntax_make_vim b/editors/vim/patches/patch-runtime_syntax_make_vim new file mode 100644 index 00000000000..19c7f9051eb --- /dev/null +++ b/editors/vim/patches/patch-runtime_syntax_make_vim @@ -0,0 +1,67 @@ +$OpenBSD: patch-runtime_syntax_make_vim,v 1.1 2008/05/16 20:19:12 espie Exp $ +--- runtime/syntax/make.vim.orig Tue May 1 11:18:11 2007 ++++ runtime/syntax/make.vim Sat Apr 5 20:38:11 2008 +@@ -22,6 +22,9 @@ syn match makeInclude "^ *[-s]\=include" + syn match makeStatement "^ *vpath" + syn match makeExport "^ *\(export\|unexport\)\>" + syn match makeOverride "^ *override" ++" BSD directives ++syn match makePreCondit "^\. *\(if\|else\|endif\|ifdef\|ifndef\|ifmake\|ifnmake\|elif\|elifdef\|for\|endfor\|undef\)\>" ++syn match makeInclude "^ *\. *include" + hi link makeOverride makeStatement + hi link makeExport makeStatement + +@@ -37,25 +40,29 @@ syn case match + " identifiers + syn region makeIdent start="\$(" skip="\\)\|\\\\" end=")" contains=makeStatement,makeIdent,makeSString,makeDString + syn region makeIdent start="\${" skip="\\}\|\\\\" end="}" contains=makeStatement,makeIdent,makeSString,makeDString ++syn region makeIdent start="\" ++" syn match makeSpecTarget "^\.\(SUFFIXES\|PHONY\|DEFAULT\|PRECIOUS\|IGNORE\|SILENT\|EXPORT_ALL_VARIABLES\|KEEP_STATE\|LIBPATTERNS\|NOTPARALLEL\|DELETE_ON_ERROR\|INTERMEDIATE\|POSIX\|SECONDARY\|MAIN\)\>" + 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 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 + +-syn region makeSpecTarget transparent matchgroup=makeSpecTarget start="^\.\(SUFFIXES\|PHONY\|DEFAULT\|PRECIOUS\|IGNORE\|SILENT\|EXPORT_ALL_VARIABLES\|KEEP_STATE\|LIBPATTERNS\|NOTPARALLEL\|DELETE_ON_ERROR\|INTERMEDIATE\|POSIX\|SECONDARY\)\>\s*:\{1,2}[^:=]"rs=e-1 end="[^\\]$" keepend contains=makeIdent,makeSpecTarget,makeNextLine skipnl nextGroup=makeCommands +-syn match makeSpecTarget "^\.\(SUFFIXES\|PHONY\|DEFAULT\|PRECIOUS\|IGNORE\|SILENT\|EXPORT_ALL_VARIABLES\|KEEP_STATE\|LIBPATTERNS\|NOTPARALLEL\|DELETE_ON_ERROR\|INTERMEDIATE\|POSIX\|SECONDARY\)\>\s*::\=\s*$" contains=makeIdent skipnl nextgroup=makeCommands,makeCommandError ++syn region makeSpecTarget transparent matchgroup=makeSpecTarget start="^\.\(SUFFIXES\|PHONY\|DEFAULT\|PRECIOUS\|IGNORE\|SILENT\|EXPORT_ALL_VARIABLES\|KEEP_STATE\|LIBPATTERNS\|NOTPARALLEL\|DELETE_ON_ERROR\|INTERMEDIATE\|POSIX\|SECONDARY\|MAIN\)\>\s*:\{1,2}[^:=]"rs=e-1 end="[^\\]$" keepend contains=makeIdent,makeSpecTarget,makeNextLine skipnl nextGroup=makeCommands ++syn match makeSpecTarget "^\.\(SUFFIXES\|PHONY\|DEFAULT\|PRECIOUS\|IGNORE\|SILENT\|EXPORT_ALL_VARIABLES\|KEEP_STATE\|LIBPATTERNS\|NOTPARALLEL\|DELETE_ON_ERROR\|INTERMEDIATE\|POSIX\|SECONDARY\|MAIN\)\>\s*::\=\s*$" contains=makeIdent skipnl nextgroup=makeCommands,makeCommandError + + syn match makeCommandError "^\s\+\S.*" contained + syn region makeCommands start=";"hs=s+1 start="^\t" end="^[^\t#]"me=e-1,re=e-1 end="^$" contained contains=makeCmdNextLine,makeSpecial,makeComment,makeIdent,makePreCondit,makeDefine,makeDString,makeSString nextgroup=makeCommandError +@@ -63,14 +70,14 @@ syn match makeCmdNextLine "\\\n."he=e-1 contained + + + " Statements / Functions (GNU make) +-syn match makeStatement contained "(\(subst\|addprefix\|addsuffix\|basename\|call\|dir\|error\|eval\|filter-out\|filter\|findstring\|firstword\|foreach\|if\|join\|notdir\|origin\|patsubst\|shell\|sort\|strip\|suffix\|warning\|wildcard\|word\|wordlist\|words\)\>"ms=s+1 ++syn match makeStatement contained "(\(subst\|addprefix\|addsuffix\|basename\|call\|dir\|error\|filter-out\|filter\|findstring\|firstword\|foreach\|if\|join\|notdir\|origin\|patsubst\|shell\|sort\|strip\|suffix\|warning\|wildcard\|word\|wordlist\|words\)\>"ms=s+1 + + " Comment + if exists("make_microsoft") +- syn match makeComment "#.*" contains=@Spell,makeTodo ++ syn match makeComment "#.*" contains=makeTodo + elseif !exists("make_no_comments") +- syn region makeComment start="#" end="^$" end="[^\\]$" keepend contains=@Spell,makeTodo +- syn match makeComment "#$" contains=@Spell ++ syn region makeComment start="#" end="^$" end="[^\\]$" keepend contains=makeTodo ++ syn match makeComment "#$" + endif + syn keyword makeTodo TODO FIXME XXX contained +