@@ -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-5 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.4 " ]; 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,8 +98,8 @@ run-tests: all
10198start-background-node :
10299 $(BASIC_SCRIPT_ENVIRONMENT_SETTINGS ) \
103100 RABBITMQ_NODE_ONLY=true \
104- RABBITMQ_SERVER_START_ARGS=" $( RABBITMQ_SERVER_START_ARGS) " \
105- ./scripts/rabbitmq-server -detached ; sleep 1
101+ RABBITMQ_SERVER_START_ARGS=" $( RABBITMQ_SERVER_START_ARGS) -detached " \
102+ ./scripts/rabbitmq-server ; sleep 1
106103
107104start-rabbit-on-node : all
108105 echo " rabbit:start()." | $(ERL_CALL )
@@ -116,8 +113,11 @@ force-snapshot: all
116113stop-node :
117114 -$(ERL_CALL ) -q
118115
116+ # code coverage will be created for subdirectory "ebin" of COVER_DIR
117+ COVER_DIR =.
118+
119119start-cover : all
120- echo " cover:start(), rabbit_misc:enable_cover()." | $(ERL_CALL )
120+ echo " cover:start(), rabbit_misc:enable_cover([ \" $( COVER_DIR ) \" ] )." | $(ERL_CALL )
121121
122122stop-cover : all
123123 echo " rabbit_misc:report_cover(), cover:stop()." | $(ERL_CALL )
@@ -134,10 +134,10 @@ srcdist: distclean
134134 cp README.in $(TARGET_SRC_DIR ) /README
135135 elinks -dump -no-references -no-numbering $(WEB_URL ) build-server.html \
136136 >> $(TARGET_SRC_DIR ) /BUILD
137- sed -i.save ' s/%%VERSION %%/$(VERSION)/' $(TARGET_SRC_DIR ) /ebin/rabbit_app.in && rm -f $(TARGET_SRC_DIR ) /ebin/rabbit_app.in.save
137+ sed -i.save ' s/%%VSN %%/$(VERSION)/' $(TARGET_SRC_DIR ) /ebin/rabbit_app.in && rm -f $(TARGET_SRC_DIR ) /ebin/rabbit_app.in.save
138138
139139 cp -r $(AMQP_CODEGEN_DIR)/* $(TARGET_SRC_DIR)/codegen/
140- cp codegen.py Makefile generate_app $(TARGET_SRC_DIR)
140+ cp codegen.py Makefile generate_app calculate-relative $(TARGET_SRC_DIR)
141141
142142 cp -r scripts $(TARGET_SRC_DIR)
143143 cp -r docs $(TARGET_SRC_DIR)
@@ -148,7 +148,7 @@ srcdist: distclean
148148 rm -rf $(TARGET_SRC_DIR)
149149
150150distclean : clean
151- make -C $(AMQP_CODEGEN_DIR ) distclean
151+ $( MAKE ) -C $(AMQP_CODEGEN_DIR ) distclean
152152 rm -rf dist
153153 find . -regex ' .*\(~\|#\|\.swp\|\.dump\)' -exec rm {} \;
154154
@@ -163,7 +163,8 @@ distclean: clean
163163
164164docs_all : $(MANPAGES )
165165
166- install : all docs_all
166+ install : SCRIPTS_REL_PATH=$(shell ./calculate-relative $(TARGET_DIR ) /sbin $(SBIN_DIR ) )
167+ install : all docs_all install_dirs
167168 @[ -n " $( TARGET_DIR) " ] || (echo " Please set TARGET_DIR." ; false)
168169 @[ -n " $( SBIN_DIR) " ] || (echo " Please set SBIN_DIR." ; false)
169170 @[ -n " $( MAN_DIR) " ] || (echo " Please set MAN_DIR." ; false)
@@ -172,13 +173,17 @@ install: all docs_all
172173 cp -r ebin include LICENSE LICENSE-MPL-RabbitMQ INSTALL $(TARGET_DIR)
173174
174175 chmod 0755 scripts/*
175- mkdir -p $(SBIN_DIR)
176- cp scripts/rabbitmq-server $(SBIN_DIR)
177- cp scripts/rabbitmqctl $( SBIN_DIR)
178- 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
179180 for section in 1 5; do \
180181 mkdir -p $(MAN_DIR)/man$$section; \
181182 for manpage in docs/*.$$section.pod; do \
182183 cp docs/`basename $$manpage .pod`.gz $(MAN_DIR)/man$$section; \
183184 done; \
184185 done
186+
187+ install_dirs :
188+ mkdir -p $(SBIN_DIR )
189+ mkdir -p $(TARGET_DIR ) /sbin
0 commit comments