1
0
Fork 0
mirror of https://github.com/processone/ejabberd synced 2025-10-03 01:39:35 +02:00

Enable feature maybe_expr also in the runtime for Erlang/OTP 25

As explained in https://erlangforums.com/t/how-to-enable-maybe-expr/2154
- Erlang/OTP 27 and newer has already the feature enabled by default
- Erlang/OTP 26 requires enabling the feature in the compiler
- Erlang/OTP 25 requires enabling also in the runtime system
This commit is contained in:
Badlop 2025-09-12 12:57:29 +02:00
parent 1ddd72ffe7
commit ccd9fa6561
2 changed files with 9 additions and 3 deletions

View file

@ -2,8 +2,11 @@
#' definitions
#
# Only required for Erlang/OTP 25
MAYBE=ERL_FLAGS="-enable-feature maybe_expr"
ESCRIPT = @ESCRIPT@
REBAR = @rebar@ # rebar|rebar3|mix binary (or path to binary)
REBAR = $(MAYBE) @rebar@ # rebar|rebar3|mix binary (or path to binary)
REBAR3 = @REBAR3@ # path to rebar3 binary
MIX = @rebar@
AWK = @AWK@
@ -123,7 +126,7 @@ REBAR_VER_318:=$(shell $(REBAR) --version | $(AWK) -F '[ .]' '/rebar / {print ($
endif
ifeq "$(REBAR_VER)" "6"
REBAR=$(MIX)
REBAR=$(MAYBE) $(MIX)
SKIPDEPS=
LISTDEPS=deps.tree
UPDATEDEPS=deps.update
@ -141,7 +144,7 @@ ifeq "$(REBAR_VER)" "6"
ELIXIR_LIBDIR=":$(ELIXIR_LIBDIR_RAW)"
REBARREL=MIX_ENV=prod $(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 $(MAYBE) $(IEX) --name ejabberd@localhost -S mix run
REL_LIB_DIR = _build/dev/rel/ejabberd/lib
COPY_REL_TARGET = dev
GET_DEPS_TRANSLATIONS=MIX_ENV=translations $(REBAR) $(GET_DEPS)

View file

@ -121,6 +121,9 @@ export CONTRIB_MODULES_CONF_DIR
export ERL_LIBS
export SCRIPT_DIR
# Only required for Erlang/OTP 25:
export ERL_FLAGS="$ERL_FLAGS -enable-feature maybe_expr"
set_dist_client()
{
[ -n "$ERL_DIST_PORT" ] && ERLANG_OPTS="$ERLANG_OPTS -dist_listen false"