@@ -424,6 +424,16 @@ BUILT_INS += git-stage$X
424
424
BUILT_INS += git-status$X
425
425
BUILT_INS += git-whatchanged$X
426
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
437
# what 'all' will build and 'install' will install in gitexecdir,
428
438
# excluding programs for built-in commands
429
439
ALL_PROGRAMS = $(PROGRAMS ) $(SCRIPTS )
@@ -1097,7 +1107,7 @@ else
1097
1107
else
1098
1108
CURL_LIBCURL = -lcurl
1099
1109
endif
1100
- PROGRAMS += git-remote-curl$X git-http-fetch$X
1110
+ PROGRAMS += $(REMOTE_CURL_NAMES) git-http-fetch$X
1101
1111
curl_check := $(shell (echo 070908; curl-config --vernum) | sort -r | sed -ne 2p)
1102
1112
ifeq "$(curl_check)" "070908"
1103
1113
ifndef NO_EXPAT
@@ -1676,7 +1686,13 @@ git-http-push$X: revision.o http.o http-push.o $(GITLIBS)
1676
1686
$(QUIET_LINK )$(CC ) $(ALL_CFLAGS ) -o $@ $(ALL_LDFLAGS ) $(filter % .o,$^ ) \
1677
1687
$(LIBS ) $(CURL_LIBCURL ) $(EXPAT_LIBEXPAT )
1678
1688
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 )
1680
1696
$(QUIET_LINK )$(CC ) $(ALL_CFLAGS ) -o $@ $(ALL_LDFLAGS ) $(filter % .o,$^ ) \
1681
1697
$(LIBS ) $(CURL_LIBCURL ) $(EXPAT_LIBEXPAT )
1682
1698
@@ -1852,6 +1868,7 @@ endif
1852
1868
ifneq (,$X)
1853
1869
$(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';)
1854
1870
endif
1871
+
1855
1872
bindir=$$(cd '$(DESTDIR_SQ)$(bindir_SQ)' && pwd) && \
1856
1873
execdir=$$(cd '$(DESTDIR_SQ)$(gitexec_instdir_SQ)' && pwd) && \
1857
1874
{ test "$$bindir/" = "$$execdir/" || \
@@ -1865,6 +1882,12 @@ endif
1865
1882
ln -s "git$X" "$$execdir/$$p" 2>/dev/null || \
1866
1883
cp "$$execdir/git$X" "$$execdir/$$p" || exit; \
1867
1884
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; } && \
1868
1891
./check_bindir "z$$bindir" "z$$execdir" "$$bindir/git-add$X"
1869
1892
1870
1893
install-doc :
0 commit comments