diff options
-rw-r--r-- | Makefile.in | 4 | ||||
-rw-r--r-- | configure.ac | 9 | ||||
-rw-r--r-- | rebar.config.script | 6 | ||||
-rw-r--r-- | vars.config.in | 1 |
4 files changed, 16 insertions, 4 deletions
diff --git a/Makefile.in b/Makefile.in index a0b4553dc..56429d68f 100644 --- a/Makefile.in +++ b/Makefile.in @@ -125,11 +125,11 @@ ifeq ($(MAKECMDGOALS),copy-files-sub) DEPS:=$(sort $(shell $(REBAR) list-deps|$(SED) -e '/^=/d;s/ .*//')) -DEPS_FILES=$(call FILES_WILDCARD,$(foreach DEP,$(DEPS),deps/$(DEP)/ebin/*.beam deps/$(DEP)/ebin/*.app deps/$(DEP)/priv/* deps/$(DEP)/priv/lib/* deps/$(DEP)/priv/bin/* deps/$(DEP)/include/*.hrl deps/$(DEP)/lib/*/ebin/*.beam deps/$(DEP)/lib/*/ebin/*.app)) +DEPS_FILES=$(call FILES_WILDCARD,$(foreach DEP,$(DEPS),deps/$(DEP)/ebin/*.beam deps/$(DEP)/ebin/*.app deps/$(DEP)/priv/* deps/$(DEP)/priv/lib/* deps/$(DEP)/priv/bin/* deps/$(DEP)/include/*.hrl deps/$(DEP)/COPY* deps/$(DEP)/LICENSE* deps/$(DEP)/lib/*/ebin/*.beam deps/$(DEP)/lib/*/ebin/*.app)) DEPS_FILES_FILTERED=$(filter-out %/epam deps/elixir/ebin/elixir.app,$(DEPS_FILES)) DEPS_DIRS=$(sort deps/ $(foreach DEP,$(DEPS),deps/$(DEP)/) $(dir $(DEPS_FILES))) -MAIN_FILES=$(filter-out %/configure.beam,$(call FILES_WILDCARD,ebin/*.beam ebin/*.app priv/msgs/*.msg priv/lib/* include/*.hrl)) +MAIN_FILES=$(filter-out %/configure.beam,$(call FILES_WILDCARD,ebin/*.beam ebin/*.app priv/msgs/*.msg priv/lib/* include/*.hrl COPYING)) MAIN_DIRS=$(sort $(dir $(MAIN_FILES)) priv/bin priv/sql) define DEP_VERSION_template diff --git a/configure.ac b/configure.ac index aa92cf38e..884db5d4e 100644 --- a/configure.ac +++ b/configure.ac @@ -212,6 +212,14 @@ AC_ARG_ENABLE(latest_deps, *) AC_MSG_ERROR(bad value ${enableval} for --enable-latest-deps) ;; esac],[if test "x$latest_deps" = "x"; then latest_deps=false; fi]) +AC_ARG_ENABLE(system_deps, +[AC_HELP_STRING([--enable-system-deps], [makes rebar use localy installed dependences instead of downloading them (default: no)])], +[case "${enableval}" in + yes) system_deps=true ;; + no) system_deps=false ;; + *) AC_MSG_ERROR(bad value ${enableval} for --enable-system-deps) ;; +esac],[if test "x$system_deps" = "x"; then system_deps=false; fi]) + AC_ARG_ENABLE(stun, [AC_HELP_STRING([--enable-stun], [enable STUN/TURN support (default: no)])], [case "${enableval}" in @@ -274,6 +282,7 @@ AC_SUBST(sip) AC_SUBST(debug) AC_SUBST(tools) AC_SUBST(latest_deps) +AC_SUBST(system_deps) AC_SUBST(CFLAGS) AC_SUBST(CPPFLAGS) AC_SUBST(LDFLAGS) diff --git a/rebar.config.script b/rebar.config.script index d2ee31213..8cef5791a 100644 --- a/rebar.config.script +++ b/rebar.config.script @@ -23,10 +23,12 @@ Vars = case file:consult(filename:join([filename:dirname(SCRIPT),"vars.config"]) Terms; _Err -> [] - end ++ [{cflags, "-g -O2 -Wall"}, {cppflags, "-g -O2 -Wall"}, {ldflags, ""}], + end ++ [{cflags, "-g -O2 -Wall"}, {cppflags, "-g -O2 -Wall"}, + {ldflags, ""}, {system_deps, false}], {cflags, CFlags} = lists:keyfind(cflags, 1, Vars), {cppflags, CPPFlags} = lists:keyfind(cppflags, 1, Vars), {ldflags, LDFlags} = lists:keyfind(ldflags, 1, Vars), +{system_deps, SystemDeps} = lists:keyfind(system_deps, 1, Vars), GetCfg0 = fun(F, Cfg, [Key | Tail], Default) -> Val = case lists:keyfind(Key, 1, Cfg) of @@ -336,7 +338,7 @@ Rules = [ ProcessFloatingDeps, [], []}, {[deps], IsRebar3, Rebar3DepsFilter, []}, - {[deps], os:getenv("USE_GLOBAL_DEPS") /= false, + {[deps], SystemDeps /= false, GlobalDepsFilter, []} ], diff --git a/vars.config.in b/vars.config.in index 94584dad4..469711182 100644 --- a/vars.config.in +++ b/vars.config.in @@ -60,6 +60,7 @@ {docdir, "{{release_dir}}/doc"}. {latest_deps, @latest_deps@}. +{system_deps, @system_deps@}. {ldflags, "@LDFLAGS@"}. {cflags, "@CFLAGS@"}. |