dmt-client/Makefile

62 lines
1.0 KiB
Makefile
Raw Normal View History

2016-08-31 13:43:32 +00:00
REBAR := $(shell which rebar3 2>/dev/null || which ./rebar3)
SUBMODULES = build_utils
2016-08-31 13:43:32 +00:00
SUBTARGETS = $(patsubst %,%/.git,$(SUBMODULES))
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
BUILD_IMAGE_NAME := build-erlang
BUILD_IMAGE_TAG := eb6f9920868599f7e1a8ee9aaedb1921a027f7a0
2016-08-31 13:43:32 +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
check_format:
$(REBAR) fmt -c
format:
$(REBAR) fmt -w
2016-08-31 13:43:32 +00:00
dialyze: submodules
$(REBAR) as dialyze dialyzer
2016-08-31 13:43:32 +00:00
test: submodules
$(REBAR) eunit
2016-08-31 13:43:32 +00:00
$(REBAR) ct
check: lint xref dialyze
2016-08-31 13:43:32 +00:00
clean:
$(REBAR) clean
distclean:
rm -rfv _build