]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUILD: makefile: stop opening sub-shells for each and every command
authorWilly Tarreau <w@1wt.eu>
Fri, 19 Nov 2021 09:23:36 +0000 (10:23 +0100)
committerWilly Tarreau <w@1wt.eu>
Fri, 19 Nov 2021 10:24:19 +0000 (11:24 +0100)
commit9e3093c48a931f2fac7acb676eb38b54c472e9f0
tree580bc6b8d454e65f55e5f945b7c62f683ca53241
parente15ab932441fc078e09146bbde7c03cc79da950e
BUILD: makefile: stop opening sub-shells for each and every command

We're spending ~8% of the total build time calling a shell to display
"CC" using the "echo" command! We don't really need this, as make also
knows a "$(info ...)" command to print a message. However there's a catch,
this command trims leading spaces, so we need to use an invisible space
using "$ ". Furthermore, in GNU make 3.80 and older, $(info) doesn't show
anything, so we only do that for 3.81 and above, older versions continue
to use echo.

This measurably speeds up build time especially at -O0 that developers
use most of the time for quick checks.
Makefile