diff options
| author | Jean-Sébastien Pédron <jean-sebastien@rabbitmq.com> | 2020-07-30 12:06:50 +0200 |
|---|---|---|
| committer | Jean-Sébastien Pédron <jean-sebastien@rabbitmq.com> | 2020-07-30 12:06:50 +0200 |
| commit | 7fb6f2151b41d7514ad353851bebcce106fd8429 (patch) | |
| tree | c5a4bee406f9bef0b9a94580076085f6bf82297b /rabbitmq-components.mk | |
| parent | 4d6737e4501cb7a563f4ee4e090e1df580ec101d (diff) | |
| download | rabbitmq-server-git-7fb6f2151b41d7514ad353851bebcce106fd8429.tar.gz | |
Update rabbitmq-components.mk
Diffstat (limited to 'rabbitmq-components.mk')
| -rw-r--r-- | rabbitmq-components.mk | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/rabbitmq-components.mk b/rabbitmq-components.mk index 71f65c0522..fbb77d6a60 100644 --- a/rabbitmq-components.mk +++ b/rabbitmq-components.mk @@ -321,15 +321,22 @@ prepare-dist:: # disable `make distclean` so $(DEPS_DIR) is not accidentally removed. ifneq ($(wildcard ../../rabbitmq-components.mk),) -DISABLE_DISTCLEAN = 1 -DEPS_DIR ?= $(abspath ..) +supposed_deps_dir = $(abspath ..) else ifneq ($(wildcard ../../../../rabbitmq-components.mk),) -DISABLE_DISTCLEAN = 1 -DEPS_DIR ?= $(abspath ../../..) +supposed_deps_dir = $(abspath ../../..) else ifneq ($(wildcard UMBRELLA.md),) DISABLE_DISTCLEAN = 1 endif +# We also verify that the guessed DEPS_DIR is actually named `deps`, to rule +# out any situation where it is a coincidence that we found a +# `rabbitmq-components.mk` up upper directories. + +ifeq ($(notdir $(supposed_deps_dir)),deps) +DISABLE_DISTCLEAN = 1 +DEPS_DIR ?= $(supposed_deps_dir) +endif + ifeq ($(DISABLE_DISTCLEAN),1) ifneq ($(filter distclean distclean-deps,$(MAKECMDGOALS)),) SKIP_DEPS = 1 |
