From 48909bdbee89958c4a90c521b873c9dbd79d48a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Chmielowski?= Date: Fri, 18 Dec 2015 17:20:18 +0100 Subject: [PATCH] Add --enable-latest-deps to configure This option make 'rebar get-deps' command to always fetch latest versions of deps that are developed together with ejabberd instead of using frozen commit/branch/tag. --- configure.ac | 9 +++++++++ rebar.config | 16 ++++++++++++++++ vars.config.in | 2 ++ 3 files changed, 27 insertions(+) diff --git a/configure.ac b/configure.ac index 13b1fe13b..f8a415088 100644 --- a/configure.ac +++ b/configure.ac @@ -211,6 +211,14 @@ AC_ARG_ENABLE(lager, *) AC_MSG_ERROR(bad value ${enableval} for --enable-lager) ;; esac],[if test "x$lager" = "x"; then lager=true; fi]) +AC_ARG_ENABLE(latest_deps, +[AC_HELP_STRING([--enable-latest-deps], [makes rebar use latest commits for dependences instead of tagged versions (default: no)])], +[case "${enableval}" in + yes) latest_deps=true ;; + no) latest_deps=false ;; + *) AC_MSG_ERROR(bad value ${enableval} for --enable-latest-deps) ;; +esac],[if test "x$latest_deps" = "x"; then latest_deps=false; fi]) + AC_CONFIG_FILES([Makefile vars.config src/ejabberd.app.src]) @@ -255,6 +263,7 @@ AC_SUBST(iconv) AC_SUBST(debug) AC_SUBST(lager) AC_SUBST(tools) +AC_SUBST(latest_deps) AC_SUBST(CFLAGS) AC_SUBST(CPPFLAGS) AC_SUBST(LDFLAGS) diff --git a/rebar.config b/rebar.config index 039d0bf2f..62b44d13a 100644 --- a/rebar.config +++ b/rebar.config @@ -32,6 +32,22 @@ {if_var_true, tools, {meck, "0.8.2", {git, "https://github.com/eproxus/meck", {tag, "0.8.2"}}}}, {if_var_true, redis, {eredis, ".*", {git, "git://github.com/wooga/eredis"}}}]}. +{if_var_true, latest_deps, + {floating_deps, [p1_logger, + cache_tab, + p1_tls, + p1_stringprep, + p1_xml, + esip, + p1_stun, + p1_yaml, + p1_utils, + p1_mysql, + p1_pgsql, + p1_pam, + p1_zlib, + p1_iconv]}}. + {erl_opts, [nowarn_deprecated_function, {if_var_true, roster_gateway_workaround, {d, 'ROSTER_GATWAY_WORKAROUND'}}, {if_var_match, db_type, mssql, {d, 'mssql'}}, diff --git a/vars.config.in b/vars.config.in index 313e40b8d..fceff7d67 100644 --- a/vars.config.in +++ b/vars.config.in @@ -45,6 +45,8 @@ {libdir, "{{release_dir}}/lib"}. {docdir, "{{release_dir}}/doc"}. +{latest_deps, @latest_deps@}. + {ldflags, "@LDFLAGS@"}. {cflags, "@CFLAGS@"}. {cppflags, "@CPPFLAGS@"}.