25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-28 16:34:13 +01:00

Pass {C,CPP,LD}FLAGS used in main ./configure call to invocations from deps

This commit is contained in:
Paweł Chmielowski 2015-10-20 15:22:39 +02:00
parent 7c1e7e5b5f
commit 2d22d6061e
3 changed files with 13 additions and 1 deletions

View File

@ -273,5 +273,8 @@ AC_SUBST(iconv)
AC_SUBST(debug) AC_SUBST(debug)
AC_SUBST(lager) AC_SUBST(lager)
AC_SUBST(tools) AC_SUBST(tools)
AC_SUBST(CFLAGS)
AC_SUBST(CPPFLAGS)
AC_SUBST(LDFLAGS)
AC_OUTPUT AC_OUTPUT

View File

@ -66,10 +66,15 @@ Deps = [{p1_cache_tab, ".*", {git, "https://github.com/processone/cache_tab"}},
{oauth2, ".*", {git, "https://github.com/prefiks/oauth2.git"}}, {oauth2, ".*", {git, "https://github.com/prefiks/oauth2.git"}},
{xmlrpc, ".*", {git, "https://github.com/rds13/xmlrpc.git"}}], {xmlrpc, ".*", {git, "https://github.com/rds13/xmlrpc.git"}}],
CFLags = proplists:get_value(cflags, Cfg, ""),
CPPFLags = proplists:get_value(cppflags, Cfg, ""),
LDFLags = proplists:get_value(ldflags, Cfg, ""),
ConfigureCmd = fun(Pkg, Flags) -> ConfigureCmd = fun(Pkg, Flags) ->
{'get-deps', {'get-deps',
"sh -c 'cd deps/" ++ Pkg ++ "sh -c 'cd deps/" ++ Pkg ++
" && ./configure" ++ Flags ++ "'"} " && CFLAGS=\""++ CFLags ++"\" CPPFLAGS=\""++ CPPFLags ++"\" LDFLAGS=\""++ LDFLags ++"\"" ++
" ./configure" ++ Flags ++ "'"}
end, end,
XMLFlags = lists:foldl( XMLFlags = lists:foldl(

View File

@ -47,6 +47,10 @@
{libdir, "{{release_dir}}/lib"}. {libdir, "{{release_dir}}/lib"}.
{docdir, "{{release_dir}}/doc"}. {docdir, "{{release_dir}}/doc"}.
{ldflags, "@LDFLAGS@"}.
{cflags, "@CFLAGS@"}.
{cppflags, "@CPPFLAGS@"}.
%% Local Variables: %% Local Variables:
%% mode: erlang %% mode: erlang
%% End: %% End: