diff options
author | Daniil Fedotov <dfedotov@pivotal.io> | 2016-05-11 12:24:54 +0100 |
---|---|---|
committer | Jean-Sébastien Pédron <jean-sebastien@rabbitmq.com> | 2016-05-12 13:10:47 +0200 |
commit | d5beaefdf893e7295981dad99316aa8b884b54bd (patch) | |
tree | fdb023bbc909c82f30dad749054bbeb9cecf45ff /deps | |
parent | c1915f0bab1ea85d4aebdf5b9d434dd1ac32822e (diff) | |
download | rabbitmq-server-git-d5beaefdf893e7295981dad99316aa8b884b54bd.tar.gz |
rabbitmq-run.mk: Do not use ?= in target-specific variable assignments
This appears to be broken with at least GNU Make 3.81 on Debian Wheezy,
when the variable is overriden: instead of the new value, the variable
contains garbage.
This can be demonstrated with the following Makefile:
TEST_CONFIG_FILE = <default>
all: RABBITMQ_CONFIG_FILE ?= $(TEST_CONFIG_FILE)
all:
@echo TEST_CONFIG_FILE="$(TEST_CONFIG_FILE)"
@echo RABBITMQ_CONFIG_FILE="$(RABBITMQ_CONFIG_FILE)"
The expected output of `make RABBITMQ_CONFIG_FILE=/tmp` is:
TEST_CONFIG_FILE=<default>
RABBITMQ_CONFIG_FILE=/tmp
But GNU Make 3.81 on Debian Wheezy produces:
TEST_CONFIG_FILE=<default>
RABBITMQ_CONFIG_FILE= �?
In the end, using ?= is not required here, a plain = is enough: the
problem is worked around and the caller can still override the variable.
Fixes #93.
Diffstat (limited to 'deps')
-rw-r--r-- | deps/rabbit_common/mk/rabbitmq-run.mk | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/deps/rabbit_common/mk/rabbitmq-run.mk b/deps/rabbit_common/mk/rabbitmq-run.mk index 1d5fef5489..6126ce09ea 100644 --- a/deps/rabbit_common/mk/rabbitmq-run.mk +++ b/deps/rabbit_common/mk/rabbitmq-run.mk @@ -190,7 +190,7 @@ $(TEST_TLS_CERTS_DIR): node-tmpdir $(gen_verbose) $(MAKE) -C $(DEPS_DIR)/rabbit_common/tools/tls-certs \ DIR=$(TEST_TLS_CERTS_DIR) server -run-broker run-tls-broker: RABBITMQ_CONFIG_FILE ?= $(basename $(TEST_CONFIG_FILE)) +run-broker run-tls-broker: RABBITMQ_CONFIG_FILE = $(basename $(TEST_CONFIG_FILE)) run-broker: config := $(test_rabbitmq_config) run-tls-broker: config := $(test_rabbitmq_config_with_tls) run-tls-broker: $(TEST_TLS_CERTS_DIR) |