2016-08-31 13:43:32 +00:00
|
|
|
REBAR := $(shell which rebar3 2>/dev/null || which ./rebar3)
|
2021-10-21 14:58:03 +00:00
|
|
|
SUBMODULES = build_utils
|
2016-08-31 13:43:32 +00:00
|
|
|
SUBTARGETS = $(patsubst %,%/.git,$(SUBMODULES))
|
|
|
|
|
2021-10-21 14:58:03 +00:00
|
|
|
UTILS_PATH := build_utils
|
2016-08-31 13:43:32 +00:00
|
|
|
TEMPLATES_PATH := .
|
|
|
|
|
|
|
|
# Name of the service
|
|
|
|
SERVICE_NAME := dmt_client
|
|
|
|
|
|
|
|
# Build image tag to be used
|
2021-06-03 10:35:24 +00:00
|
|
|
BUILD_IMAGE_NAME := build-erlang
|
|
|
|
BUILD_IMAGE_TAG := eb6f9920868599f7e1a8ee9aaedb1921a027f7a0
|
2016-08-31 13:43:32 +00:00
|
|
|
|
2020-10-14 09:38:41 +00:00
|
|
|
CALL_ANYWHERE := all submodules rebar-update compile xref lint dialyze check clean distclean check_format format
|
2016-08-31 13:43:32 +00:00
|
|
|
CALL_W_CONTAINER := $(CALL_ANYWHERE) test
|
|
|
|
|
|
|
|
all: compile
|
|
|
|
|
|
|
|
-include $(UTILS_PATH)/make_lib/utils_container.mk
|
|
|
|
|
|
|
|
.PHONY: $(CALL_W_CONTAINER)
|
|
|
|
|
|
|
|
$(SUBTARGETS): %/.git: %
|
|
|
|
git submodule update --init $<
|
|
|
|
touch $@
|
|
|
|
|
|
|
|
submodules: $(SUBTARGETS)
|
|
|
|
|
|
|
|
rebar-update:
|
|
|
|
$(REBAR) update
|
|
|
|
|
|
|
|
compile: submodules rebar-update
|
|
|
|
$(REBAR) compile
|
|
|
|
|
|
|
|
xref: submodules
|
|
|
|
$(REBAR) xref
|
|
|
|
|
|
|
|
lint:
|
|
|
|
elvis rock
|
|
|
|
|
2020-10-14 09:38:41 +00:00
|
|
|
check_format:
|
|
|
|
$(REBAR) fmt -c
|
|
|
|
|
|
|
|
format:
|
|
|
|
$(REBAR) fmt -w
|
|
|
|
|
2016-08-31 13:43:32 +00:00
|
|
|
dialyze: submodules
|
2019-12-20 14:10:14 +00:00
|
|
|
$(REBAR) as dialyze dialyzer
|
2016-08-31 13:43:32 +00:00
|
|
|
|
|
|
|
test: submodules
|
2019-05-06 13:19:41 +00:00
|
|
|
$(REBAR) eunit
|
2016-08-31 13:43:32 +00:00
|
|
|
$(REBAR) ct
|
|
|
|
|
2019-05-06 13:19:41 +00:00
|
|
|
check: lint xref dialyze
|
|
|
|
|
2016-08-31 13:43:32 +00:00
|
|
|
clean:
|
|
|
|
$(REBAR) clean
|
|
|
|
|
|
|
|
distclean:
|
2021-06-03 10:35:24 +00:00
|
|
|
rm -rfv _build
|