Skip to content

Commit

Permalink
Decide whether to build http-push in the Makefile
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Nick Hengeveld authored and Junio C Hamano committed Nov 20, 2005
1 parent 11979b9 commit 0890098
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 12 deletions.
9 changes: 6 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -242,9 +242,12 @@ ifndef NO_CURL
CURL_LIBCURL = -lcurl
endif
PROGRAMS += git-http-fetch$X
ifndef NO_EXPAT
EXPAT_LIBEXPAT = -lexpat
PROGRAMS += git-http-push$X
curl_check := $(shell (echo 070908; curl-config --vernum) | sort -r | sed -ne 2p)
ifeq "$(curl_check)" "070908"
ifndef NO_EXPAT
EXPAT_LIBEXPAT = -lexpat
PROGRAMS += git-http-push$X
endif
endif
endif

Expand Down
9 changes: 0 additions & 9 deletions http-push.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
#include "blob.h"
#include "http.h"

#ifdef USE_CURL_MULTI

#include <expat.h>

static const char http_push_usage[] =
Expand Down Expand Up @@ -1426,10 +1424,3 @@ int main(int argc, char **argv)

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

0 comments on commit 0890098

Please sign in to comment.