annotate compiler/uscriptwrapper.vim @ 9:b5040cfea052

Tweak how configs and targets are parsed and handled
author Ludovic Chabant <ludovic@chabant.com>
date Tue, 29 Aug 2023 13:06:44 -0700
parents 9235d8341a18
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2
9235d8341a18 Refactor the build system invocation commands.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
1 " Compiler file that runs vim-unreal's script wapper
9235d8341a18 Refactor the build system invocation commands.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
2 " Compiler: Vim-unreal script wrapper
9235d8341a18 Refactor the build system invocation commands.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
3 " Maintainer: Ludovic Chabant <https://ludovic.chabant.com>
9235d8341a18 Refactor the build system invocation commands.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
4
9235d8341a18 Refactor the build system invocation commands.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
5 if exists("current_compiler")
9235d8341a18 Refactor the build system invocation commands.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
6 finish
9235d8341a18 Refactor the build system invocation commands.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
7 endif
9235d8341a18 Refactor the build system invocation commands.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
8 let current_compiler = "uscriptwrapper"
9235d8341a18 Refactor the build system invocation commands.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
9
9235d8341a18 Refactor the build system invocation commands.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
10 let s:keepcpo = &cpo
9235d8341a18 Refactor the build system invocation commands.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
11
9235d8341a18 Refactor the build system invocation commands.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
12 let s:prgpath = shellescape(unreal#get_vim_script_path("ScriptWrapper"))
9235d8341a18 Refactor the build system invocation commands.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
13 let s:prgargs = get(g:, '__unreal_makeprg_args', '')
9235d8341a18 Refactor the build system invocation commands.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
14 let s:prgcmdline = escape(s:prgpath.' '.s:prgargs, ' \"')
9235d8341a18 Refactor the build system invocation commands.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
15 call unreal#trace("Setting makeprg to: ".s:prgcmdline)
9235d8341a18 Refactor the build system invocation commands.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
16 execute "CompilerSet makeprg=".s:prgcmdline
9235d8341a18 Refactor the build system invocation commands.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
17
9235d8341a18 Refactor the build system invocation commands.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
18 CompilerSet errorformat&
9235d8341a18 Refactor the build system invocation commands.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
19
9235d8341a18 Refactor the build system invocation commands.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
20 let &cpo = s:keepcpo
9235d8341a18 Refactor the build system invocation commands.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
21 unlet s:keepcpo