forked from webmachine/webmachine
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Webmachine users are starting to use Erlang/OTP 17.0, which requires changes to webmachine and its meck dependency. Merge the develop branch to master to ensure all changes necessary for 17.0 are available there.
- Loading branch information
Showing
15 changed files
with
131 additions
and
61 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,4 @@ deps/* | |
.eunit/* | ||
ebin/*.app | ||
doc/* | ||
.local_dialyzer_plt |
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
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,11 +1,19 @@ | ||
case erlang:system_info(otp_release) =< "R15B01" of | ||
true -> | ||
HashDefine = [{d,old_hash}], | ||
case lists:keysearch(erl_opts, 1, CONFIG) of | ||
{value, {erl_opts, Opts}} -> | ||
lists:keyreplace(erl_opts,1,CONFIG,{erl_opts,Opts++HashDefine}); | ||
false -> | ||
CONFIG ++ [{erl_opts, HashDefine}] | ||
%% -*- mode: erlang;erlang-indent-level: 4;indent-tabs-mode: nil -*- | ||
%% ex: ft=erlang ts=4 sw=4 et | ||
|
||
case erlang:system_info(otp_release) of | ||
"R"++_=RVersion -> | ||
case RVersion =< "R15B01" of | ||
true -> | ||
HashDefine = [{d,old_hash}], | ||
case lists:keysearch(erl_opts, 1, CONFIG) of | ||
{value, {erl_opts, Opts}} -> | ||
lists:keyreplace(erl_opts,1,CONFIG,{erl_opts,Opts++HashDefine}); | ||
false -> | ||
CONFIG ++ [{erl_opts, HashDefine}] | ||
end; | ||
false -> CONFIG | ||
end; | ||
false -> CONFIG | ||
_ -> | ||
CONFIG | ||
end. |
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
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
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
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
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 |
---|---|---|
@@ -0,0 +1,48 @@ | ||
test: compile | ||
./rebar eunit skip_deps=true | ||
|
||
docs: | ||
./rebar doc skip_deps=true | ||
|
||
xref: compile | ||
./rebar xref skip_deps=true | ||
|
||
PLT ?= $(HOME)/.riak_combo_dialyzer_plt | ||
LOCAL_PLT = .local_dialyzer_plt | ||
DIALYZER_FLAGS ?= -Wunmatched_returns | ||
|
||
${PLT}: compile | ||
ifneq (,$(wildcard $(PLT))) | ||
dialyzer --check_plt --plt $(PLT) --apps $(DIALYZER_APPS) && \ | ||
dialyzer --add_to_plt --plt $(PLT) --output_plt $(PLT) --apps $(DIALYZER_APPS) ; test $$? -ne 1 | ||
else | ||
dialyzer --build_plt --output_plt $(PLT) --apps $(DIALYZER_APPS); test $$? -ne 1 | ||
endif | ||
|
||
${LOCAL_PLT}: compile | ||
ifneq (,$(wildcard deps/*)) | ||
ifneq (,$(wildcard $(LOCAL_PLT))) | ||
dialyzer --check_plt --plt $(LOCAL_PLT) deps/*/ebin && \ | ||
dialyzer --add_to_plt --plt $(LOCAL_PLT) --output_plt $(LOCAL_PLT) deps/*/ebin ; test $$? -ne 1 | ||
else | ||
dialyzer --build_plt --output_plt $(LOCAL_PLT) deps/*/ebin ; test $$? -ne 1 | ||
endif | ||
endif | ||
|
||
dialyzer: ${PLT} ${LOCAL_PLT} | ||
@echo "==> $(shell basename $(shell pwd)) (dialyzer)" | ||
@if [ -f $(LOCAL_PLT) ]; then \ | ||
dialyzer $(DIALYZER_FLAGS) --plts $(PLT) $(LOCAL_PLT) -c ebin; \ | ||
else \ | ||
dialyzer $(DIALYZER_FLAGS) --plts $(PLT) -c ebin; \ | ||
fi | ||
|
||
cleanplt: | ||
@echo | ||
@echo "Are you sure? It takes several minutes to re-build." | ||
@echo Deleting $(PLT) and $(LOCAL_PLT) in 5 seconds. | ||
@echo | ||
sleep 5 | ||
rm $(PLT) | ||
rm $(LOCAL_PLT) | ||
|