diff options
author | Jean-Sébastien Pédron <[email protected]> | 2017-01-06 16:32:04 +0100 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2017-01-12 12:52:32 +0100 |
commit | e7eb93f38635c261f508736dea2dc08a3c58c9a0 (patch) | |
tree | 9d885b131e1eb383b580b755c0247e7688703414 | |
parent | 1361da6c7b1fea8cb08c57689395147835ec3c35 (diff) | |
download | erlang.mk-e7eb93f38635c261f508736dea2dc08a3c58c9a0.tar.gz erlang.mk-e7eb93f38635c261f508736dea2dc08a3c58c9a0.tar.bz2 erlang.mk-e7eb93f38635c261f508736dea2dc08a3c58c9a0.zip |
plugins/syntastic.mk: New plugin to pass build options to Syntastic
Syntastic, an Erlang syntax checker plugin for Vim, uses the Erlang
compile application to get compilation errors and warnings. Therefore it
needs cooperation from the build system to get the appropriate compile
flags.
Currently it supports Rebar by parsing the configuration file. To add
support for Erlang.mk, we need new Make targets to return the compile
flags.
This plugin adds three targets:
o make show-ERL_LIBS
o make show-ERLC_OPTS
o make show-TEST_ERLC_OPTS
Separate patches for Syntastic's builtin checker and syntaxerl are
ready: they simply run those targets and parse the output.
-rw-r--r-- | build.config | 1 | ||||
-rw-r--r-- | plugins/syntastic.mk | 13 |
2 files changed, 14 insertions, 0 deletions
diff --git a/build.config b/build.config index 0ba1245..dad175c 100644 --- a/build.config +++ b/build.config @@ -32,6 +32,7 @@ plugins/escript plugins/eunit plugins/relx plugins/shell +plugins/syntastic plugins/triq plugins/xref diff --git a/plugins/syntastic.mk b/plugins/syntastic.mk new file mode 100644 index 0000000..93a766a --- /dev/null +++ b/plugins/syntastic.mk @@ -0,0 +1,13 @@ +# Copyright (c) 2017, Jean-Sébastien Pédron <[email protected]> +# This file is contributed to erlang.mk and subject to the terms of the ISC License. + +.PHONY: show-ERL_LIBS show-ERLC_OPTS show-TEST_ERLC_OPTS + +show-ERL_LIBS: + @echo $(ERL_LIBS) + +show-ERLC_OPTS: + @$(foreach opt,$(ERLC_OPTS) -pa ebin -I include,echo "$(opt)";) + +show-TEST_ERLC_OPTS: + @$(foreach opt,$(TEST_ERLC_OPTS) -pa ebin -I include,echo "$(opt)";) |