From e7eb93f38635c261f508736dea2dc08a3c58c9a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-S=C3=A9bastien=20P=C3=A9dron?= Date: Fri, 6 Jan 2017 16:32:04 +0100 Subject: 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. --- build.config | 1 + plugins/syntastic.mk | 13 +++++++++++++ 2 files changed, 14 insertions(+) create mode 100644 plugins/syntastic.mk 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 +# 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)";) -- cgit v1.2.3