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
|
2016-06-26 17:42:40 +00:00
|
|
|
|
2021-01-15 12:35:41 +00:00
|
|
|
BUILD_IMAGE_NAME := build-erlang
|
|
|
|
BUILD_IMAGE_TAG := c60896ef07d41e7ae2e5f9b6ce845a60ad79acc7
|
|
|
|
|
|
|
|
CALL_W_CONTAINER := all submodules compile xref lint test bench dialyze clean distclean \
|
|
|
|
check_format format
|
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
|
|
|
|
2019-12-31 09:52:56 +00:00
|
|
|
compile: submodules
|
2016-06-26 17:42:40 +00:00
|
|
|
$(REBAR) compile
|
|
|
|
|
2016-08-26 15:15:48 +00:00
|
|
|
test: submodules
|
2019-03-28 10:37:37 +00:00
|
|
|
$(REBAR) eunit
|
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
|
|
|
|
|
2021-01-15 12:35:41 +00:00
|
|
|
check_format:
|
|
|
|
$(REBAR) fmt -c
|
|
|
|
|
|
|
|
format:
|
|
|
|
$(REBAR) fmt -w
|
|
|
|
|
2016-04-14 07:40:33 +00:00
|
|
|
clean:
|
|
|
|
$(REBAR) clean
|
2019-06-20 15:00:29 +00:00
|
|
|
$(REBAR) as test clean
|
|
|
|
$(REBAR) as prod clean
|
2016-04-14 07:40:33 +00:00
|
|
|
|
|
|
|
distclean:
|
|
|
|
$(REBAR) clean -a
|
2019-06-20 15:00:29 +00:00
|
|
|
$(REBAR) as test clean -a
|
|
|
|
$(REBAR) as prod clean -a
|
2016-04-14 07:40:33 +00:00
|
|
|
rm -rfv _build _builds _cache _steps _temp
|
|
|
|
|
|
|
|
dialyze:
|
2019-07-05 13:31:58 +00:00
|
|
|
$(REBAR) as test dialyzer
|
2016-06-26 17:42:40 +00:00
|
|
|
|
2019-12-11 16:07:16 +00:00
|
|
|
bench:
|
2019-12-31 09:52:56 +00:00
|
|
|
$(REBAR) as test bench -m bench_woody_event_handler -n 1000
|
|
|
|
$(REBAR) as test bench -m bench_woody_formatter -n 10
|
|
|
|
erl -pa _build/test/lib/*/ebin _build/test/lib/woody/test -noshell \
|
|
|
|
-s benchmark_memory_pressure run \
|
|
|
|
-s erlang halt
|