diff options
-rw-r--r-- | Makefile | 4 | ||||
-rw-r--r-- | mk/rabbitmq-mix.mk | 8 |
2 files changed, 6 insertions, 6 deletions
@@ -213,8 +213,8 @@ $(SOURCE_DIST): $(ERLANG_MK_RECURSIVE_DEPS_LIST) mix_exs=$@/deps/$$(basename $$dep)/mix.exs; \ if test -f $$mix_exs; then \ (cd $$(dirname "$$mix_exs") && \ - env DEPS_DIR=$@/deps HOME=$@/deps MIX_ENV=prod FILL_HEX_CACHE=yes mix local.hex --force && \ - env DEPS_DIR=$@/deps HOME=$@/deps MIX_ENV=prod FILL_HEX_CACHE=yes mix deps.get --only prod && \ + (test -d $@/deps/.hex || env DEPS_DIR=$@/deps MIX_HOME=$@/deps/.mix HEX_HOME=$@/deps/.hex MIX_ENV=prod FILL_HEX_CACHE=yes mix local.hex --force) && \ + env DEPS_DIR=$@/deps MIX_HOME=$@/deps/.mix HEX_HOME=$@/deps/.hex MIX_ENV=prod FILL_HEX_CACHE=yes mix deps.get --only prod && \ cp $(CURDIR)/mk/rabbitmq-mix.mk . && \ rm -rf _build deps); \ fi; \ diff --git a/mk/rabbitmq-mix.mk b/mk/rabbitmq-mix.mk index d946a819b6..c6f73163e0 100644 --- a/mk/rabbitmq-mix.mk +++ b/mk/rabbitmq-mix.mk @@ -13,9 +13,9 @@ HEX_OFFLINE := 1 override MIX_HOME := $(DEPS_DIR)/.mix -# In addition to `$MIX_HOME`, we still have to set `$HOME` which is used -# to find `~/.hex` where the Hex.pm cache and packages are stored. +# In addition to `$MIX_HOME`, we still have to set `$HEX_HOME` which is used to +# find `~/.hex` where the Hex.pm cache and packages are stored. -override HOME := $(DEPS_DIR) +override HEX_HOME := $(DEPS_DIR)/.hex -export HEX_OFFLINE MIX_HOME HOME +export HEX_OFFLINE MIX_HOME HEX_HOME |