Makefile: honor NO_CURL when setting REMOTE_CURL_* variables
Previously, these variables were set before there was a chance to set NO_CURL. This made a difference only during 'make install', because by installing $(REMOTE_CURL_ALIASES), the rule tries to access $(REMOTE_CURL_PRIMARY), which was never installed. On Windows, this fails; on Unix, stale symbolic links are created. Signed-off-by: Johannes Sixt <j6t@kdbg.org> Acked-by: Ilari Liusvaara <ilari.liusvaara@elisanet.fi> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Johannes Sixt committed
Jan 19, 2010 at 16:39 UTC
4256f36c58238a1b2317372b37be889d75a93198
1 file changed
+6
-10
Makefile
+6
-10
@@ -424,16 +424,6 @@ BUILT_INS += git-stage$X
424
BUILT_INS += git-status$X
425
BUILT_INS += git-whatchanged$X
426
427
-ifdef NO_CURL
428
-REMOTE_CURL_PRIMARY =
429
-REMOTE_CURL_ALIASES =
430
-REMOTE_CURL_NAMES =
431
-else
432
-REMOTE_CURL_PRIMARY = git-remote-http$X
433
-REMOTE_CURL_ALIASES = git-remote-https$X git-remote-ftp$X git-remote-ftps$X
434
-REMOTE_CURL_NAMES = $(REMOTE_CURL_PRIMARY) $(REMOTE_CURL_ALIASES)
435
-endif
436
-
427
# what 'all' will build and 'install' will install in gitexecdir,
428
# excluding programs for built-in commands
429
ALL_PROGRAMS = $(PROGRAMS) $(SCRIPTS)
@@ -1112,6 +1102,9 @@ endif
1102
1103
ifdef NO_CURL
1104
BASIC_CFLAGS += -DNO_CURL
1105
+ REMOTE_CURL_PRIMARY =
1106
+ REMOTE_CURL_ALIASES =
1107
+ REMOTE_CURL_NAMES =
1108
else
1109
ifdef CURLDIR
1110
# Try "-Wl,-rpath=$(CURLDIR)/$(lib)" in such a case.
@@ -1120,6 +1113,9 @@ else
1113
else
1114
CURL_LIBCURL = -lcurl
1115
endif
1116
+ REMOTE_CURL_PRIMARY = git-remote-http$X
1117
+ REMOTE_CURL_ALIASES = git-remote-https$X git-remote-ftp$X git-remote-ftps$X
1118
+ REMOTE_CURL_NAMES = $(REMOTE_CURL_PRIMARY) $(REMOTE_CURL_ALIASES)
1119
PROGRAMS += $(REMOTE_CURL_NAMES) git-http-fetch$X
1120
curl_check := $(shell (echo 070908; curl-config --vernum) | sort -r | sed -ne 2p)
1121
ifeq "$(curl_check)" "070908"