aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorTom G. Christensen <tgc@statsbiblioteket.dk>2015-01-30 10:52:34 +0100
committerJunio C Hamano <gitster@pobox.com>2015-02-03 18:30:24 -0800
commit3af67924e03ddb29a2b698266a9f27ef30cd663b (patch)
tree33fe6180b0078d070b24bc353718d92537bebca9 /Makefile
parent15598cf41beed0d86cd2ac443e0f69c5a3b40321 (diff)
downloadgit-3af67924e03ddb29a2b698266a9f27ef30cd663b.tar.gz
git-3af67924e03ddb29a2b698266a9f27ef30cd663b.tar.xz
Makefile: handle broken curl version number in version check
curl 7.11.0 through 7.12.2 when built from their official release archives will present a 5 digit version number instead of the documented 6 digits which breaks the version check in the Makefile. Correct these broken version numbers on the fly when extracting them to ensure the comparison works correctly. [jc: shortened the new sed scripts a bit] Signed-off-by: Tom G. Christensen <tgc@statsbiblioteket.dk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile4
1 files changed, 2 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index c44eb3a85..20058f1de 100644
--- a/Makefile
+++ b/Makefile
@@ -1035,13 +1035,13 @@ else
REMOTE_CURL_NAMES = $(REMOTE_CURL_PRIMARY) $(REMOTE_CURL_ALIASES)
PROGRAM_OBJS += http-fetch.o
PROGRAMS += $(REMOTE_CURL_NAMES)
- curl_check := $(shell (echo 070908; curl-config --vernum) 2>/dev/null | sort -r | sed -ne 2p)
+ curl_check := $(shell (echo 070908; curl-config --vernum | sed -e '/^70[BC]/s/^/0/') 2>/dev/null | sort -r | sed -ne 2p)
ifeq "$(curl_check)" "070908"
ifndef NO_EXPAT
PROGRAM_OBJS += http-push.o
endif
endif
- curl_check := $(shell (echo 072200; curl-config --vernum) 2>/dev/null | sort -r | sed -ne 2p)
+ curl_check := $(shell (echo 072200; curl-config --vernum | sed -e '/^70[BC]/s/^/0/') 2>/dev/null | sort -r | sed -ne 2p)
ifeq "$(curl_check)" "072200"
USE_CURL_FOR_IMAP_SEND = YesPlease
endif