@@ -20,10 +20,10 @@ PYTHON=python
2020
2121ifndef USE_SPECS
2222# our type specs rely on features / bug fixes in dialyzer that are
23- # only available in R12B-3 upwards
23+ # only available in R13B upwards (R13B is eshell 5.7.1)
2424#
2525# NB: the test assumes that version number will only contain single digits
26- USE_SPECS =$(shell if [ $$(erl -noshell -eval 'io:format(erlang:system_info(version ) ) , halt().') \> "5.6.2 " ]; then echo "true"; else echo "false"; fi)
26+ USE_SPECS =$(shell if [ $$(erl -noshell -eval 'io:format(erlang:system_info(version ) ) , halt().') \> "5.7.0 " ]; then echo "true"; else echo "false"; fi)
2727endif
2828
2929# other args: +native +"{hipe,[o3,verbose]}" -Ddebug=true +debug_info +no_strict_record_tests
@@ -39,9 +39,6 @@ AMQP_SPEC_JSON_PATH=$(AMQP_CODEGEN_DIR)/amqp-0.8.json
3939
4040ERL_CALL =erl_call -sname $(RABBITMQ_NODENAME ) -e
4141
42- # for the moment we don't use boot files because they introduce a
43- # dependency on particular versions of OTP applications
44- # all: $(EBIN_DIR)/rabbit.boot
4542all : $(TARGETS )
4643
4744$(EBIN_DIR ) /rabbit.app : $(EBIN_DIR ) /rabbit_app.in $(BEAM_TARGETS ) generate_app
@@ -101,7 +98,8 @@ run-tests: all
10198start-background-node :
10299 $(BASIC_SCRIPT_ENVIRONMENT_SETTINGS ) \
103100 RABBITMQ_NODE_ONLY=true \
104- ./scripts/rabbitmq-server -detached; sleep 1
101+ RABBITMQ_SERVER_START_ARGS=" $( RABBITMQ_SERVER_START_ARGS) -detached" \
102+ ./scripts/rabbitmq-server ; sleep 1
105103
106104start-rabbit-on-node : all
107105 echo " rabbit:start()." | $(ERL_CALL )
@@ -115,8 +113,11 @@ force-snapshot: all
115113stop-node :
116114 -$(ERL_CALL ) -q
117115
116+ # code coverage will be created for subdirectory "ebin" of COVER_DIR
117+ COVER_DIR =.
118+
118119start-cover : all
119- echo " cover:start(), rabbit_misc:enable_cover()." | $(ERL_CALL )
120+ echo " cover:start(), rabbit_misc:enable_cover([ \" $( COVER_DIR ) \" ] )." | $(ERL_CALL )
120121
121122stop-cover : all
122123 echo " rabbit_misc:report_cover(), cover:stop()." | $(ERL_CALL )
@@ -136,7 +137,7 @@ srcdist: distclean
136137 sed -i.save ' s/%%VSN%%/$(VERSION)/' $(TARGET_SRC_DIR ) /ebin/rabbit_app.in && rm -f $(TARGET_SRC_DIR ) /ebin/rabbit_app.in.save
137138
138139 cp -r $(AMQP_CODEGEN_DIR)/* $(TARGET_SRC_DIR)/codegen/
139- cp codegen.py Makefile generate_app $(TARGET_SRC_DIR)
140+ cp codegen.py Makefile generate_app calculate-relative $(TARGET_SRC_DIR)
140141
141142 cp -r scripts $(TARGET_SRC_DIR)
142143 cp -r docs $(TARGET_SRC_DIR)
@@ -147,7 +148,7 @@ srcdist: distclean
147148 rm -rf $(TARGET_SRC_DIR)
148149
149150distclean : clean
150- make -C $(AMQP_CODEGEN_DIR ) distclean
151+ $( MAKE ) -C $(AMQP_CODEGEN_DIR ) distclean
151152 rm -rf dist
152153 find . -regex ' .*\(~\|#\|\.swp\|\.dump\)' -exec rm {} \;
153154
@@ -162,7 +163,8 @@ distclean: clean
162163
163164docs_all : $(MANPAGES )
164165
165- install : all docs_all
166+ install : SCRIPTS_REL_PATH=$(shell ./calculate-relative $(TARGET_DIR ) /sbin $(SBIN_DIR ) )
167+ install : all docs_all install_dirs
166168 @[ -n " $( TARGET_DIR) " ] || (echo " Please set TARGET_DIR." ; false)
167169 @[ -n " $( SBIN_DIR) " ] || (echo " Please set SBIN_DIR." ; false)
168170 @[ -n " $( MAN_DIR) " ] || (echo " Please set MAN_DIR." ; false)
@@ -171,13 +173,17 @@ install: all docs_all
171173 cp -r ebin include LICENSE LICENSE-MPL-RabbitMQ INSTALL $(TARGET_DIR)
172174
173175 chmod 0755 scripts/*
174- mkdir -p $(SBIN_DIR)
175- cp scripts/rabbitmq-server $(SBIN_DIR)
176- cp scripts/rabbitmqctl $( SBIN_DIR)
177- cp scripts/rabbitmq-multi $(SBIN_DIR)
176+ for script in rabbitmq-env rabbitmq-server rabbitmqctl rabbitmq-multi rabbitmq-activate-plugins; do \
177+ cp scripts/$$script $(TARGET_DIR)/sbin; \
178+ [ -e $(SBIN_DIR)/$$script ] || ln -s $(SCRIPTS_REL_PATH)/$$script $( SBIN_DIR)/$$script; \
179+ done
178180 for section in 1 5; do \
179181 mkdir -p $(MAN_DIR)/man$$section; \
180182 for manpage in docs/*.$$section.pod; do \
181183 cp docs/`basename $$manpage .pod`.gz $(MAN_DIR)/man$$section; \
182184 done; \
183185 done
186+
187+ install_dirs :
188+ mkdir -p $(SBIN_DIR )
189+ mkdir -p $(TARGET_DIR ) /sbin
0 commit comments