25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-22 16:20:52 +01:00

Add xref Makefile target.

Conflicts:
	rebar.config.script
This commit is contained in:
Jerome Sautret 2014-08-26 16:12:57 +02:00
parent 56dab7ddbe
commit fad0d867fc
2 changed files with 34 additions and 0 deletions

View File

@ -88,6 +88,10 @@ update:
rm -rf deps/.built rm -rf deps/.built
$(REBAR) update-deps && :> deps/.got $(REBAR) update-deps && :> deps/.got
xref: all
$(REBAR) skip_deps=true xref
translations: translations:
contrib/extract_translations/prepare-translation.sh -updateall contrib/extract_translations/prepare-translation.sh -updateall

View File

@ -116,6 +116,30 @@ CfgPostHooks = lists:flatmap(
[] []
end, Cfg), end, Cfg),
CfgXrefs = lists:flatmap(
fun({mysql, false}) ->
["(\".*mysql.*\":_/_)"];
({pgsql, false}) ->
["(\".*pgsql.*\":_/_)"];
({pam, false}) ->
["(\"epam\":_/_)"];
({riak, false}) ->
["(\"riak.*\":_/_)"];
({json, false}) ->
["(\"jiffy\":_/_)"];
({p1db, false}) ->
["(\"p1db.*\":_/_)"];
({zlib, false}) ->
["(\"ezlib\":_/_)"];
({http, false}) ->
["(\"lhttpc\":_/_)"];
({iconv, false}) ->
["(\"iconv\":_/_)"];
(_) ->
[]
end, Cfg),
{ok, Cwd} = file:get_cwd(), {ok, Cwd} = file:get_cwd(),
Config = [{erl_opts, Macros ++ HiPE ++ DebugInfo ++ Config = [{erl_opts, Macros ++ HiPE ++ DebugInfo ++
@ -124,6 +148,12 @@ Config = [{erl_opts, Macros ++ HiPE ++ DebugInfo ++
{keep_build_info, true}, {keep_build_info, true},
{ct_extra_params, "-include " {ct_extra_params, "-include "
++ filename:join([Cwd, "tools"])}, ++ filename:join([Cwd, "tools"])},
{xref_warnings, false},
{xref_checks, []},
{xref_queries,
[{"(XC - UC) || (XU - X - B - "
++ string:join(["(\"gen_transport\":_/_) - (\"eprof\":_/_)"]
++ CfgXrefs, " - ") ++ ")", []}]},
{post_hooks, PostHooks ++ CfgPostHooks}, {post_hooks, PostHooks ++ CfgPostHooks},
{deps, Deps ++ CfgDeps}], {deps, Deps ++ CfgDeps}],
%%io:format("ejabberd configuration:~n ~p~n", [Config]), %%io:format("ejabberd configuration:~n ~p~n", [Config]),