diff --git a/Makefile.in b/Makefile.in index 2a26e7a8f..e105b2874 100644 --- a/Makefile.in +++ b/Makefile.in @@ -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 REL_LIB_DIR = _build/dev/rel/ejabberd/lib COPY_REL_TARGET = dev + GET_DEPS_TRANSLATIONS=MIX_ENV=translations $(REBAR) $(GET_DEPS) + DEPSDIR_TRANSLATIONS=deps else ifeq ($(REBAR_ENABLE_ELIXIR),true) 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 REL_LIB_DIR = _build/dev/rel/ejabberd/lib COPY_REL_TARGET = dev + GET_DEPS_TRANSLATIONS=$(REBAR) as translations $(GET_DEPS) + DEPSDIR_TRANSLATIONS=_build/translations/lib else SKIPDEPS=skip_deps=true LISTDEPS=-q list-deps @@ -228,7 +232,8 @@ options: all tools/opt_types.sh ejabberd_option $(EBINDIR) translations: - tools/prepare-tr.sh $(DEPSDIR) + $(GET_DEPS_TRANSLATIONS) + tools/prepare-tr.sh $(DEPSDIR_TRANSLATIONS) doap: tools/generate-doap.sh @@ -647,7 +652,7 @@ help: @echo " doap Generate DOAP file" @echo " edoc Generate edoc documentation (unused)" @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 "" @echo " dialyzer Run Dialyzer static analyzer" diff --git a/configure.ac b/configure.ac index 065047cb9..daa1170ea 100644 --- a/configure.ac +++ b/configure.ac @@ -256,7 +256,7 @@ AC_ARG_ENABLE(system_deps, esac],[if test "x$system_deps" = "x"; then system_deps=false; fi]) 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 yes) tools=true ;; no) tools=false ;; diff --git a/mix.exs b/mix.exs index f7e252533..791b276c6 100644 --- a/mix.exs +++ b/mix.exs @@ -132,6 +132,8 @@ defmodule Ejabberd.MixProject do defp cond_deps do 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(:sip), {:esip, "~> 1.0"}}, {config(:zlib), {:ezlib, "~> 1.0"}}, diff --git a/rebar.config b/rebar.config index 4242f5d0b..8f03e18cb 100644 --- a/rebar.config +++ b/rebar.config @@ -25,8 +25,6 @@ {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"}}}, {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, {epam, ".*", {git, "https://github.com/processone/epam", {tag, "1.0.14"}}}}, {if_var_true, redis, @@ -283,6 +281,7 @@ {copy, "ejabberd.yml.example", "conf/ejabberd.yml.example"}, {copy, "test/ejabberd_SUITE_data/ca.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]}]}]}. {alias, [{relive, [{shell, "--apps ejabberd \