Decide whether to build http-push in the Makefile
The decision about whether to build http-push or not belongs in the Makefile. This follows Junio's suggestion to determine whether curl is new enough to support http-push. Signed-off-by: Nick Hengeveld <nickh@reactrix.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
parent
11979b98ad
commit
0890098780
9
Makefile
9
Makefile
@ -242,9 +242,12 @@ ifndef NO_CURL
|
|||||||
CURL_LIBCURL = -lcurl
|
CURL_LIBCURL = -lcurl
|
||||||
endif
|
endif
|
||||||
PROGRAMS += git-http-fetch$X
|
PROGRAMS += git-http-fetch$X
|
||||||
ifndef NO_EXPAT
|
curl_check := $(shell (echo 070908; curl-config --vernum) | sort -r | sed -ne 2p)
|
||||||
EXPAT_LIBEXPAT = -lexpat
|
ifeq "$(curl_check)" "070908"
|
||||||
PROGRAMS += git-http-push$X
|
ifndef NO_EXPAT
|
||||||
|
EXPAT_LIBEXPAT = -lexpat
|
||||||
|
PROGRAMS += git-http-push$X
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -6,8 +6,6 @@
|
|||||||
#include "blob.h"
|
#include "blob.h"
|
||||||
#include "http.h"
|
#include "http.h"
|
||||||
|
|
||||||
#ifdef USE_CURL_MULTI
|
|
||||||
|
|
||||||
#include <expat.h>
|
#include <expat.h>
|
||||||
|
|
||||||
static const char http_push_usage[] =
|
static const char http_push_usage[] =
|
||||||
@ -1426,10 +1424,3 @@ int main(int argc, char **argv)
|
|||||||
|
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
#else /* ifdef USE_CURL_MULTI */
|
|
||||||
int main(int argc, char **argv)
|
|
||||||
{
|
|
||||||
fprintf(stderr, "http-push requires curl 7.9.8 or higher.\n");
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
Loading…
Reference in New Issue
Block a user