-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
check Erlang 18 compatibility
- Loading branch information
Showing
3 changed files
with
38 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,48 @@ | ||
ERL=erl | ||
REBAR=./rebar | ||
GIT = git | ||
REBAR_VER = 2.5.1 | ||
REBAR_VER = 2.6.0 | ||
|
||
.PHONY: get-deps | ||
|
||
all: compile | ||
|
||
compile: | ||
@$(REBAR) get-deps | ||
@$(REBAR) compile | ||
|
||
clean: | ||
@$(REBAR) clean | ||
|
||
rebar_src: | ||
@rm -rf $(PWD)/rebar_src | ||
@$(GIT) clone git://github.com/rebar/rebar.git rebar_src | ||
@$(GIT) -C rebar_src checkout tags/$(REBAR_VER) | ||
@cd $(PWD)/rebar_src/; ./bootstrap | ||
@cp $(PWD)/rebar_src/rebar $(PWD) | ||
@rm -rf $(PWD)/rebar_src | ||
|
||
get-deps: | ||
@$(REBAR) get-deps | ||
|
||
## dialyzer | ||
PLT_FILE = ~/boss_db.plt | ||
PLT_APPS ?= kernel stdlib erts deps/* | ||
DIALYZER_OPTS ?= -Werror_handling -Wrace_conditions -Wunmatched_returns \ | ||
-Wunderspecs --verbose --fullpath -n | ||
|
||
.PHONY: dialyze | ||
dialyze: all | ||
@[ -f $(PLT_FILE) ] || $(MAKE) plt | ||
@dialyzer --plt $(PLT_FILE) $(DIALYZER_OPTS) ebin || [ $$? -eq 2 ]; | ||
|
||
## In case you are missing a plt file for dialyzer, | ||
## you can run/adapt this command | ||
.PHONY: plt | ||
plt: | ||
@echo "Building PLT, may take a few minutes" | ||
@dialyzer --build_plt --output_plt $(PLT_FILE) --apps \ | ||
$(PLT_APPS) || [ $$? -eq 2 ]; | ||
|
||
clean: | ||
@$(REBAR) clean | ||
rm -fv erl_crash.dump | ||
rm -f $(PLT_FILE) | ||
|
This file was deleted.
Oops, something went wrong.