mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-20 16:15:59 +01:00
Update "make translations" to reduce build requirements
Previously, preparing translations required rebar3 and: ./configure --enable-tools make make translations With this change it works with rebar3 and mix, just running: ./configure make translations
This commit is contained in:
parent
e1f863afa4
commit
3c98ec5b48
@ -141,6 +141,8 @@ ifeq "$(REBAR_VER)" "6"
|
|||||||
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
|
||||||
REL_LIB_DIR = _build/dev/rel/ejabberd/lib
|
REL_LIB_DIR = _build/dev/rel/ejabberd/lib
|
||||||
COPY_REL_TARGET = dev
|
COPY_REL_TARGET = dev
|
||||||
|
GET_DEPS_TRANSLATIONS=MIX_ENV=translations $(REBAR) $(GET_DEPS)
|
||||||
|
DEPSDIR_TRANSLATIONS=deps
|
||||||
else
|
else
|
||||||
ifeq ($(REBAR_ENABLE_ELIXIR),true)
|
ifeq ($(REBAR_ENABLE_ELIXIR),true)
|
||||||
ELIXIR_LIBDIR_RAW=$(shell elixir -e "IO.puts(:filename.dirname(:code.lib_dir(:elixir)))" -e ":erlang.halt")
|
ELIXIR_LIBDIR_RAW=$(shell elixir -e "IO.puts(:filename.dirname(:code.lib_dir(:elixir)))" -e ":erlang.halt")
|
||||||
@ -169,6 +171,8 @@ endif
|
|||||||
RELIVECMD=$(REBAR) relive
|
RELIVECMD=$(REBAR) relive
|
||||||
REL_LIB_DIR = _build/dev/rel/ejabberd/lib
|
REL_LIB_DIR = _build/dev/rel/ejabberd/lib
|
||||||
COPY_REL_TARGET = dev
|
COPY_REL_TARGET = dev
|
||||||
|
GET_DEPS_TRANSLATIONS=$(REBAR) as translations $(GET_DEPS)
|
||||||
|
DEPSDIR_TRANSLATIONS=_build/translations/lib
|
||||||
else
|
else
|
||||||
SKIPDEPS=skip_deps=true
|
SKIPDEPS=skip_deps=true
|
||||||
LISTDEPS=-q list-deps
|
LISTDEPS=-q list-deps
|
||||||
@ -228,7 +232,8 @@ options: all
|
|||||||
tools/opt_types.sh ejabberd_option $(EBINDIR)
|
tools/opt_types.sh ejabberd_option $(EBINDIR)
|
||||||
|
|
||||||
translations:
|
translations:
|
||||||
tools/prepare-tr.sh $(DEPSDIR)
|
$(GET_DEPS_TRANSLATIONS)
|
||||||
|
tools/prepare-tr.sh $(DEPSDIR_TRANSLATIONS)
|
||||||
|
|
||||||
doap:
|
doap:
|
||||||
tools/generate-doap.sh
|
tools/generate-doap.sh
|
||||||
@ -647,7 +652,7 @@ help:
|
|||||||
@echo " doap Generate DOAP file"
|
@echo " doap Generate DOAP file"
|
||||||
@echo " edoc Generate edoc documentation (unused)"
|
@echo " edoc Generate edoc documentation (unused)"
|
||||||
@echo " options Generate ejabberd_option.erl"
|
@echo " options Generate ejabberd_option.erl"
|
||||||
@echo " translations Extract translation files (requires --enable-tools)"
|
@echo " translations Extract translation files"
|
||||||
@echo " TAGS Generate tags file for text editors"
|
@echo " TAGS Generate tags file for text editors"
|
||||||
@echo ""
|
@echo ""
|
||||||
@echo " dialyzer Run Dialyzer static analyzer"
|
@echo " dialyzer Run Dialyzer static analyzer"
|
||||||
|
@ -256,7 +256,7 @@ AC_ARG_ENABLE(system_deps,
|
|||||||
esac],[if test "x$system_deps" = "x"; then system_deps=false; fi])
|
esac],[if test "x$system_deps" = "x"; then system_deps=false; fi])
|
||||||
|
|
||||||
AC_ARG_ENABLE(tools,
|
AC_ARG_ENABLE(tools,
|
||||||
[AS_HELP_STRING([--enable-tools],[build development tools: ejabberd-po, etop (default: no)])],
|
[AS_HELP_STRING([--enable-tools],[build development tools: etop (default: no)])],
|
||||||
[case "${enableval}" in
|
[case "${enableval}" in
|
||||||
yes) tools=true ;;
|
yes) tools=true ;;
|
||||||
no) tools=false ;;
|
no) tools=false ;;
|
||||||
|
2
mix.exs
2
mix.exs
@ -132,6 +132,8 @@ defmodule Ejabberd.MixProject do
|
|||||||
|
|
||||||
defp cond_deps do
|
defp cond_deps do
|
||||||
for {:true, dep} <- [{config(:pam), {:epam, "~> 1.0"}},
|
for {:true, dep} <- [{config(:pam), {:epam, "~> 1.0"}},
|
||||||
|
{Mix.env() == :translations,
|
||||||
|
{:ejabberd_po, git: "https://github.com/processone/ejabberd-po.git"}},
|
||||||
{config(:redis), {:eredis, "~> 1.2.0"}},
|
{config(:redis), {:eredis, "~> 1.2.0"}},
|
||||||
{config(:sip), {:esip, "~> 1.0"}},
|
{config(:sip), {:esip, "~> 1.0"}},
|
||||||
{config(:zlib), {:ezlib, "~> 1.0"}},
|
{config(:zlib), {:ezlib, "~> 1.0"}},
|
||||||
|
@ -25,8 +25,6 @@
|
|||||||
{deps, [{base64url, ".*", {git, "https://github.com/dvv/base64url", {tag, "1.0.1"}}},
|
{deps, [{base64url, ".*", {git, "https://github.com/dvv/base64url", {tag, "1.0.1"}}},
|
||||||
{cache_tab, ".*", {git, "https://github.com/processone/cache_tab", {tag, "1.0.30"}}},
|
{cache_tab, ".*", {git, "https://github.com/processone/cache_tab", {tag, "1.0.30"}}},
|
||||||
{eimp, ".*", {git, "https://github.com/processone/eimp", {tag, "1.0.22"}}},
|
{eimp, ".*", {git, "https://github.com/processone/eimp", {tag, "1.0.22"}}},
|
||||||
{if_var_true, tools,
|
|
||||||
{ejabberd_po, ".*", {git, "https://github.com/processone/ejabberd-po", {branch, "main"}}}},
|
|
||||||
{if_var_true, pam,
|
{if_var_true, pam,
|
||||||
{epam, ".*", {git, "https://github.com/processone/epam", {tag, "1.0.14"}}}},
|
{epam, ".*", {git, "https://github.com/processone/epam", {tag, "1.0.14"}}}},
|
||||||
{if_var_true, redis,
|
{if_var_true, redis,
|
||||||
@ -283,6 +281,7 @@
|
|||||||
{copy, "ejabberd.yml.example", "conf/ejabberd.yml.example"},
|
{copy, "ejabberd.yml.example", "conf/ejabberd.yml.example"},
|
||||||
{copy, "test/ejabberd_SUITE_data/ca.pem", "conf/"},
|
{copy, "test/ejabberd_SUITE_data/ca.pem", "conf/"},
|
||||||
{copy, "test/ejabberd_SUITE_data/cert.pem", "conf/"}]}]}]},
|
{copy, "test/ejabberd_SUITE_data/cert.pem", "conf/"}]}]}]},
|
||||||
|
{translations, [{deps, [{ejabberd_po, ".*", {git, "https://github.com/processone/ejabberd-po", {branch, "main"}}}]}]},
|
||||||
{test, [{erl_opts, [nowarn_export_all]}]}]}.
|
{test, [{erl_opts, [nowarn_export_all]}]}]}.
|
||||||
|
|
||||||
{alias, [{relive, [{shell, "--apps ejabberd \
|
{alias, [{relive, [{shell, "--apps ejabberd \
|
||||||
|
Loading…
Reference in New Issue
Block a user