diff options
author | Jeff King <peff@peff.net> | 2020-03-26 04:06:45 -0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-03-27 15:11:53 -0700 |
commit | 94a88e2524a7243fe77d42faa5649e1c38d1b292 (patch) | |
tree | 7a1152a69d71d44a31f0767702a6ceb3b37a51c5 /Documentation/RelNotes/2.20.1.txt | |
parent | Git 2.26 (diff) | |
download | tgif-94a88e2524a7243fe77d42faa5649e1c38d1b292.tar.xz |
Makefile: avoid running curl-config multiple times
If the user hasn't set the CURL_LDFLAGS Makefile variable, we invoke
curl-config like this:
CURL_LIBCURL += $(shell $(CURL_CONFIG) --libs)
Because the shell function is run when the value is expanded, we invoke
curl-config each time we need to link something (which generally ends up
being four times for a full build).
Instead, let's use an immediate Makefile variable, which only needs
expanding once. We can't combine that with the existing "+=", but since
we only do this when CURL_LDFLAGS is undefined, we can just set that
variable.
That also allows us to simplify our conditional a bit, since both sides
will then put the result into CURL_LIBCURL. While we're touching it,
let's fix the indentation to match the nearby code (we're inside an
outer conditional, so everything else is indented one level).
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/RelNotes/2.20.1.txt')
0 files changed, 0 insertions, 0 deletions