3838#
3939# Define NO_SETENV if you don't have setenv in the C library.
4040#
41+ # Define NO_MKDTEMP if you don't have mkdtemp in the C library.
42+ #
4143# Define NO_SYMLINK_HEAD if you never want .git/HEAD to be a symbolic link.
4244# Enable it on Windows. By default, symrefs are still used.
4345#
@@ -208,7 +210,6 @@ BASIC_LDFLAGS =
208210SCRIPT_SH = \
209211 git-bisect.sh git-checkout.sh \
210212 git-clean.sh git-clone.sh git-commit.sh \
211- git-fetch.sh \
212213 git-ls-remote.sh \
213214 git-merge-one-file.sh git-mergetool.sh git-parse-remote.sh \
214215 git-pull.sh git-rebase.sh git-rebase--interactive.sh \
@@ -235,14 +236,14 @@ SCRIPTS = $(patsubst %.sh,%,$(SCRIPT_SH)) \
235236# ... and all the rest that could be moved out of bindir to gitexecdir
236237PROGRAMS = \
237238 git-fetch-pack$X \
238- git-hash-object$X git-index-pack$X git-local-fetch$X \
239+ git-hash-object$X git-index-pack$X \
239240 git-fast-import$X \
240241 git-daemon$X \
241242 git-merge-index$X git-mktag$X git-mktree$X git-patch-id$X \
242243 git-peek-remote$X git-receive-pack$X \
243244 git-send-pack$X git-shell$X \
244- git-show-index$X git-ssh-fetch$X \
245- git-ssh-upload$X git- unpack-file$X \
245+ git-show-index$X \
246+ git-unpack-file$X \
246247 git-update-server-info$X \
247248 git-upload-pack$X \
248249 git-pack-redundant$X git-var$X \
@@ -270,9 +271,6 @@ ifndef NO_TCLTK
270271OTHER_PROGRAMS += gitk-wish
271272endif
272273
273- # Backward compatibility -- to be removed after 1.0
274- PROGRAMS += git-ssh-pull$X git-ssh-push$X
275-
276274# Set paths to tools early so that they can be used for version tests.
277275ifndef SHELL_PATH
278276 SHELL_PATH = /bin/sh
@@ -292,7 +290,7 @@ LIB_H = \
292290 run-command.h strbuf.h tag.h tree.h git-compat-util.h revision.h \
293291 tree-walk.h log-tree.h dir.h path-list.h unpack-trees.h builtin.h \
294292 utf8.h reflog-walk.h patch-ids.h attr.h decorate.h progress.h \
295- mailmap.h remote.h
293+ mailmap.h remote.h transport.h
296294
297295DIFF_OBJS = \
298296 diff.o diff-lib.o diffcore-break.o diffcore-order.o \
@@ -314,7 +312,8 @@ LIB_OBJS = \
314312 write_or_die.o trace.o list-objects.o grep.o match-trees.o \
315313 alloc.o merge-file.o path-list.o help.o unpack-trees.o $(DIFF_OBJS ) \
316314 color.o wt-status.o archive-zip.o archive-tar.o shallow.o utf8.o \
317- convert.o attr.o decorate.o progress.o mailmap.o symlinks.o remote.o
315+ convert.o attr.o decorate.o progress.o mailmap.o symlinks.o remote.o \
316+ transport.o bundle.o walker.o
318317
319318BUILTIN_OBJS = \
320319 builtin-add.o \
@@ -335,6 +334,8 @@ BUILTIN_OBJS = \
335334 builtin-diff-files.o \
336335 builtin-diff-index.o \
337336 builtin-diff-tree.o \
337+ builtin-fetch.o \
338+ builtin-fetch-pack.o \
338339 builtin-fetch--tool.o \
339340 builtin-fmt-merge-msg.o \
340341 builtin-for-each-ref.o \
@@ -416,12 +417,14 @@ ifeq ($(uname_S),SunOS)
416417 NEEDS_LIBICONV = YesPlease
417418 NO_UNSETENV = YesPlease
418419 NO_SETENV = YesPlease
420+ NO_MKDTEMP = YesPlease
419421 NO_C99_FORMAT = YesPlease
420422 NO_STRTOUMAX = YesPlease
421423 endif
422424 ifeq ($(uname_R),5.9)
423425 NO_UNSETENV = YesPlease
424426 NO_SETENV = YesPlease
427+ NO_MKDTEMP = YesPlease
425428 NO_C99_FORMAT = YesPlease
426429 NO_STRTOUMAX = YesPlease
427430 endif
@@ -518,15 +521,19 @@ else
518521 CC_LD_DYNPATH = -R
519522endif
520523
521- ifndef NO_CURL
524+ ifdef NO_CURL
525+ BASIC_CFLAGS += -DNO_CURL
526+ else
522527 ifdef CURLDIR
523528 # Try "-Wl,-rpath=$(CURLDIR)/$(lib)" in such a case.
524529 BASIC_CFLAGS += -I$(CURLDIR)/include
525530 CURL_LIBCURL = -L$(CURLDIR)/$(lib) $(CC_LD_DYNPATH)$(CURLDIR)/$(lib) -lcurl
526531 else
527532 CURL_LIBCURL = -lcurl
528533 endif
529- PROGRAMS += git-http-fetch$X
534+ BUILTIN_OBJS += builtin-http-fetch.o
535+ EXTLIBS += $(CURL_LIBCURL)
536+ LIB_OBJS += http.o http-walker.o
530537 curl_check := $(shell (echo 070908; curl-config --vernum) | sort -r | sed -ne 2p)
531538 ifeq "$(curl_check)" "070908"
532539 ifndef NO_EXPAT
@@ -608,6 +615,10 @@ ifdef NO_SETENV
608615 COMPAT_CFLAGS += -DNO_SETENV
609616 COMPAT_OBJS += compat/setenv.o
610617endif
618+ ifdef NO_MKDTEMP
619+ COMPAT_CFLAGS += -DNO_MKDTEMP
620+ COMPAT_OBJS += compat/mkdtemp.o
621+ endif
611622ifdef NO_UNSETENV
612623 COMPAT_CFLAGS += -DNO_UNSETENV
613624 COMPAT_OBJS += compat/unsetenv.o
@@ -889,33 +900,22 @@ http.o: http.c GIT-CFLAGS
889900 $(QUIET_CC )$(CC ) -o $* .o -c $(ALL_CFLAGS ) -DGIT_USER_AGENT=' "git/$(GIT_VERSION)"' $<
890901
891902ifdef NO_EXPAT
892- http-fetch .o : http-fetch .c http.h GIT-CFLAGS
903+ http-walker .o : http-walker .c http.h GIT-CFLAGS
893904 $(QUIET_CC )$(CC ) -o $* .o -c $(ALL_CFLAGS ) -DNO_EXPAT $<
894905endif
895906
896907git-% $X : % .o $(GITLIBS )
897908 $(QUIET_LINK )$(CC ) $(ALL_CFLAGS ) -o $@ $(ALL_LDFLAGS ) $(filter % .o,$^ ) $(LIBS )
898909
899- ssh-pull.o : ssh-fetch.c
900- ssh-push.o : ssh-upload.c
901- git-local-fetch$X : fetch.o
902- git-ssh-fetch$X : rsh.o fetch.o
903- git-ssh-upload$X : rsh.o
904- git-ssh-pull$X : rsh.o fetch.o
905- git-ssh-push$X : rsh.o
906-
907910git-imap-send$X : imap-send.o $(LIB_FILE )
908911
909- http.o http-fetch.o http-push.o : http.h
910- git-http-fetch$X : fetch.o http.o http-fetch.o $(GITLIBS )
911- $(QUIET_LINK )$(CC ) $(ALL_CFLAGS ) -o $@ $(ALL_LDFLAGS ) $(filter % .o,$^ ) \
912- $(LIBS ) $(CURL_LIBCURL ) $(EXPAT_LIBEXPAT )
912+ http.o http-walker.o http-push.o : http.h
913913
914914git-http-push$X : revision.o http.o http-push.o $(GITLIBS )
915915 $(QUIET_LINK )$(CC ) $(ALL_CFLAGS ) -o $@ $(ALL_LDFLAGS ) $(filter % .o,$^ ) \
916916 $(LIBS ) $(CURL_LIBCURL ) $(EXPAT_LIBEXPAT )
917917
918- $(LIB_OBJS ) $(BUILTIN_OBJS ) fetch.o : $(LIB_H )
918+ $(LIB_OBJS ) $(BUILTIN_OBJS ) : $(LIB_H )
919919$(patsubst git-% $X,% .o,$(PROGRAMS ) ) : $(LIB_H ) $(wildcard * /* .h)
920920$(DIFF_OBJS ) : diffcore.h
921921
@@ -1131,8 +1131,7 @@ check-docs::
11311131 git-merge-octopus | git-merge-ours | git-merge-recursive | \
11321132 git-merge-resolve | git-merge-stupid | \
11331133 git-add--interactive | git-fsck-objects | git-init-db | \
1134- git-repo-config | git-fetch--tool | \
1135- git-ssh-pull | git-ssh-push ) continue ;; \
1134+ git-repo-config | git-fetch--tool ) continue ;; \
11361135 esac ; \
11371136 test -f " Documentation/$$ v.txt" || \
11381137 echo " no doc: $$ v" ; \
0 commit comments