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")