mirror of
https://github.com/valitydev/machinery-erlang.git
synced 2024-11-06 08:45:19 +00:00
49 lines
811 B
Makefile
49 lines
811 B
Makefile
|
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
|
||
|
BUILD_IMAGE_TAG := eee42f2ca018c313190bc350fe47d4dea70b6d27
|
||
|
|
||
|
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
|