2012-06-18 15:57:59 +00:00
|
|
|
# See LICENSE for licensing information.
|
|
|
|
|
2020-03-07 15:20:22 +00:00
|
|
|
REBAR ?= $(shell command -v rebar3 >/dev/null 2>&1 && echo "rebar3" || echo "$(CURDIR)/rebar3")
|
2012-06-18 15:57:59 +00:00
|
|
|
|
2015-12-05 23:31:05 +00:00
|
|
|
SRCS := $(wildcard src/* include/* rebar.config)
|
|
|
|
|
|
|
|
.PHONY: all
|
2020-03-07 15:20:22 +00:00
|
|
|
all: escript
|
2015-12-05 23:31:05 +00:00
|
|
|
|
|
|
|
# Clean
|
|
|
|
|
|
|
|
.PHONY: clean
|
2012-06-18 15:57:59 +00:00
|
|
|
clean:
|
2015-12-05 23:31:05 +00:00
|
|
|
$(REBAR) clean
|
2020-03-07 15:20:22 +00:00
|
|
|
|
|
|
|
.PHONY: distclean
|
|
|
|
distclean:
|
|
|
|
$(MAKE) clean
|
|
|
|
$(RM) -r _build
|
2015-12-05 23:31:05 +00:00
|
|
|
$(RM) doc/*.html
|
|
|
|
$(RM) doc/edoc-info
|
|
|
|
$(RM) doc/erlang.png
|
|
|
|
$(RM) doc/stylesheet.css
|
|
|
|
$(RM) -r logs
|
|
|
|
|
2020-05-20 09:19:54 +00:00
|
|
|
.PHONY: clean-tests
|
|
|
|
clean-tests:
|
|
|
|
@ rm -rf _build/test/lib
|
2015-12-05 23:31:05 +00:00
|
|
|
# Docs
|
|
|
|
|
|
|
|
.PHONY: docs
|
|
|
|
docs:
|
2020-03-07 15:20:22 +00:00
|
|
|
$(REBAR) edoc
|
2015-12-05 23:31:05 +00:00
|
|
|
|
|
|
|
# Compile
|
|
|
|
|
|
|
|
ebin/jesse.app: compile
|
|
|
|
|
2020-03-07 15:20:22 +00:00
|
|
|
.PHONY: escript
|
|
|
|
escript: ebin/jesse.app
|
2015-12-06 19:40:49 +00:00
|
|
|
$(REBAR) escriptize
|
2020-03-07 15:20:22 +00:00
|
|
|
./_build/default/bin/jesse --help
|
2015-12-06 19:40:49 +00:00
|
|
|
|
2015-12-05 23:31:05 +00:00
|
|
|
.PHONY: compile
|
|
|
|
compile: $(SRCS)
|
|
|
|
$(REBAR) compile
|
2012-06-18 15:57:59 +00:00
|
|
|
|
|
|
|
# Tests.
|
2020-03-07 15:20:22 +00:00
|
|
|
test/JSON-Schema-Test-Suite/tests:
|
2021-01-06 01:17:05 +00:00
|
|
|
git submodule sync --recursive
|
|
|
|
git submodule update --init --recursive
|
2012-06-18 15:57:59 +00:00
|
|
|
|
2020-03-07 15:37:36 +00:00
|
|
|
# Would be nice to include elvis to test, but it fails on OTP-18
|
2016-03-08 17:03:57 +00:00
|
|
|
.PHONY: test
|
2020-03-07 15:37:36 +00:00
|
|
|
test: eunit ct xref dialyzer cover
|
2012-06-18 15:57:59 +00:00
|
|
|
|
2015-12-05 23:31:05 +00:00
|
|
|
.PHONY: eunit
|
2013-02-05 11:22:48 +00:00
|
|
|
eunit:
|
2020-05-20 09:19:54 +00:00
|
|
|
@ $(MAKE) clean-tests
|
2020-03-07 15:20:22 +00:00
|
|
|
$(REBAR) eunit
|
2012-06-18 15:57:59 +00:00
|
|
|
|
2020-05-20 09:19:54 +00:00
|
|
|
# @ rm -rf _build
|
|
|
|
|
2015-12-05 23:31:05 +00:00
|
|
|
.PHONY: ct
|
2020-03-07 15:20:22 +00:00
|
|
|
ct: test/JSON-Schema-Test-Suite/tests
|
2020-05-20 09:19:54 +00:00
|
|
|
@ $(MAKE) clean-tests
|
2020-03-07 15:20:22 +00:00
|
|
|
$(REBAR) ct
|
2012-06-18 15:57:59 +00:00
|
|
|
|
2016-03-08 17:03:57 +00:00
|
|
|
.PHONY: xref
|
|
|
|
xref:
|
2020-03-07 15:20:22 +00:00
|
|
|
$(REBAR) xref
|
2012-06-18 15:57:59 +00:00
|
|
|
|
2015-12-05 23:31:05 +00:00
|
|
|
.PHONY: dialyzer
|
2020-03-07 15:20:22 +00:00
|
|
|
dialyzer:
|
|
|
|
$(REBAR) dialyzer
|
2015-12-16 14:04:29 +00:00
|
|
|
|
|
|
|
.PHONY: elvis
|
|
|
|
elvis:
|
2020-03-07 16:11:47 +00:00
|
|
|
$(REBAR) as lint lint
|
2020-03-07 15:20:22 +00:00
|
|
|
|
|
|
|
.PHONY: cover
|
|
|
|
cover:
|
2020-05-20 09:19:54 +00:00
|
|
|
@ $(MAKE) clean-tests
|
2020-03-07 15:20:22 +00:00
|
|
|
$(REBAR) cover -v
|