summaryrefslogtreecommitdiff
path: root/deps/amqp10_common
diff options
context:
space:
mode:
authorJean-Sébastien Pédron <jean-sebastien@rabbitmq.com>2020-07-30 12:06:49 +0200
committerJean-Sébastien Pédron <jean-sebastien@rabbitmq.com>2020-07-30 12:06:49 +0200
commitda1ec9127ecb4aeb3562ce0ebaffb9a383a071c6 (patch)
treefa90ac85313399f590516617573f33d90b4e7699 /deps/amqp10_common
parent19373af512bedc3cf5996fce3d50949cdb3f6559 (diff)
downloadrabbitmq-server-git-da1ec9127ecb4aeb3562ce0ebaffb9a383a071c6.tar.gz
Update rabbitmq-components.mk
Diffstat (limited to 'deps/amqp10_common')
-rw-r--r--deps/amqp10_common/rabbitmq-components.mk15
1 files changed, 11 insertions, 4 deletions
diff --git a/deps/amqp10_common/rabbitmq-components.mk b/deps/amqp10_common/rabbitmq-components.mk
index 71f65c0522..fbb77d6a60 100644
--- a/deps/amqp10_common/rabbitmq-components.mk
+++ b/deps/amqp10_common/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