-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathMakefile
32 lines (25 loc) · 951 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
PROJECT = rabbitmq_cloudwatch_exporter
PROJ_VSN = $(shell $(MIX) eval 'Mix.Project.config()[:version] |> IO.puts()')
DEPS = rabbit_common rabbit rabbitmq_management rabbitmq_management_agent lager_cloudwatch
DEP_PLUGINS = rabbit_common/mk/rabbitmq-plugin.mk
dep_lager_cloudwatch = hex 0.1.2
# Mix customizations
MIX_ENV ?= dev
override MIX := mix
elixir_srcs := mix.exs
# RMQ `dist` target removes anything within the `plugins` folder
# which is not managed by erlang.mk.
# We need to instruct the `rabbitmq-dist:do-dist` target to not
# remove our plugin and related dependencies.
EXTRA_DIST_EZS = $(shell find $(PWD)/plugins -name *.ez)
app:: $(elixir_srcs) deps
$(MIX) make_app
dist:: app
mkdir -p $(DIST_DIR)
$(MIX) archive.build.elixir
$(MIX) archive.build -o $(DIST_DIR)/$(PROJECT)-$(PROJ_VSN).ez
cp -r _build/$(MIX_ENV)/archives/elixir-*.ez $(DIST_DIR)
clean::
@rm -fr _build
include rabbitmq-components.mk
include erlang.mk