Skip to content
This repository has been archived by the owner on Nov 18, 2020. It is now read-only.

Commit

Permalink
No longer mark the USE_SPECS common.mk Makefile variable for export,
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
tonyg committed Jul 11, 2010
1 parent c5b6431 commit 1a563bc
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion common.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit 1a563bc

Please sign in to comment.