1" Vim syntax file 2" Language: Free Pascal Makefile Definition Files 3" Maintainer: Doug Kearns <[email protected]> 4" Last Change: 2021 Apr 23 5 6if exists("b:current_syntax") 7 finish 8endif 9 10runtime! syntax/make.vim 11 12" NOTE: using start-of-line anchored syn-match groups is simpler than other 13" alternatives when interacting with the sourced make.vim syntax groups 14 15" Sections 16syn region fpcmakeSection matchgroup=fpcmakeSectionDelimiter start="^\s*\[" end="]" contains=fpcmakeSectionName 17 18syn keyword fpcmakeSectionName contained clean compiler default dist install 19syn keyword fpcmakeSectionName contained lib package prerules require rules 20syn keyword fpcmakeSectionName contained shared target 21 22" [clean] 23syn match fpcmakeRule "^\s*\(units\|files\)\>" 24" [compiler] 25syn match fpcmakeRule "^\s*\(options\|version\|unitdir\|librarydir\|objectdir\)\>" 26syn match fpcmakeRule "^\s*\(targetdir\|sourcedir\|unittargetdir\|includedir\)\>" 27" [default] 28syn match fpcmakeRule "^\s*\(cpu\|dir\|fpcdir\|rule\|target\)\>" 29" [dist] 30syn match fpcmakeRule "^\s*\(destdir\|zipname\|ziptarget\)\>" 31" [install] 32syn match fpcmakeRule "^\s*\(basedir\|datadir\|fpcpackage\|files\|prefix\)\>" 33syn match fpcmakeRule "^\s*\(units\)\>" 34" [package] 35syn match fpcmakeRule "^\s*\(name\|version\|main\)\>" 36" [requires] 37syn match fpcmakeRule "^\s*\(fpcmake\|packages\|libc\|nortl\|unitdir\)\>" 38syn match fpcmakeRule "^\s*\(packagedir\|tools\)\>" 39" [shared] 40syn match fpcmakeRule "^\s*\(build\|libname\|libversion\|libunits\)\>" 41" [target] 42syn match fpcmakeRule "^\s*\(dirs\|exampledirs\|examples\|loaders\|programs\)\>" 43syn match fpcmakeRule "^\s*\(rsts\|units\)\>" 44 45" Comments 46syn keyword fpcmakeTodo TODO FIXME XXX contained 47syn match fpcmakeComment "#.*" contains=fpcmakeTodo,@Spell 48 49" Default highlighting 50hi def link fpcmakeSectionDelimiter Delimiter 51hi def link fpcmakeSectionName Type 52hi def link fpcmakeComment Comment 53hi def link fpcmakeTodo Todo 54hi def link fpcmakeRule Identifier 55 56let b:current_syntax = "fpcmake" 57 58" vim: nowrap sw=2 sts=2 ts=8 noet: 59