Update rabbitmq-components.mk
This commit is contained in:
parent
8a021cc1df
commit
f8464f3644
|
@ -321,15 +321,22 @@ prepare-dist::
|
||||||
# disable `make distclean` so $(DEPS_DIR) is not accidentally removed.
|
# disable `make distclean` so $(DEPS_DIR) is not accidentally removed.
|
||||||
|
|
||||||
ifneq ($(wildcard ../../rabbitmq-components.mk),)
|
ifneq ($(wildcard ../../rabbitmq-components.mk),)
|
||||||
DISABLE_DISTCLEAN = 1
|
supposed_deps_dir = $(abspath ..)
|
||||||
DEPS_DIR ?= $(abspath ..)
|
|
||||||
else ifneq ($(wildcard ../../../../rabbitmq-components.mk),)
|
else ifneq ($(wildcard ../../../../rabbitmq-components.mk),)
|
||||||
DISABLE_DISTCLEAN = 1
|
supposed_deps_dir = $(abspath ../../..)
|
||||||
DEPS_DIR ?= $(abspath ../../..)
|
|
||||||
else ifneq ($(wildcard UMBRELLA.md),)
|
else ifneq ($(wildcard UMBRELLA.md),)
|
||||||
DISABLE_DISTCLEAN = 1
|
DISABLE_DISTCLEAN = 1
|
||||||
endif
|
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)
|
ifeq ($(DISABLE_DISTCLEAN),1)
|
||||||
ifneq ($(filter distclean distclean-deps,$(MAKECMDGOALS)),)
|
ifneq ($(filter distclean distclean-deps,$(MAKECMDGOALS)),)
|
||||||
SKIP_DEPS = 1
|
SKIP_DEPS = 1
|
||||||
|
|
Loading…
Reference in New Issue