summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2020-05-01 20:39:49 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-05-01 20:39:49 (GMT)
commit5fd02fc191fe83e801b35deb2682714279df2fca (patch)
treeb02680f04f01d6abda2bf84862c25e7d1e4ec251
parentd61d20c9b413225793f8a0b491bbbec61c184e26 (diff)
parent0573831950d02db0c2932708eadd9f765e5773a6 (diff)
downloadgit-5fd02fc191fe83e801b35deb2682714279df2fca.zip
git-5fd02fc191fe83e801b35deb2682714279df2fca.tar.gz
git-5fd02fc191fe83e801b35deb2682714279df2fca.tar.bz2
Merge branch 'jk/build-with-right-curl'
The build procedure did not use the libcurl library and its include files correctly for a custom-built installation. * jk/build-with-right-curl: Makefile: avoid running curl-config unnecessarily Makefile: use curl-config --cflags Makefile: avoid running curl-config multiple times
-rw-r--r--Makefile15
1 files changed, 10 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index a16f4f5..2cf7d8b 100644
--- a/Makefile
+++ b/Makefile
@@ -1355,17 +1355,22 @@ ifdef NO_CURL
else
ifdef CURLDIR
# Try "-Wl,-rpath=$(CURLDIR)/$(lib)" in such a case.
- BASIC_CFLAGS += -I$(CURLDIR)/include
+ CURL_CFLAGS = -I$(CURLDIR)/include
CURL_LIBCURL = -L$(CURLDIR)/$(lib) $(CC_LD_DYNPATH)$(CURLDIR)/$(lib)
else
+ CURL_CFLAGS =
CURL_LIBCURL =
endif
-ifdef CURL_LDFLAGS
+ ifndef CURL_LDFLAGS
+ CURL_LDFLAGS = $(eval CURL_LDFLAGS := $$(shell $$(CURL_CONFIG) --libs))$(CURL_LDFLAGS)
+ endif
CURL_LIBCURL += $(CURL_LDFLAGS)
-else
- CURL_LIBCURL += $(shell $(CURL_CONFIG) --libs)
-endif
+
+ ifndef CURL_CFLAGS
+ CURL_CFLAGS = $(eval CURL_CFLAGS := $$(shell $$(CURL_CONFIG) --cflags))$(CURL_CFLAGS)
+ endif
+ BASIC_CFLAGS += $(CURL_CFLAGS)
REMOTE_CURL_PRIMARY = git-remote-http$X
REMOTE_CURL_ALIASES = git-remote-https$X git-remote-ftp$X git-remote-ftps$X