From 1a563bc54cb2f9984e2c4e488f6b5aec7db50dd9 Mon Sep 17 00:00:00 2001 From: Tony Garnock-Jones Date: Sun, 11 Jul 2010 23:52:26 +1200 Subject: [PATCH] No longer mark the USE_SPECS common.mk Makefile variable for export, because if it is so marked, it overrides the test in rabbitmq-server's Makefile when the make -C happens, and the override causes problems whenever the test here and the test there compare system_info(version) against *different* eshell version numbers. (Note that this is the case at the moment: the server needs R13B04, the client R13B01.) This change effectively lets the server code and this erlang client code make their own separate decisions about whether to compile with -Duse_specs or not, rather than the erlang-client calling the shots for both. --- common.mk | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/common.mk b/common.mk index a15ad91a..eb96b158 100644 --- a/common.mk +++ b/common.mk @@ -99,7 +99,12 @@ ifndef USE_SPECS # only available in R13B01 upwards (R13B is eshell 5.7.2) # # NB: the test assumes that version number will only contain single digits -export USE_SPECS=$(shell if [ $$(erl -noshell -eval 'io:format(erlang:system_info(version)), halt().') \> "5.7.1" ]; then echo "true"; else echo "false"; fi) +# NB2: do not mark this variable for export, otherwise it will +# override the test in rabbitmq-server's Makefile when it does the +# make -C, which causes problems whenever the test here and the test +# there compare system_info(version) against *different* eshell +# version numbers. +USE_SPECS=$(shell if [ $$(erl -noshell -eval 'io:format(erlang:system_info(version)), halt().') \> "5.7.1" ]; then echo "true"; else echo "false"; fi) endif ERLC_OPTS=-I $(INCLUDE_DIR) -o $(EBIN_DIR) -Wall -v +debug_info $(shell [ $(USE_SPECS) = "true" ] && echo "-Duse_specs")