Merge branch 'limit-rabbitmq-components.mk-update-to-same-branch' into v3.7.x

This commit is contained in:
Jean-Sébastien Pédron 2018-01-30 16:20:56 +01:00
commit ec7bdb3ab5
2 changed files with 39 additions and 26 deletions

View File

@ -303,7 +303,7 @@ prepare-dist::
@: @:
# -------------------------------------------------------------------- # --------------------------------------------------------------------
# rabbitmq-components.mk checks. # Umbrella-specific settings.
# -------------------------------------------------------------------- # --------------------------------------------------------------------
# If this project is under the Umbrella project, we override $(DEPS_DIR) # If this project is under the Umbrella project, we override $(DEPS_DIR)
@ -325,28 +325,3 @@ ifneq ($(filter distclean distclean-deps,$(MAKECMDGOALS)),)
SKIP_DEPS = 1 SKIP_DEPS = 1
endif endif
endif endif
UPSTREAM_RMQ_COMPONENTS_MK = $(DEPS_DIR)/rabbit_common/mk/rabbitmq-components.mk
ifeq ($(PROJECT),rabbit_common)
check-rabbitmq-components.mk:
@:
else
check-rabbitmq-components.mk:
$(verbose) cmp -s rabbitmq-components.mk \
$(UPSTREAM_RMQ_COMPONENTS_MK) || \
(echo "error: rabbitmq-components.mk must be updated!" 1>&2; \
false)
endif
ifeq ($(PROJECT),rabbit_common)
rabbitmq-components-mk:
@:
else
rabbitmq-components-mk:
$(gen_verbose) cp -a $(UPSTREAM_RMQ_COMPONENTS_MK) .
ifeq ($(DO_COMMIT),yes)
$(verbose) git diff --quiet rabbitmq-components.mk \
|| git commit -m 'Update rabbitmq-components.mk' rabbitmq-components.mk
endif
endif

View File

@ -21,6 +21,44 @@ update-erlang-mk: erlang-mk
fi; \ fi; \
done done
# --------------------------------------------------------------------
# rabbitmq-components.mk checks.
# --------------------------------------------------------------------
UPSTREAM_RMQ_COMPONENTS_MK = $(DEPS_DIR)/rabbit_common/mk/rabbitmq-components.mk
ifeq ($(PROJECT),rabbit_common)
check-rabbitmq-components.mk:
@:
else
check-rabbitmq-components.mk:
$(verbose) cmp -s rabbitmq-components.mk \
$(UPSTREAM_RMQ_COMPONENTS_MK) || \
(echo "error: rabbitmq-components.mk must be updated!" 1>&2; \
false)
endif
ifeq ($(PROJECT),rabbit_common)
rabbitmq-components-mk:
@:
else
rabbitmq-components-mk:
ifeq ($(FORCE),yes)
$(gen_verbose) cp -a $(UPSTREAM_RMQ_COMPONENTS_MK) .
else
$(gen_verbose) if test -d .git && test -d $(DEPS_DIR)/rabbit_common/.git; then \
upstream_branch=$$(LANG=C git -C $(DEPS_DIR)/rabbit_common branch --list | awk '/^\* \(.*detached / {ref=$$0; sub(/.*detached [^ ]+ /, "", ref); sub(/\)$$/, "", ref); print ref; exit;} /^\* / {ref=$$0; sub(/^\* /, "", ref); print ref; exit}'); \
local_branch=$$(LANG=C git branch --list | awk '/^\* \(.*detached / {ref=$$0; sub(/.*detached [^ ]+ /, "", ref); sub(/\)$$/, "", ref); print ref; exit;} /^\* / {ref=$$0; sub(/^\* /, "", ref); print ref; exit}'); \
test "$$local_branch" = "$$upstream_branch" || exit 0; \
fi; \
cp -a $(UPSTREAM_RMQ_COMPONENTS_MK) .
endif
ifeq ($(DO_COMMIT),yes)
$(verbose) git diff --quiet rabbitmq-components.mk \
|| git commit -m 'Update rabbitmq-components.mk' rabbitmq-components.mk
endif
endif
update-rabbitmq-components-mk: rabbitmq-components-mk update-rabbitmq-components-mk: rabbitmq-components-mk
$(verbose) for repo in $(READY_DEPS:%=$(DEPS_DIR)/%); do \ $(verbose) for repo in $(READY_DEPS:%=$(DEPS_DIR)/%); do \
! test -f $$repo/rabbitmq-components.mk \ ! test -f $$repo/rabbitmq-components.mk \