2016-04-14 07:40:33 +00:00
|
|
|
REBAR := $(shell which rebar3 2>/dev/null || which ./rebar3)
|
2016-08-26 15:15:48 +00:00
|
|
|
SUBMODULES = build_utils
|
|
|
|
SUBTARGETS = $(patsubst %,%/.git,$(SUBMODULES))
|
2016-06-26 17:42:40 +00:00
|
|
|
|
2016-08-26 15:15:48 +00:00
|
|
|
UTILS_PATH := build_utils
|
|
|
|
# ToDo: remove unused TEMPLATES_PATH here, when the bug
|
|
|
|
# with handling of the varriable in build_utils is fixed
|
|
|
|
TEMPLATES_PATH := .
|
|
|
|
SERVICE_NAME := woody
|
2018-01-30 09:50:18 +00:00
|
|
|
BUILD_IMAGE_TAG := eee42f2ca018c313190bc350fe47d4dea70b6d27
|
2016-06-26 17:42:40 +00:00
|
|
|
|
2016-08-26 15:15:48 +00:00
|
|
|
CALL_W_CONTAINER := all submodules rebar-update compile xref lint test dialyze clean distclean
|
2016-06-26 17:42:40 +00:00
|
|
|
|
2016-08-26 15:15:48 +00:00
|
|
|
.PHONY: $(CALL_W_CONTAINER)
|
2016-06-26 17:42:40 +00:00
|
|
|
|
2016-08-26 15:15:48 +00:00
|
|
|
all: compile
|
2016-06-26 17:42:40 +00:00
|
|
|
|
2016-08-26 15:15:48 +00:00
|
|
|
-include $(UTILS_PATH)/make_lib/utils_container.mk
|
2016-04-14 07:40:33 +00:00
|
|
|
|
2016-08-26 15:15:48 +00:00
|
|
|
$(SUBTARGETS): %/.git: %
|
|
|
|
git submodule update --init $<
|
|
|
|
touch $@
|
2016-04-14 07:40:33 +00:00
|
|
|
|
2016-08-26 15:15:48 +00:00
|
|
|
submodules: $(SUBTARGETS)
|
2016-04-14 07:40:33 +00:00
|
|
|
|
|
|
|
rebar-update:
|
|
|
|
$(REBAR) update
|
|
|
|
|
2016-08-26 15:15:48 +00:00
|
|
|
compile: submodules rebar-update
|
2016-06-26 17:42:40 +00:00
|
|
|
$(REBAR) compile
|
|
|
|
|
2016-08-26 15:15:48 +00:00
|
|
|
test: submodules
|
2016-04-14 07:40:33 +00:00
|
|
|
$(REBAR) ct
|
|
|
|
|
2016-08-26 15:15:48 +00:00
|
|
|
xref: submodules
|
2016-04-14 07:40:33 +00:00
|
|
|
$(REBAR) xref
|
|
|
|
|
2016-06-26 17:42:40 +00:00
|
|
|
lint: compile
|
|
|
|
elvis rock
|
|
|
|
|
2016-04-14 07:40:33 +00:00
|
|
|
clean:
|
|
|
|
$(REBAR) clean
|
|
|
|
|
|
|
|
distclean:
|
|
|
|
$(REBAR) clean -a
|
|
|
|
rm -rfv _build _builds _cache _steps _temp
|
|
|
|
|
|
|
|
dialyze:
|
|
|
|
$(REBAR) dialyzer
|
2016-06-26 17:42:40 +00:00
|
|
|
|