@@ -424,6 +424,16 @@ BUILT_INS += git-stage$X
424424BUILT_INS += git-status$X
425425BUILT_INS += git-whatchanged$X
426426
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+
427437# what 'all' will build and 'install' will install in gitexecdir,
428438# excluding programs for built-in commands
429439ALL_PROGRAMS = $(PROGRAMS ) $(SCRIPTS )
@@ -1097,7 +1107,7 @@ else
10971107 else
10981108 CURL_LIBCURL = -lcurl
10991109 endif
1100- PROGRAMS += git-remote-curl$X git-http-fetch$X
1110+ PROGRAMS += $(REMOTE_CURL_NAMES) git-http-fetch$X
11011111 curl_check := $(shell (echo 070908; curl-config --vernum) | sort -r | sed -ne 2p)
11021112 ifeq "$(curl_check)" "070908"
11031113 ifndef NO_EXPAT
@@ -1676,7 +1686,13 @@ git-http-push$X: revision.o http.o http-push.o $(GITLIBS)
16761686 $(QUIET_LINK )$(CC ) $(ALL_CFLAGS ) -o $@ $(ALL_LDFLAGS ) $(filter % .o,$^ ) \
16771687 $(LIBS ) $(CURL_LIBCURL ) $(EXPAT_LIBEXPAT )
16781688
1679- git-remote-curl$X : remote-curl.o http.o http-walker.o $(GITLIBS )
1689+ $(REMOTE_CURL_ALIASES ) : $(REMOTE_CURL_PRIMARY )
1690+ $(QUIET_LNCP )$(RM ) $@ && \
1691+ ln $< $@ 2> /dev/null || \
1692+ ln -s $< $@ 2> /dev/null || \
1693+ cp $< $@
1694+
1695+ $(REMOTE_CURL_PRIMARY ) : remote-curl.o http.o http-walker.o $(GITLIBS )
16801696 $(QUIET_LINK )$(CC ) $(ALL_CFLAGS ) -o $@ $(ALL_LDFLAGS ) $(filter % .o,$^ ) \
16811697 $(LIBS ) $(CURL_LIBCURL ) $(EXPAT_LIBEXPAT )
16821698
@@ -1852,6 +1868,7 @@ endif
18521868ifneq (,$X)
18531869 $(foreach p,$(patsubst %$X,%,$(filter %$X,$(ALL_PROGRAMS) $(BUILT_INS) git$X)), test '$(DESTDIR_SQ)$(gitexec_instdir_SQ)/$p' -ef '$(DESTDIR_SQ)$(gitexec_instdir_SQ)/$p$X' || $(RM) '$(DESTDIR_SQ)$(gitexec_instdir_SQ)/$p';)
18541870endif
1871+
18551872 bindir=$$(cd '$(DESTDIR_SQ)$(bindir_SQ)' && pwd) && \
18561873 execdir=$$(cd '$(DESTDIR_SQ)$(gitexec_instdir_SQ)' && pwd) && \
18571874 { test "$$bindir/" = "$$execdir/" || \
@@ -1865,6 +1882,12 @@ endif
18651882 ln -s "git$X" "$$execdir/$$p" 2>/dev/null || \
18661883 cp "$$execdir/git$X" "$$execdir/$$p" || exit; \
18671884 done; } && \
1885+ { for p in $(REMOTE_CURL_ALIASES); do \
1886+ $(RM) "$$execdir/$$p" && \
1887+ ln "$$execdir/git-remote-http$X" "$$execdir/$$p" 2>/dev/null || \
1888+ ln -s "git-remote-http$X" "$$execdir/$$p" 2>/dev/null || \
1889+ cp "$$execdir/git-remote-http$X" "$$execdir/$$p" || exit; \
1890+ done; } && \
18681891 ./check_bindir "z$$bindir" "z$$execdir" "$$bindir/git-add$X"
18691892
18701893install-doc :
0 commit comments