From 28c8f2dd5cb5be6a6fecaab61e3a3771e02764e8 Mon Sep 17 00:00:00 2001 From: spring2maz Date: Sat, 27 Oct 2018 14:07:47 +0200 Subject: [PATCH] Remove neotoma plugin, build cuttlefish script in sub-dir --- Makefile | 15 +++++++-------- rebar.config | 3 +-- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/Makefile b/Makefile index 23a7da11c..b4b68259f 100644 --- a/Makefile +++ b/Makefile @@ -74,8 +74,10 @@ etc/gen.emqx.conf: bbmustache etc/emqx.conf ok = file:write_file('etc/gen.emqx.conf', Targ), \ halt(0)." -app.config: cuttlefish etc/gen.emqx.conf - $(verbose) ./cuttlefish -l info -e etc/ -c etc/gen.emqx.conf -i priv/emqx.schema -d data/ +CUTTLEFISH_SCRIPT = _build/default/lib/cuttlefish/cuttlefish + +app.config: $(CUTTLEFISH_SCRIPT) etc/gen.emqx.conf + $(verbose) $(CUTTLEFISH_SCRIPT) -l info -e etc/ -c etc/gen.emqx.conf -i priv/emqx.schema -d data/ ct: app.config @@ -86,11 +88,8 @@ coveralls: @rebar3 coveralls send -cuttlefish: rebar-deps - @if [ ! -f cuttlefish ]; then \ - make -C _build/default/lib/cuttlefish; \ - mv _build/default/lib/cuttlefish/cuttlefish ./cuttlefish; \ - fi +$(CUTTLEFISH_SCRIPT): rebar-deps + @if [ ! -f cuttlefish ]; then make -C _build/default/lib/cuttlefish; fi rebar-xref: @rebar3 xref @@ -98,7 +97,7 @@ rebar-xref: rebar-deps: @rebar3 get-deps -rebar-eunit: cuttlefish +rebar-eunit: $(CUTTLEFISH_SCRIPT) @rebar3 eunit rebar-compile: diff --git a/rebar.config b/rebar.config index 63b3a7595..c64e2cfcb 100644 --- a/rebar.config +++ b/rebar.config @@ -29,6 +29,5 @@ {cover_opts, [verbose]}. {cover_export_enabled, true}. -%% rebar3_neotoma_plugin is needed to compile the .peg file for cuttlefish -{plugins, [coveralls, rebar3_neotoma_plugin]}. +{plugins, [coveralls]}.