mirror of
https://github.com/processone/ejabberd
synced 2025-10-03 01:39:35 +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.
|
||||
%% @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.
|
||||
run(Hook, Args) ->
|
||||
run(Hook, global, Args).
|
||||
|
@ -475,7 +475,7 @@ call_subscriber_list([], _Host, _Hook, _CallbackOrArgs, _Event, Result) ->
|
|||
lists:reverse(Result);
|
||||
call_subscriber_list([{Mod, Func, InitArg} | SubscriberList], Host, Hook, CallbackOrArgs, Event, Result) ->
|
||||
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]),
|
||||
try apply(Mod, Func, SubscriberArgs) of
|
||||
State ->
|
||||
|
|
|
@ -602,7 +602,10 @@ compile(LibDir, DepsDir) ->
|
|||
Lib = filename:join(LibDir, "lib"),
|
||||
Src = filename:join(LibDir, "src"),
|
||||
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]),
|
||||
filelib:ensure_dir(filename:join(Bin, ".")),
|
||||
[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