]> granicus.if.org Git - ejabberd/commitdiff
Use -include_lib instead of -include for esip and p1_xml
authorMatwey V. Kornilov <matwey.kornilov@gmail.com>
Sat, 5 Jul 2014 10:01:29 +0000 (14:01 +0400)
committerMatwey V. Kornilov <matwey.kornilov@gmail.com>
Sat, 5 Jul 2014 13:57:35 +0000 (17:57 +0400)
-include_lib is used in order to find deps. Rebar include magic is not required anymore.
Rebar uses deps as library directory.

include/jlib.hrl
rebar.config.script
src/mod_sip.erl
src/mod_sip_proxy.erl
src/mod_sip_registrar.erl
test/suite.hrl

index 8b749955aae3d7bda3873151757665ca255096b6..a263c1ff25e96f54b26c145c7fe6c24725c924fd 100644 (file)
@@ -19,7 +19,7 @@
 %%%----------------------------------------------------------------------
 
 -include("ns.hrl").
--include("xml.hrl").
+-include_lib("p1_xml/include/xml.hrl").
 
 -define(STANZA_ERROR(Code, Type, Condition),
        #xmlel{name = <<"error">>,
index bf1b510a75480284fd856a493ef80a774fec448c..d6aedf591e3feefacd702f51a0d223f8bfa7c474 100644 (file)
@@ -42,11 +42,6 @@ HiPE = case lists:keysearch(hipe, 1, Cfg) of
                []
        end,
 
-Includes = [{i, "include"},
-           {i, filename:join(["deps", "esip", "include"])},
-           {i, filename:join(["deps", "p1_stun", "include"])},
-            {i, filename:join(["deps", "p1_xml", "include"])}],
-
 SrcDirs = lists:foldl(
             fun({tools, true}, Acc) ->
                     [tools|Acc];
@@ -121,13 +116,12 @@ CfgPostHooks = lists:flatmap(
 
 {ok, Cwd} = file:get_cwd(),
 
-Config = [{erl_opts, Includes ++ Macros ++ HiPE ++ DebugInfo ++
+Config = [{erl_opts, Macros ++ HiPE ++ DebugInfo ++
                [{src_dirs, [asn1, src | SrcDirs]}]},
           {sub_dirs, ["rel"]},
           {keep_build_info, true},
           {ct_extra_params, "-include "
-           ++ filename:join([Cwd, "tools"]) ++ " "
-           ++ filename:join([Cwd, "deps", "p1_xml", "include"])},
+           ++ filename:join([Cwd, "tools"])},
           {post_hooks, PostHooks ++ CfgPostHooks},
           {deps, Deps ++ CfgDeps}],
 %%io:format("ejabberd configuration:~n  ~p~n", [Config]),
index fd36fb5ac18b9b2a33c58ac369f19840e273ac8e..8fb32f773fb4b15b595623b31c64a3a112238c65 100644 (file)
@@ -20,7 +20,7 @@
 
 -include("ejabberd.hrl").
 -include("logger.hrl").
--include("esip.hrl").
+-include_lib("esip/include/esip.hrl").
 
 %%%===================================================================
 %%% API
index de5760fef40be581234693466b741c33f2617781..b08a8d929e1ab74b3bb139204138e2da0f867406 100644 (file)
@@ -21,7 +21,7 @@
 
 -include("ejabberd.hrl").
 -include("logger.hrl").
--include("esip.hrl").
+-include_lib("esip/include/esip.hrl").
 
 -define(SIGN_LIFETIME, 300). %% in seconds.
 
index 8662ed74c151cbdada7741dd350cea54aeb3e00b..4a17d2468843ac2ab9e489958bd855027458e192 100644 (file)
@@ -20,7 +20,7 @@
 
 -include("ejabberd.hrl").
 -include("logger.hrl").
--include("esip.hrl").
+-include_lib("esip/include/esip.hrl").
 
 -define(CALL_TIMEOUT, timer:seconds(30)).
 -define(DEFAULT_EXPIRES, 3600).
index 737098315f6224d550e474071ed46225386323d9..2c3610268c2bb54b660cdea99f90bf53b96b9036 100644 (file)
@@ -1,5 +1,5 @@
 -include_lib("common_test/include/ct.hrl").
--include("xml.hrl").
+-include_lib("p1_xml/include/xml.hrl").
 -include("ns.hrl").
 -include("ejabberd.hrl").
 -include("mod_proxy65.hrl").