Skip to content

Commit 5d731ae

Browse files
author
Loïc Hoguin
committed
make: Calc PROJECT_VERSION once in top-level Makefile
The optimisation that worked well for subfolders made things worse for the top-level Makefile. This should be corrected: make nope 0,74s user 0,58s system 172% cpu 0,769 total make nope 0,55s user 0,23s system 274% cpu 0,283 total
1 parent fb339eb commit 5d731ae

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

Makefile

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ PROJECT_DESCRIPTION = RabbitMQ Server
55
# other components. If PROJECT_VERSION is unset, then an empty variable
66
# is propagated and the default version will fallback to the default
77
# value from rabbitmq-components.mk.
8-
export RABBITMQ_VERSION = $(PROJECT_VERSION)
8+
export RABBITMQ_VERSION := $(PROJECT_VERSION)
99

1010
# Release artifacts are put in $(PACKAGES_DIR).
1111
PACKAGES_DIR ?= $(abspath PACKAGES)
@@ -53,6 +53,12 @@ deps:: restore-hex-cache-ets-file
5353
endif
5454

5555
include rabbitmq-components.mk
56+
57+
# Set PROJECT_VERSION, calculated in rabbitmq-components.mk,
58+
# in stone now, because in this Makefile we will be using it
59+
# multiple times (including for release file names and whatnot).
60+
PROJECT_VERSION := $(PROJECT_VERSION)
61+
5662
include erlang.mk
5763
include mk/github-actions.mk
5864
include mk/bazel.mk

0 commit comments

Comments
 (0)