mirror of
https://github.com/processone/ejabberd
synced 2025-10-03 09:49:18 +02:00
Merge pull request #4361 from sstrigler/ext_mod-fix-greedy-include-path
Ext mod fix greedy include path cont'd
This commit is contained in:
commit
9c142e5509
2 changed files with 7 additions and 4 deletions
|
@ -152,7 +152,7 @@ unsubscribe(Hook, Host, Module, Function, InitArg) ->
|
||||||
|
|
||||||
|
|
||||||
-spec run(atom(), list()) -> ok.
|
-spec run(atom(), list()) -> ok.
|
||||||
%% @doc Run the calls (and subscibers) of this hook in order, don't care about function results.
|
%% @doc Run the calls (and subscribers) of this hook in order, don't care about function results.
|
||||||
%% If a call returns stop, no more calls are performed.
|
%% If a call returns stop, no more calls are performed.
|
||||||
run(Hook, Args) ->
|
run(Hook, Args) ->
|
||||||
run(Hook, global, Args).
|
run(Hook, global, Args).
|
||||||
|
@ -475,7 +475,7 @@ call_subscriber_list([], _Host, _Hook, _CallbackOrArgs, _Event, Result) ->
|
||||||
lists:reverse(Result);
|
lists:reverse(Result);
|
||||||
call_subscriber_list([{Mod, Func, InitArg} | SubscriberList], Host, Hook, CallbackOrArgs, Event, Result) ->
|
call_subscriber_list([{Mod, Func, InitArg} | SubscriberList], Host, Hook, CallbackOrArgs, Event, Result) ->
|
||||||
SubscriberArgs = [InitArg, Event, Host, Hook, CallbackOrArgs],
|
SubscriberArgs = [InitArg, Event, Host, Hook, CallbackOrArgs],
|
||||||
?DEBUG("Running hook subsciber ~p: ~p:~p/~B with event ~p",
|
?DEBUG("Running hook subscriber ~p: ~p:~p/~B with event ~p",
|
||||||
[Hook, Mod, Func, length(SubscriberArgs), Event]),
|
[Hook, Mod, Func, length(SubscriberArgs), Event]),
|
||||||
try apply(Mod, Func, SubscriberArgs) of
|
try apply(Mod, Func, SubscriberArgs) of
|
||||||
State ->
|
State ->
|
||||||
|
|
|
@ -602,7 +602,10 @@ compile(LibDir, DepsDir) ->
|
||||||
Lib = filename:join(LibDir, "lib"),
|
Lib = filename:join(LibDir, "lib"),
|
||||||
Src = filename:join(LibDir, "src"),
|
Src = filename:join(LibDir, "src"),
|
||||||
Includes = [ {i, Inc} || Inc <- filelib:wildcard(DepsDir++"/**/include") ],
|
Includes = [ {i, Inc} || Inc <- filelib:wildcard(DepsDir++"/**/include") ],
|
||||||
Options = [{outdir, Bin}, {i, LibDir++"/.."} | Includes ++ compile_options()],
|
Options = [ {outdir, Bin},
|
||||||
|
{i, LibDir++"/.."},
|
||||||
|
{i, filename:join(LibDir, "include")}
|
||||||
|
| Includes ++ compile_options()],
|
||||||
?DEBUG("compile options: ~p", [Options]),
|
?DEBUG("compile options: ~p", [Options]),
|
||||||
filelib:ensure_dir(filename:join(Bin, ".")),
|
filelib:ensure_dir(filename:join(Bin, ".")),
|
||||||
[copy(App, filename:join(Bin, filename:basename(App, ".src"))) || App <- filelib:wildcard(Src++"/*.app*")],
|
[copy(App, filename:join(Bin, filename:basename(App, ".src"))) || App <- filelib:wildcard(Src++"/*.app*")],
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue