2018-05-30 14:45:42 +00:00
|
|
|
REBAR := $(shell which rebar3 2>/dev/null || which ./rebar3)
|
|
|
|
|
|
|
|
UTILS_PATH := build_utils
|
|
|
|
TEMPLATES_PATH := .
|
|
|
|
|
|
|
|
SUBMODULES = $(UTILS_PATH)
|
|
|
|
SUBTARGETS = $(patsubst %,%/.git,$(SUBMODULES))
|
|
|
|
|
|
|
|
SERVICE_NAME := machinery
|
2020-12-28 18:20:16 +00:00
|
|
|
BASE_IMAGE_NAME := service-erlang
|
2021-02-05 12:37:36 +00:00
|
|
|
BASE_IMAGE_TAG := 51bd5f25d00cbf75616e2d672601dfe7351dcaa4
|
2020-12-28 18:20:16 +00:00
|
|
|
BUILD_IMAGE_NAME := build-erlang
|
2021-02-05 12:37:36 +00:00
|
|
|
BUILD_IMAGE_TAG := 61a001bbb48128895735a3ac35b0858484fdb2eb
|
2018-05-30 14:45:42 +00:00
|
|
|
|
2020-10-14 09:23:52 +00:00
|
|
|
CALL_ANYWHERE := all submodules compile xref lint dialyze clean distclean check_format format
|
2018-05-30 14:45:42 +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)
|
|
|
|
|
|
|
|
compile: submodules
|
|
|
|
$(REBAR) compile
|
|
|
|
|
|
|
|
xref: submodules
|
|
|
|
$(REBAR) xref
|
|
|
|
|
|
|
|
lint:
|
2021-02-05 12:37:36 +00:00
|
|
|
elvis rock -V
|
2018-05-30 14:45:42 +00:00
|
|
|
|
2020-10-14 09:23:52 +00:00
|
|
|
check_format:
|
|
|
|
$(REBAR) as test fmt -c
|
|
|
|
|
|
|
|
format:
|
|
|
|
$(REBAR) fmt -w
|
|
|
|
|
2018-05-30 14:45:42 +00:00
|
|
|
dialyze: submodules
|
2021-02-05 12:37:36 +00:00
|
|
|
$(REBAR) as test dialyzer
|
2018-05-30 14:45:42 +00:00
|
|
|
|
|
|
|
clean:
|
|
|
|
$(REBAR) clean
|
|
|
|
|
|
|
|
distclean:
|
|
|
|
$(REBAR) clean -a
|
|
|
|
rm -rf _build
|
|
|
|
|
|
|
|
test: submodules
|
|
|
|
$(REBAR) ct
|