]> granicus.if.org Git - ejabberd/commitdiff
Add xref Makefile target.
authorJerome Sautret <jerome.sautret@process-one.net>
Tue, 26 Aug 2014 14:12:57 +0000 (16:12 +0200)
committerJerome Sautret <jerome.sautret@process-one.net>
Thu, 30 Oct 2014 14:21:25 +0000 (15:21 +0100)
Conflicts:
rebar.config.script

Makefile.in
rebar.config.script

index 525879854909c7bbc83970b0848fab9d533dd147..4f3e1bc9f8af41f8b15af8e26a184e787fece133 100644 (file)
@@ -88,6 +88,10 @@ update:
        rm -rf deps/.built
        $(REBAR) update-deps && :> deps/.got
 
+xref: all
+       $(REBAR) skip_deps=true xref
+
+
 translations:
        contrib/extract_translations/prepare-translation.sh -updateall
 
index 4e2d347ff66111d4924356d2a59f284ed8c9d961..0082ad1863e175fa82f77dc47caf6fbce7aece31 100644 (file)
@@ -116,6 +116,30 @@ CfgPostHooks = lists:flatmap(
                          []
                  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(),
 
 Config = [{erl_opts, Macros ++ HiPE ++ DebugInfo ++
@@ -124,6 +148,12 @@ Config = [{erl_opts, Macros ++ HiPE ++ DebugInfo ++
           {keep_build_info, true},
           {ct_extra_params, "-include "
            ++ 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},
           {deps, Deps ++ CfgDeps}],
 %%io:format("ejabberd configuration:~n  ~p~n", [Config]),