summaryrefslogtreecommitdiff
path: root/setup.c
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2020-04-04 14:58:29 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-04-05 21:50:04 (GMT)
commit0573831950d02db0c2932708eadd9f765e5773a6 (patch)
treeb3f100b3b35966bf7db93f61556cd870c5c78191 /setup.c
parent897d68e7af82824e0c9e15d3c4af1a8a71afc791 (diff)
downloadgit-0573831950d02db0c2932708eadd9f765e5773a6.zip
git-0573831950d02db0c2932708eadd9f765e5773a6.tar.gz
git-0573831950d02db0c2932708eadd9f765e5773a6.tar.bz2
Makefile: avoid running curl-config unnecessarily
Commit 94a88e2524 (Makefile: avoid running curl-config multiple times, 2020-03-26) put the call to $(CURL_CONFIG) into a "simple" variable which is expanded immediately, rather than expanding it each time it's needed. However, that also means that we expand it whenever the Makefile is parsed, whether we need it or not. This is wasteful, but also breaks the ci/test-documentation.sh job, as it does not have curl at all and complains about the extra messages to stderr. An easy way to see it is just: $ make CURL_CONFIG=does-not-work check-builtins make: does-not-work: Command not found make: does-not-work: Command not found GIT_VERSION = 2.26.0.108.gb3f3f45f29 make: does-not-work: Command not found make: does-not-work: Command not found ./check-builtins.sh We can get the best of both worlds if we're willing to accept a little Makefile hackery. Courtesy of the article at: http://make.mad-scientist.net/deferred-simple-variable-expansion/ this patch uses a lazily-evaluated recursive variable which replaces its contents with an immediately assigned simple one on first use. Reported-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'setup.c')
0 files changed, 0 insertions, 0 deletions