2019-04-17 09:50:51 +00:00
|
|
|
REBAR := $(shell which rebar3 2>/dev/null || which ./rebar3)
|
|
|
|
SUBMODULES = build_utils
|
|
|
|
SUBTARGETS = $(patsubst %,%/.git,$(SUBMODULES))
|
|
|
|
|
|
|
|
SERVICE_NAME = dev
|
|
|
|
UTILS_PATH := build_utils
|
|
|
|
TEMPLATES_PATH = .
|
|
|
|
|
2020-11-26 09:36:00 +00:00
|
|
|
BUILD_IMAGE_NAME := build-erlang
|
2021-08-20 10:47:14 +00:00
|
|
|
BUILD_IMAGE_TAG := aaa79c2d6b597f93f5f8b724eecfc31ec2e2a23b
|
2019-04-17 09:50:51 +00:00
|
|
|
|
2020-10-13 18:25:12 +00:00
|
|
|
CALL_ANYWHERE := all submodules rebar-update compile lint xref dialyze \
|
|
|
|
test clean distclean check_format format
|
2019-04-17 09:50:51 +00:00
|
|
|
|
|
|
|
CALL_W_CONTAINER := $(CALL_ANYWHERE)
|
|
|
|
|
|
|
|
.PHONY: $(CALL_W_CONTAINER)
|
|
|
|
|
|
|
|
all: compile
|
|
|
|
|
|
|
|
-include $(UTILS_PATH)/make_lib/utils_container.mk
|
|
|
|
|
|
|
|
$(SUBTARGETS): %/.git: %
|
|
|
|
git submodule update --init $<
|
|
|
|
touch $@
|
|
|
|
|
|
|
|
submodules: $(SUBTARGETS)
|
|
|
|
|
|
|
|
compile: submodules rebar-update
|
|
|
|
$(REBAR) compile
|
|
|
|
|
|
|
|
rebar-update:
|
|
|
|
$(REBAR) update
|
|
|
|
|
|
|
|
test: submodules
|
|
|
|
$(REBAR) eunit
|
|
|
|
|
|
|
|
xref: submodules
|
|
|
|
$(REBAR) xref
|
|
|
|
|
2019-04-24 13:39:27 +00:00
|
|
|
dialyze: submodules
|
|
|
|
$(REBAR) dialyzer
|
|
|
|
|
2019-04-17 09:50:51 +00:00
|
|
|
clean:
|
|
|
|
$(REBAR) clean
|
|
|
|
|
|
|
|
distclean:
|
|
|
|
$(REBAR) clean -a
|
|
|
|
rm -rfv _build
|
|
|
|
|
|
|
|
lint:
|
2021-08-20 10:50:41 +00:00
|
|
|
$(REBAR) lint
|
2019-04-17 09:50:51 +00:00
|
|
|
|
2020-10-13 18:25:12 +00:00
|
|
|
check_format:
|
|
|
|
$(REBAR) as test fmt -c
|
|
|
|
|
|
|
|
format:
|
|
|
|
$(REBAR) fmt -w
|