25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-22 16:20:52 +01:00

Elixir: Fix ejabberdctl start/live when installed

The problem appeared when:
  ./configure --with-rebar=mix
  make install
  ejabberdctl live

=INFO REPORT==== 19-Dec-2023::21:28:36.006306 ===
    application: ssl
    exited: stopped
    type: temporary
...
This commit is contained in:
Badlop 2023-12-20 15:27:08 +01:00
parent 1bf80e861d
commit b2df22469b

View File

@ -100,6 +100,8 @@ REBAR_VER:=$(shell $(REBAR) --version | awk -F '[ .]' '/rebar / {print $$2}')
REBAR_VER_318:=$(shell $(REBAR) --version | awk -F '[ .]' '/rebar / {print ($$2 == 3 && $$3 >= 18 ? 1 : 0)}') REBAR_VER_318:=$(shell $(REBAR) --version | awk -F '[ .]' '/rebar / {print ($$2 == 3 && $$3 >= 18 ? 1 : 0)}')
endif endif
REBAR_ENABLE_ELIXIR = @elixir@
ifeq "$(REBAR_VER)" "6" ifeq "$(REBAR_VER)" "6"
REBAR=$(MIX) REBAR=$(MIX)
SKIPDEPS= SKIPDEPS=
@ -113,10 +115,16 @@ ifeq "$(REBAR_VER)" "6"
EBINDIR=$(DEPSDIR)/ejabberd/ebin EBINDIR=$(DEPSDIR)/ejabberd/ebin
XREFOPTIONS=graph XREFOPTIONS=graph
CLEANARG=--deps CLEANARG=--deps
ELIXIR_LIBDIR_RAW=$(shell elixir -e "IO.puts(:filename.dirname(:code.lib_dir(:elixir)))" -e ":erlang.halt")
ELIXIR_LIBDIR=":$(ELIXIR_LIBDIR_RAW)"
REBARREL=MIX_ENV=prod $(REBAR) release --overwrite REBARREL=MIX_ENV=prod $(REBAR) release --overwrite
REBARDEV=MIX_ENV=dev $(REBAR) release --overwrite REBARDEV=MIX_ENV=dev $(REBAR) release --overwrite
RELIVECMD=escript rel/relive.escript && MIX_ENV=dev RELIVE=true iex --name ejabberd@localhost -S mix run RELIVECMD=escript rel/relive.escript && MIX_ENV=dev RELIVE=true iex --name ejabberd@localhost -S mix run
else else
ifeq ($(REBAR_ENABLE_ELIXIR),true)
ELIXIR_LIBDIR_RAW=$(shell elixir -e "IO.puts(:filename.dirname(:code.lib_dir(:elixir)))" -e ":erlang.halt")
ELIXIR_LIBDIR=":$(ELIXIR_LIBDIR_RAW)"
endif
ifeq "$(REBAR_VER)" "3" ifeq "$(REBAR_VER)" "3"
SKIPDEPS= SKIPDEPS=
LISTDEPS=tree LISTDEPS=tree
@ -299,7 +307,7 @@ ejabberdctl.relive:
-e "s*{{spool_dir}}*${SPOOL_DIR}*g" \ -e "s*{{spool_dir}}*${SPOOL_DIR}*g" \
-e "s*{{bindir}}/iex*$(iexpath)*g" \ -e "s*{{bindir}}/iex*$(iexpath)*g" \
-e "s*{{bindir}}*@bindir@*g" \ -e "s*{{bindir}}*@bindir@*g" \
-e "s*{{libdir}}*${relivelibdir}*g" \ -e "s*{{libdir}}*${relivelibdir}${ELIXIR_LIBDIR}*g" \
-e "s*{{erl}}*@ERL@*g" \ -e "s*{{erl}}*@ERL@*g" \
-e "s*{{epmd}}*@EPMD@*g" ejabberdctl.template \ -e "s*{{epmd}}*@EPMD@*g" ejabberdctl.template \
> ejabberdctl.relive > ejabberdctl.relive
@ -322,7 +330,7 @@ ejabberdctl.example: vars.config
-e "s*{{logs_dir}}*${LOGDIR}*g" \ -e "s*{{logs_dir}}*${LOGDIR}*g" \
-e "s*{{spool_dir}}*${SPOOLDIR}*g" \ -e "s*{{spool_dir}}*${SPOOLDIR}*g" \
-e "s*{{bindir}}*@bindir@*g" \ -e "s*{{bindir}}*@bindir@*g" \
-e "s*{{libdir}}*@libdir@*g" \ -e "s*{{libdir}}*@libdir@${ELIXIR_LIBDIR}*g" \
-e "s*{{erl}}*@ERL@*g" \ -e "s*{{erl}}*@ERL@*g" \
-e "s*{{epmd}}*@EPMD@*g" ejabberdctl.template \ -e "s*{{epmd}}*@EPMD@*g" ejabberdctl.template \
> ejabberdctl.example > ejabberdctl.example