summaryrefslogtreecommitdiff
path: root/Makefile.in
diff options
context:
space:
mode:
authorBadlop <badlop@process-one.net>2021-07-15 21:31:31 +0200
committerBadlop <badlop@process-one.net>2021-07-16 13:36:23 +0200
commit4c5641a6489d0669b4220b5ac759a4e1271af3b5 (patch)
tree68c9ad490d62d32684c6d37481cada56f67faabc /Makefile.in
parentUpdate setup-dev.sh to work perfectly both with rebar3 and mix (diff)
Add support for mix to: ./configure --enable-rebar=mix
Diffstat (limited to 'Makefile.in')
-rw-r--r--Makefile.in44
1 files changed, 35 insertions, 9 deletions
diff --git a/Makefile.in b/Makefile.in
index 0079a805..c39195ac 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -1,4 +1,5 @@
REBAR = @ESCRIPT@ @rebar@
+MIX = @rebar@
INSTALL = @INSTALL@
SED = @SED@
ERL = @ERL@
@@ -97,17 +98,38 @@ ifneq ($(INSTALLGROUP),)
G_USER=-g $(INSTALLGROUP)
endif
-IS_REBAR3:=$(shell expr `$(REBAR) --version | awk -F '[ .]' '/rebar / {print $$2}'` '>=' 3)
+ifeq "$(MIX)" "mix"
+IS_REBAR:=6
+else
+IS_REBAR:=$(shell expr `$(REBAR) --version | awk -F '[ .]' '/rebar / {print $$2}'`)
+endif
-ifeq "$(IS_REBAR3)" "1"
+ifeq "$(IS_REBAR)" "6"
+ REBAR=$(MIX)
+ SKIPDEPS=
+ LISTDEPS=deps.tree
+ UPDATEDEPS=deps.update
+ DEPSPATTERN="s/.*─ \([a-z0-9_]*\) .*/\1/p;"
+ DEPSBASE=_build
+ DEPSDIR=$(DEPSBASE)/dev/lib
+ GET_DEPS= deps.get
+ CONFIGURE_DEPS=
+ EBINDIR=$(DEPSDIR)/ejabberd/ebin
+ REBARREL=MIX_ENV=prod $(REBAR) release --overwrite
+ REBARDEV=MIX_ENV=dev $(REBAR) release --overwrite
+else
+ifeq "$(IS_REBAR)" "3"
SKIPDEPS=
LISTDEPS=tree
UPDATEDEPS=upgrade
DEPSPATTERN="s/ (.*//; /^ / s/.* \([a-z0-9_]*\).*/\1/p;"
DEPSBASE=_build
DEPSDIR=$(DEPSBASE)/default/lib
+ GET_DEPS= get-deps
+ CONFIGURE_DEPS=$(REBAR) configure-deps
EBINDIR=$(DEPSDIR)/ejabberd/ebin
- REBARREL=as prod tar
+ REBARREL=$(REBAR) as prod tar
+ REBARDEV=REBAR_PROFILE=dev $(REBAR) release
else
SKIPDEPS=skip_deps=true
LISTDEPS=-q list-deps
@@ -115,8 +137,12 @@ else
DEPSPATTERN="/ TAG / s/ .*// p; / REV / s/ .*// p; / BRANCH / s/ .*// p;"
DEPSBASE=deps
DEPSDIR=$(DEPSBASE)
+ GET_DEPS= get-deps
+ CONFIGURE_DEPS=$(REBAR) configure-deps
EBINDIR=ebin
- REBARREL=generate
+ REBARREL=$(REBAR) generate
+ REBARDEV=
+endif
endif
all: deps src
@@ -127,10 +153,10 @@ $(DEPSDIR)/.got:
rm -rf $(DEPSDIR)/.got
rm -rf $(DEPSDIR)/.built
mkdir -p $(DEPSDIR)
- $(REBAR) get-deps && :> $(DEPSDIR)/.got
+ $(REBAR) $(GET_DEPS) && :> $(DEPSDIR)/.got
$(DEPSDIR)/.built: $(DEPSDIR)/.got
- $(REBAR) configure-deps
+ $(CONFIGURE_DEPS)
$(REBAR) compile && :> $(DEPSDIR)/.built
src: $(DEPSDIR)/.built
@@ -360,19 +386,19 @@ distclean: clean clean-rel
[ ! -f ../ChangeLog ] || rm -f ../ChangeLog
rel:
- $(REBAR) $(REBARREL)
+ $(REBARREL)
DEV_CONFIG = _build/dev/rel/ejabberd/etc/ejabberd/ejabberd.yml
dev $(DEV_CONFIG):
- REBAR_PROFILE=dev rebar3 release
+ $(REBARDEV)
TAGS:
etags *.erl
Makefile: Makefile.in
-ifeq "$(IS_REBAR3)" "1"
+ifeq "$(IS_REBAR)" "3"
dialyzer:
$(REBAR) dialyzer
else