diff options
| author | Michael Klishin <klishinm@vmware.com> | 2021-04-13 16:08:24 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-04-13 16:08:24 +0300 |
| commit | 185c770db1e6261accb1c90359d954a097715b11 (patch) | |
| tree | 5e688e49696c10445c2cff88ed3d4e3309ec1b54 | |
| parent | f49bb000d19ac30b3ef42d0e20d7d360fd3c29fd (diff) | |
| parent | 63689dd65887648dfcdc0032d6d995f024ad9ffa (diff) | |
| download | rabbitmq-server-git-185c770db1e6261accb1c90359d954a097715b11.tar.gz | |
Merge pull request #2972 from rabbitmq/improvements-to-source-dist-recipe
Improvements to the source-dist recipe
| -rw-r--r-- | Makefile | 18 | ||||
| -rw-r--r-- | mk/rabbitmq-mix.mk | 8 |
2 files changed, 7 insertions, 19 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; \ @@ -256,7 +256,7 @@ $(SOURCE_DIST): $(ERLANG_MK_RECURSIVE_DEPS_LIST) # # The ETS file must be recreated before compiling RabbitMQ. See the # `restore-hex-cache-ets-file` Make target. - $(verbose) $(call erlang,$(call dump_hex_cache_to_erl_term,$@,$@.git-time.txt)) + $(verbose) $(call erlang,$(call dump_hex_cache_to_erl_term,$(call core_native_path,$@),$(call core_native_path,$@.git-time.txt))) # Fix file timestamps to have reproducible source archives. $(verbose) find $@ -print0 | xargs -0 touch -t "$$(cat "$@.git-time.txt")" $(verbose) rm "$@.git-times.txt" "$@.git-time.txt" @@ -498,8 +498,6 @@ install-windows-erlapp: dist $(verbose) mkdir -p $(DESTDIR)$(WINDOWS_PREFIX) $(inst_verbose) cp -r \ LICENSE* \ - $(DEPS_DIR)/rabbit/ebin \ - $(DEPS_DIR)/rabbit/priv \ $(DEPS_DIR)/rabbit/INSTALL \ $(DIST_DIR) \ $(DESTDIR)$(WINDOWS_PREFIX) @@ -507,16 +505,6 @@ install-windows-erlapp: dist > $(DESTDIR)$(WINDOWS_PREFIX)/$(notdir $(DIST_DIR))/README.txt $(verbose) $(UNIX_TO_DOS) $(DESTDIR)$(WINDOWS_PREFIX)/plugins/README.txt - @# FIXME: Why do we copy headers? - $(verbose) cp -r \ - $(DEPS_DIR)/rabbit/include \ - $(DESTDIR)$(WINDOWS_PREFIX) - @# rabbitmq-common provides headers too: copy them to - @# rabbitmq_server/include. - $(verbose) cp -r \ - $(DEPS_DIR)/rabbit_common/include \ - $(DESTDIR)$(WINDOWS_PREFIX) - install-windows-escripts: $(verbose) $(MAKE) -C $(DEPS_DIR)/rabbitmq_cli install \ PREFIX="$(WINDOWS_PREFIX)/$(CLI_ESCRIPTS_DIR)" 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 |
