This is an automated email from the ASF dual-hosted git repository.
jking pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/thrift.git
The following commit(s) were added to refs/heads/master by this push:
new 4ffe763 THRIFT-4583: Switch to rebar3 Client: erl
4ffe763 is described below
commit 4ffe76351eac93fa2f2632241544e10e80b2b11e
Author: Sergey Yelin <[email protected]>
AuthorDate: Thu Apr 18 17:27:46 2019 +0300
THRIFT-4583: Switch to rebar3
Client: erl
---
.gitignore | 5 ++++-
configure.ac | 2 +-
lib/erl/Makefile.am | 10 +++-------
lib/erl/rebar.config | 2 ++
lib/erl/rebar.test.config | 5 -----
5 files changed, 10 insertions(+), 14 deletions(-)
diff --git a/.gitignore b/.gitignore
index 135b085..fb7651e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -211,15 +211,18 @@ project.lock.json
/lib/delphi/**/*.2007
/lib/delphi/**/*.dproj
/lib/delphi/**/codegen/*.bat
+/lib/erl/_build/
/lib/erl/.eunit
/lib/erl/.generated
/lib/erl/.rebar/
-/lib/erl/deps/
+/lib/erl/_build/
/lib/erl/ebin
+/lib/erl/rebar.lock
/lib/erl/src/thrift.app.src
/lib/erl/test/*.beam
/lib/erl/test/*.hrl
/lib/erl/test/Thrift_omit_without.thrift
+/lib/erl/rebar.lock
/lib/haxe/test/bin
/lib/haxe/test/data.tmp
/lib/hs/dist
diff --git a/configure.ac b/configure.ac
index 5f25a5c..391cdb3 100755
--- a/configure.ac
+++ b/configure.ac
@@ -250,7 +250,7 @@ AX_THRIFT_LIB(erlang, [Erlang], yes)
if test "$with_erlang" = "yes"; then
AC_ERLANG_PATH_ERL
AC_ERLANG_PATH_ERLC
- AC_PATH_PROG([REBAR], [rebar])
+ AC_PATH_PROG([REBAR], [rebar3])
if test -n "$ERLC" ; then
AC_ERLANG_SUBST_LIB_DIR
# Install into the detected Erlang directory instead of $libdir/erlang/lib
diff --git a/lib/erl/Makefile.am b/lib/erl/Makefile.am
index fdfc9eb..d4544a3 100644
--- a/lib/erl/Makefile.am
+++ b/lib/erl/Makefile.am
@@ -49,13 +49,10 @@ $(THRIFT_OMIT_FILE): test/Thrift_omit_with.thrift
touch .generated
all: .generated
- $(REBAR) get-deps
$(REBAR) compile
check: .generated
- $(REBAR) -C rebar.test.config get-deps
- $(REBAR) -C rebar.test.config compile
- $(REBAR) -C rebar.test.config skip_deps=true eunit
+ $(REBAR) eunit
install: all
mkdir -p $(DESTDIR)$(ERLANG_INSTALL_LIB_DIR_thrift) ; \
@@ -73,7 +70,7 @@ clean-local:
$(REBAR) clean
$(RM) .generated
$(RM) -r .rebar/
- $(RM) -r deps/
+ $(RM) -r _build/
$(RM) -r test/gen-erl/
$(RM) $(THRIFT_OMIT_FILE)
@@ -83,7 +80,7 @@ maintainer-clean-local:
dist-hook:
$(RM) $(distdir)/.generated
$(RM) -r $(distdir)/.rebar/
- $(RM) -r $(distdir)/deps/
+ $(RM) -r $(distdir)/_build/
$(RM) -r $(distdir)/ebin/
$(RM) -r $(distdir)/test/gen-erl/
$(RM) $(distdir)/$(THRIFT_OMIT_FILE)
@@ -94,7 +91,6 @@ EXTRA_DIST = \
coding_standards.md \
rebar.config \
rebar.config.script \
- rebar.test.config \
test \
README.md
diff --git a/lib/erl/rebar.config b/lib/erl/rebar.config
index 1ea18a4..1b32947 100644
--- a/lib/erl/rebar.config
+++ b/lib/erl/rebar.config
@@ -1 +1,3 @@
{erl_opts, [{platform_define, "^R.*", otp16_or_less}, debug_info]}.
+
+{profiles, [{test, [{deps, [meck]}]}]}.
diff --git a/lib/erl/rebar.test.config b/lib/erl/rebar.test.config
deleted file mode 100644
index 2ff2afb..0000000
--- a/lib/erl/rebar.test.config
+++ /dev/null
@@ -1,5 +0,0 @@
-{erl_opts, [{platform_define, "^R.*", otp16_or_less}, debug_info]}.
-
-{deps, [
- {meck, "", {git, "https://github.com/eproxus/meck.git", {tag, "0.8.9"}}}
-]}.