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
|
2019-04-04 08:24:24 +00:00
|
|
|
BUILD_IMAGE_TAG := f3732d29a5e622aabf80542b5138b3631a726adb
|
2018-05-30 14:45:42 +00:00
|
|
|
|
|
|
|
CALL_ANYWHERE := all submodules compile xref lint dialyze clean distclean
|
|
|
|
|
|
|
|
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:
|
|
|
|
elvis rock
|
|
|
|
|
|
|
|
dialyze: submodules
|
|
|
|
$(REBAR) dialyzer
|
|
|
|
|
|
|
|
clean:
|
|
|
|
$(REBAR) clean
|
|
|
|
|
|
|
|
distclean:
|
|
|
|
$(REBAR) clean -a
|
|
|
|
rm -rf _build
|
|
|
|
|
|
|
|
test: submodules
|
|
|
|
$(REBAR) ct
|