Skip to content

Commit 4f1ea93

Browse files
author
Loïc Hoguin
committed
make: Restrict install-cli to the current working directory
Commit 5840834 introduced copying of scripts and escripts to the plugin currently being worked on. At some point after that, in recent weeks, the target would run for all applications being compiled, and not just the plugin we have asked Make to build. This led to increased build times. This change ensures the scripts and escripts are only copied for the directory we have ran Make in. So if we simply do "make" this is the top-level directory. If we do "make -C deps/rabbit" this is the rabbit application's directory. Doing this has a huge impact on performance when rebuilding with no changes done to the source code: make 6,63s user 2,60s system 106% cpu 8,668 total make 2,88s user 1,30s system 117% cpu 3,567 total And a less pronounced impact on specific applications (results will vary): make -C deps/rabbit 0,50s user 0,18s system 100% cpu 0,677 total make -C deps/rabbit 0,43s user 0,12s system 101% cpu 0,551 total
1 parent de8df83 commit 4f1ea93

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

deps/rabbit_common/mk/rabbitmq-dist.mk

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,10 +214,12 @@ do-dist:: $(DIST_EZS)
214214
CLI_SCRIPTS_LOCK = $(CLI_SCRIPTS_DIR).lock
215215
CLI_ESCRIPTS_LOCK = $(CLI_ESCRIPTS_DIR).lock
216216

217+
ifeq ($(MAKELEVEL),0)
217218
ifneq ($(filter-out rabbit_common amqp10_common rabbitmq_stream_common,$(PROJECT)),)
218219
app:: install-cli
219220
test-build:: install-cli
220221
endif
222+
endif
221223

222224
install-cli: install-cli-scripts install-cli-escripts
223225
@:

0 commit comments

Comments
 (0)