2016-09-21 00:19:24 +08:00
|
|
|
ifeq ($(.DEFAULT_GOAL),)
|
|
|
|
# Define default goal to `all` because this file defines some targets
|
|
|
|
# before the inclusion of erlang.mk leading to the wrong target becoming
|
|
|
|
# the default.
|
|
|
|
.DEFAULT_GOAL = all
|
|
|
|
endif
|
|
|
|
|
2016-12-06 20:37:00 +08:00
|
|
|
# PROJECT_VERSION defaults to:
|
2024-07-23 21:08:41 +08:00
|
|
|
# 1. the version exported by environment;
|
2016-12-06 23:36:41 +08:00
|
|
|
# 2. the version stored in `git-revisions.txt`, if it exists;
|
|
|
|
# 3. a version based on git-describe(1), if it is a Git clone;
|
|
|
|
# 4. 0.0.0
|
2024-07-23 21:08:41 +08:00
|
|
|
#
|
|
|
|
# Note that in the case where git-describe(1) is used
|
|
|
|
# (e.g. during development), running "git gc" may help
|
|
|
|
# improve the performance.
|
2016-12-06 23:36:41 +08:00
|
|
|
|
2016-12-09 02:02:49 +08:00
|
|
|
PROJECT_VERSION := $(RABBITMQ_VERSION)
|
2016-12-06 20:37:00 +08:00
|
|
|
|
|
|
|
ifeq ($(PROJECT_VERSION),)
|
2024-07-23 21:08:41 +08:00
|
|
|
ifneq ($(wildcard git-revisions.txt),)
|
2024-05-28 18:19:39 +08:00
|
|
|
PROJECT_VERSION = $(shell \
|
2016-12-06 20:37:00 +08:00
|
|
|
head -n1 git-revisions.txt | \
|
2024-07-23 21:08:41 +08:00
|
|
|
awk '{print $$$(words $(PROJECT_DESCRIPTION) version);}')
|
|
|
|
else
|
|
|
|
PROJECT_VERSION = $(shell \
|
2016-12-06 20:37:00 +08:00
|
|
|
(git describe --dirty --abbrev=7 --tags --always --first-parent \
|
2024-07-23 21:08:41 +08:00
|
|
|
2>/dev/null || echo 0.0.0) | \
|
|
|
|
sed -e 's/^v//' -e 's/_/./g' -e 's/-/+/' -e 's/-/./g')
|
|
|
|
endif
|
2016-12-06 20:37:00 +08:00
|
|
|
endif
|
|
|
|
|
2016-09-21 00:19:24 +08:00
|
|
|
# --------------------------------------------------------------------
|
|
|
|
# RabbitMQ components.
|
|
|
|
# --------------------------------------------------------------------
|
|
|
|
|
2016-11-25 17:08:22 +08:00
|
|
|
# Third-party dependencies version pinning.
|
|
|
|
#
|
2024-06-21 20:26:53 +08:00
|
|
|
# We do that in this file, which is included by all projects, to ensure
|
|
|
|
# all projects use the same versions. It avoids conflicts.
|
2016-11-25 17:08:22 +08:00
|
|
|
|
2019-04-23 04:55:14 +08:00
|
|
|
dep_accept = hex 0.3.5
|
2025-10-01 21:40:35 +08:00
|
|
|
dep_cowboy = hex 2.14.1
|
2025-09-03 18:22:00 +08:00
|
|
|
dep_cowlib = hex 2.16.0
|
2025-03-25 12:04:25 +08:00
|
|
|
dep_credentials_obfuscation = hex 3.5.0
|
2025-08-12 01:25:36 +08:00
|
|
|
dep_cuttlefish = hex 3.5.0
|
2024-04-16 23:38:42 +08:00
|
|
|
dep_gen_batch_server = hex 0.8.8
|
2024-05-29 14:45:27 +08:00
|
|
|
dep_jose = hex 1.11.10
|
2025-07-30 17:33:01 +08:00
|
|
|
dep_khepri = hex 0.17.2
|
2024-11-15 02:21:00 +08:00
|
|
|
dep_khepri_mnesia_migration = hex 0.8.0
|
2025-03-13 23:32:42 +08:00
|
|
|
dep_meck = hex 1.0.0
|
2025-09-22 17:15:27 +08:00
|
|
|
dep_osiris = git https://github.com/rabbitmq/osiris v1.10.0
|
2025-07-24 16:43:20 +08:00
|
|
|
dep_prometheus = hex 5.1.1
|
2025-08-26 23:57:44 +08:00
|
|
|
dep_ra = hex 2.17.1
|
2025-02-12 16:16:19 +08:00
|
|
|
dep_ranch = hex 2.2.0
|
2024-10-08 04:23:50 +08:00
|
|
|
dep_recon = hex 2.5.6
|
2025-06-05 05:29:07 +08:00
|
|
|
dep_redbug = hex 2.1.0
|
2024-09-16 18:03:25 +08:00
|
|
|
dep_systemd = hex 0.6.1
|
2024-10-08 04:31:58 +08:00
|
|
|
dep_thoas = hex 1.2.1
|
2025-02-08 17:19:37 +08:00
|
|
|
dep_observer_cli = hex 1.8.2
|
2025-07-24 16:43:20 +08:00
|
|
|
dep_seshat = hex 1.0.0
|
2020-07-21 18:12:54 +08:00
|
|
|
dep_stdout_formatter = hex 0.2.4
|
2020-07-21 08:40:06 +08:00
|
|
|
dep_sysmon_handler = hex 1.3.0
|
2017-10-13 20:13:28 +08:00
|
|
|
|
2024-07-04 21:27:50 +08:00
|
|
|
# RabbitMQ applications found in the monorepo.
|
|
|
|
#
|
|
|
|
# Note that rabbitmq_server_release is not a real application
|
|
|
|
# but is the name used in the top-level Makefile.
|
|
|
|
|
|
|
|
RABBITMQ_BUILTIN = \
|
|
|
|
amqp10_client \
|
|
|
|
amqp10_common \
|
|
|
|
amqp_client \
|
|
|
|
oauth2_client \
|
|
|
|
rabbit \
|
|
|
|
rabbit_common \
|
|
|
|
rabbitmq_amqp1_0 \
|
|
|
|
rabbitmq_amqp_client \
|
|
|
|
rabbitmq_auth_backend_cache \
|
|
|
|
rabbitmq_auth_backend_http \
|
2025-03-15 06:20:13 +08:00
|
|
|
rabbitmq_auth_backend_internal_loopback \
|
2024-07-04 21:27:50 +08:00
|
|
|
rabbitmq_auth_backend_ldap \
|
|
|
|
rabbitmq_auth_backend_oauth2 \
|
|
|
|
rabbitmq_auth_mechanism_ssl \
|
|
|
|
rabbitmq_aws \
|
|
|
|
rabbitmq_cli \
|
|
|
|
rabbitmq_codegen \
|
|
|
|
rabbitmq_consistent_hash_exchange \
|
|
|
|
rabbitmq_ct_client_helpers \
|
|
|
|
rabbitmq_ct_helpers \
|
|
|
|
rabbitmq_event_exchange \
|
|
|
|
rabbitmq_federation \
|
|
|
|
rabbitmq_federation_management \
|
|
|
|
rabbitmq_federation_prometheus \
|
|
|
|
rabbitmq_jms_topic_exchange \
|
|
|
|
rabbitmq_management \
|
|
|
|
rabbitmq_management_agent \
|
|
|
|
rabbitmq_mqtt \
|
|
|
|
rabbitmq_peer_discovery_aws \
|
|
|
|
rabbitmq_peer_discovery_common \
|
|
|
|
rabbitmq_peer_discovery_consul \
|
|
|
|
rabbitmq_peer_discovery_etcd \
|
|
|
|
rabbitmq_peer_discovery_k8s \
|
|
|
|
rabbitmq_prelaunch \
|
|
|
|
rabbitmq_prometheus \
|
|
|
|
rabbitmq_random_exchange \
|
|
|
|
rabbitmq_recent_history_exchange \
|
|
|
|
rabbitmq_server_release \
|
|
|
|
rabbitmq_sharding \
|
|
|
|
rabbitmq_shovel \
|
|
|
|
rabbitmq_shovel_management \
|
|
|
|
rabbitmq_stomp \
|
|
|
|
rabbitmq_stream \
|
|
|
|
rabbitmq_stream_common \
|
|
|
|
rabbitmq_stream_management \
|
|
|
|
rabbitmq_top \
|
|
|
|
rabbitmq_tracing \
|
|
|
|
rabbitmq_trust_store \
|
|
|
|
rabbitmq_web_dispatch \
|
|
|
|
rabbitmq_web_mqtt \
|
|
|
|
rabbitmq_web_mqtt_examples \
|
|
|
|
rabbitmq_web_stomp \
|
|
|
|
rabbitmq_web_stomp_examples \
|
|
|
|
trust_store_http
|
|
|
|
|
|
|
|
# Applications outside of the monorepo maintained by Team RabbitMQ.
|
make: Additional cleanup of RabbitMQ components
Because of the monorepo most components do not need to be
listed. Only the community plugins and third party dependencies.
Community plugins can now be fetched and acted on from the top
level Makefile by adding COMMUNITY_PLUGINS=1 to the command line
or the environment. This will fetch and build community plugins:
make COMMUNITY_PLUGINS=1
Once fetched they can be targeted directly as usual:
make -C deps/rabbitmq_metronome
This cleanup has a net positive effect on build performance,
especially the performance of the top-level Makefile:
make nope 0,04s user 0,02s system 106% cpu 0,061 total
make nope 0,02s user 0,01s system 104% cpu 0,033 total
But also a minor improvement for application Makefiles:
make -C deps/rabbit nope 0,02s user 0,00s system 98% cpu 0,022 total
make -C deps/rabbit nope 0,01s user 0,00s system 98% cpu 0,020 total
And that improvement adds up when going through dependencies:
make -C deps/rabbitmq_management 0,59s user 0,23s system 100% cpu 0,808 total
make -C deps/rabbitmq_management 0,60s user 0,19s system 101% cpu 0,780 total
2024-07-24 21:56:29 +08:00
|
|
|
|
2024-07-04 21:27:50 +08:00
|
|
|
RABBITMQ_COMMUNITY = \
|
make: Additional cleanup of RabbitMQ components
Because of the monorepo most components do not need to be
listed. Only the community plugins and third party dependencies.
Community plugins can now be fetched and acted on from the top
level Makefile by adding COMMUNITY_PLUGINS=1 to the command line
or the environment. This will fetch and build community plugins:
make COMMUNITY_PLUGINS=1
Once fetched they can be targeted directly as usual:
make -C deps/rabbitmq_metronome
This cleanup has a net positive effect on build performance,
especially the performance of the top-level Makefile:
make nope 0,04s user 0,02s system 106% cpu 0,061 total
make nope 0,02s user 0,01s system 104% cpu 0,033 total
But also a minor improvement for application Makefiles:
make -C deps/rabbit nope 0,02s user 0,00s system 98% cpu 0,022 total
make -C deps/rabbit nope 0,01s user 0,00s system 98% cpu 0,020 total
And that improvement adds up when going through dependencies:
make -C deps/rabbitmq_management 0,59s user 0,23s system 100% cpu 0,808 total
make -C deps/rabbitmq_management 0,60s user 0,19s system 101% cpu 0,780 total
2024-07-24 21:56:29 +08:00
|
|
|
rabbitmq_auth_backend_amqp \
|
2024-07-04 21:27:50 +08:00
|
|
|
rabbitmq_boot_steps_visualiser \
|
|
|
|
rabbitmq_delayed_message_exchange \
|
|
|
|
rabbitmq_lvc_exchange \
|
|
|
|
rabbitmq_management_exchange \
|
|
|
|
rabbitmq_management_themes \
|
|
|
|
rabbitmq_message_timestamp \
|
make: Additional cleanup of RabbitMQ components
Because of the monorepo most components do not need to be
listed. Only the community plugins and third party dependencies.
Community plugins can now be fetched and acted on from the top
level Makefile by adding COMMUNITY_PLUGINS=1 to the command line
or the environment. This will fetch and build community plugins:
make COMMUNITY_PLUGINS=1
Once fetched they can be targeted directly as usual:
make -C deps/rabbitmq_metronome
This cleanup has a net positive effect on build performance,
especially the performance of the top-level Makefile:
make nope 0,04s user 0,02s system 106% cpu 0,061 total
make nope 0,02s user 0,01s system 104% cpu 0,033 total
But also a minor improvement for application Makefiles:
make -C deps/rabbit nope 0,02s user 0,00s system 98% cpu 0,022 total
make -C deps/rabbit nope 0,01s user 0,00s system 98% cpu 0,020 total
And that improvement adds up when going through dependencies:
make -C deps/rabbitmq_management 0,59s user 0,23s system 100% cpu 0,808 total
make -C deps/rabbitmq_management 0,60s user 0,19s system 101% cpu 0,780 total
2024-07-24 21:56:29 +08:00
|
|
|
rabbitmq_metronome \
|
2024-07-04 21:27:50 +08:00
|
|
|
rabbitmq_routing_node_stamp \
|
|
|
|
rabbitmq_rtopic_exchange
|
|
|
|
|
make: Additional cleanup of RabbitMQ components
Because of the monorepo most components do not need to be
listed. Only the community plugins and third party dependencies.
Community plugins can now be fetched and acted on from the top
level Makefile by adding COMMUNITY_PLUGINS=1 to the command line
or the environment. This will fetch and build community plugins:
make COMMUNITY_PLUGINS=1
Once fetched they can be targeted directly as usual:
make -C deps/rabbitmq_metronome
This cleanup has a net positive effect on build performance,
especially the performance of the top-level Makefile:
make nope 0,04s user 0,02s system 106% cpu 0,061 total
make nope 0,02s user 0,01s system 104% cpu 0,033 total
But also a minor improvement for application Makefiles:
make -C deps/rabbit nope 0,02s user 0,00s system 98% cpu 0,022 total
make -C deps/rabbit nope 0,01s user 0,00s system 98% cpu 0,020 total
And that improvement adds up when going through dependencies:
make -C deps/rabbitmq_management 0,59s user 0,23s system 100% cpu 0,808 total
make -C deps/rabbitmq_management 0,60s user 0,19s system 101% cpu 0,780 total
2024-07-24 21:56:29 +08:00
|
|
|
community_dep = git git@github.com:rabbitmq/$1.git $(if $2,$2,main)
|
|
|
|
dep_rabbitmq_auth_backend_amqp = $(call community_dep,rabbitmq-auth-backend-amqp)
|
|
|
|
dep_rabbitmq_boot_steps_visualiser = $(call community_dep,rabbitmq-boot-steps-visualiser,master)
|
|
|
|
dep_rabbitmq_delayed_message_exchange = $(call community_dep,rabbitmq-delayed-message-exchange)
|
|
|
|
dep_rabbitmq_lvc_exchange = $(call community_dep,rabbitmq-lvc-exchange)
|
|
|
|
dep_rabbitmq_management_exchange = $(call community_dep,rabbitmq-management-exchange)
|
|
|
|
dep_rabbitmq_management_themes = $(call community_dep,rabbitmq-management-themes,master)
|
|
|
|
dep_rabbitmq_message_timestamp = $(call community_dep,rabbitmq-message-timestamp)
|
|
|
|
dep_rabbitmq_metronome = $(call community_dep,rabbitmq-metronome,master)
|
|
|
|
dep_rabbitmq_routing_node_stamp = $(call community_dep,rabbitmq-routing-node-stamp)
|
|
|
|
dep_rabbitmq_rtopic_exchange = $(call community_dep,rabbitmq-rtopic-exchange)
|
|
|
|
|
|
|
|
# All RabbitMQ applications.
|
|
|
|
|
2024-07-04 21:27:50 +08:00
|
|
|
RABBITMQ_COMPONENTS = $(RABBITMQ_BUILTIN) $(RABBITMQ_COMMUNITY)
|
2016-09-21 00:19:24 +08:00
|
|
|
|
2019-06-28 22:05:40 +08:00
|
|
|
# Erlang.mk does not rebuild dependencies by default, once they were
|
|
|
|
# compiled once, except for those listed in the `$(FORCE_REBUILD)`
|
|
|
|
# variable.
|
|
|
|
#
|
|
|
|
# We want all RabbitMQ components to always be rebuilt: this eases
|
|
|
|
# the work on several components at the same time.
|
|
|
|
|
|
|
|
FORCE_REBUILD = $(RABBITMQ_COMPONENTS)
|
|
|
|
|
make: Additional cleanup of RabbitMQ components
Because of the monorepo most components do not need to be
listed. Only the community plugins and third party dependencies.
Community plugins can now be fetched and acted on from the top
level Makefile by adding COMMUNITY_PLUGINS=1 to the command line
or the environment. This will fetch and build community plugins:
make COMMUNITY_PLUGINS=1
Once fetched they can be targeted directly as usual:
make -C deps/rabbitmq_metronome
This cleanup has a net positive effect on build performance,
especially the performance of the top-level Makefile:
make nope 0,04s user 0,02s system 106% cpu 0,061 total
make nope 0,02s user 0,01s system 104% cpu 0,033 total
But also a minor improvement for application Makefiles:
make -C deps/rabbit nope 0,02s user 0,00s system 98% cpu 0,022 total
make -C deps/rabbit nope 0,01s user 0,00s system 98% cpu 0,020 total
And that improvement adds up when going through dependencies:
make -C deps/rabbitmq_management 0,59s user 0,23s system 100% cpu 0,808 total
make -C deps/rabbitmq_management 0,60s user 0,19s system 101% cpu 0,780 total
2024-07-24 21:56:29 +08:00
|
|
|
# We disable autopatching for community plugins as they sit in
|
|
|
|
# their own repository and we want to avoid polluting the git
|
|
|
|
# status with changes that should not be committed.
|
|
|
|
NO_AUTOPATCH += $(RABBITMQ_COMMUNITY)
|
2021-03-22 17:38:17 +08:00
|
|
|
|
2016-09-21 00:19:24 +08:00
|
|
|
# --------------------------------------------------------------------
|
|
|
|
# Component distribution.
|
|
|
|
# --------------------------------------------------------------------
|
|
|
|
|
|
|
|
list-dist-deps::
|
|
|
|
@:
|
|
|
|
|
|
|
|
prepare-dist::
|
|
|
|
@:
|
|
|
|
|
|
|
|
# --------------------------------------------------------------------
|
make: Additional cleanup of RabbitMQ components
Because of the monorepo most components do not need to be
listed. Only the community plugins and third party dependencies.
Community plugins can now be fetched and acted on from the top
level Makefile by adding COMMUNITY_PLUGINS=1 to the command line
or the environment. This will fetch and build community plugins:
make COMMUNITY_PLUGINS=1
Once fetched they can be targeted directly as usual:
make -C deps/rabbitmq_metronome
This cleanup has a net positive effect on build performance,
especially the performance of the top-level Makefile:
make nope 0,04s user 0,02s system 106% cpu 0,061 total
make nope 0,02s user 0,01s system 104% cpu 0,033 total
But also a minor improvement for application Makefiles:
make -C deps/rabbit nope 0,02s user 0,00s system 98% cpu 0,022 total
make -C deps/rabbit nope 0,01s user 0,00s system 98% cpu 0,020 total
And that improvement adds up when going through dependencies:
make -C deps/rabbitmq_management 0,59s user 0,23s system 100% cpu 0,808 total
make -C deps/rabbitmq_management 0,60s user 0,19s system 101% cpu 0,780 total
2024-07-24 21:56:29 +08:00
|
|
|
# RabbitMQ-specific settings.
|
2016-09-21 00:19:24 +08:00
|
|
|
# --------------------------------------------------------------------
|
|
|
|
|
2020-07-30 01:02:05 +08:00
|
|
|
# If the top-level project is a RabbitMQ component, we override
|
2020-08-04 23:41:49 +08:00
|
|
|
# $(DEPS_DIR) for this project to point to the top-level's one.
|
2024-06-28 18:09:24 +08:00
|
|
|
#
|
|
|
|
# We do the same for $(ERLANG_MK_TMP) as we want to keep the
|
|
|
|
# beam cache regardless of where we build. We also want to
|
|
|
|
# share Hex tarballs.
|
2020-07-30 18:06:57 +08:00
|
|
|
|
2024-06-21 20:26:53 +08:00
|
|
|
ifneq ($(PROJECT),rabbitmq_server_release)
|
|
|
|
DEPS_DIR ?= $(abspath ..)
|
2024-06-28 18:09:24 +08:00
|
|
|
ERLANG_MK_TMP ?= $(abspath ../../.erlang.mk)
|
2020-07-30 18:06:57 +08:00
|
|
|
DISABLE_DISTCLEAN = 1
|
|
|
|
endif
|
|
|
|
|
2020-08-04 23:41:49 +08:00
|
|
|
# We disable `make distclean` so $(DEPS_DIR) is not accidentally removed.
|
|
|
|
|
2020-07-30 01:02:05 +08:00
|
|
|
ifeq ($(DISABLE_DISTCLEAN),1)
|
2016-09-21 00:19:24 +08:00
|
|
|
ifneq ($(filter distclean distclean-deps,$(MAKECMDGOALS)),)
|
|
|
|
SKIP_DEPS = 1
|
|
|
|
endif
|
|
|
|
endif
|