1 # The default target of this Makefile is...
4 # Define V=1 to have a more verbose compile.
6 # Define SHELL_PATH to a POSIX shell if your /bin/sh is broken.
8 # Define SANE_TOOL_PATH to a colon-separated list of paths to prepend
9 # to PATH if your tools in /usr/bin are broken.
11 # Define SNPRINTF_RETURNS_BOGUS if your are on a system which snprintf()
12 # or vsnprintf() return -1 instead of number of characters which would
13 # have been written to the final string if enough space had been available.
15 # Define FREAD_READS_DIRECTORIES if your are on a system which succeeds
16 # when attempting to read from an fopen'ed directory.
18 # Define NO_OPENSSL environment variable if you do not have OpenSSL.
19 # This also implies BLK_SHA1.
21 # Define NO_CURL if you do not have libcurl installed. git-http-pull and
22 # git-http-push are not built, and you cannot use http:// and https://
25 # Define CURLDIR=/foo/bar if your curl header and library files are in
26 # /foo/bar/include and /foo/bar/lib directories.
28 # Define NO_EXPAT if you do not have expat installed. git-http-push is
29 # not built, and you cannot push using http:// and https:// transports.
31 # Define EXPATDIR=/foo/bar if your expat header and library files are in
32 # /foo/bar/include and /foo/bar/lib directories.
34 # Define NO_D_INO_IN_DIRENT if you don't have d_ino in your struct dirent.
36 # Define NO_D_TYPE_IN_DIRENT if your platform defines DT_UNKNOWN but lacks
37 # d_type in struct dirent (latest Cygwin -- will be fixed soonish).
39 # Define NO_C99_FORMAT if your formatted IO functions (printf/scanf et.al.)
40 # do not support the 'size specifiers' introduced by C99, namely ll, hh,
41 # j, z, t. (representing long long int, char, intmax_t, size_t, ptrdiff_t).
42 # some C compilers supported these specifiers prior to C99 as an extension.
44 # Define NO_STRCASESTR if you don't have strcasestr.
46 # Define NO_MEMMEM if you don't have memmem.
48 # Define NO_STRLCPY if you don't have strlcpy.
50 # Define NO_STRTOUMAX if you don't have strtoumax in the C library.
51 # If your compiler also does not support long long or does not have
52 # strtoull, define NO_STRTOULL.
54 # Define NO_SETENV if you don't have setenv in the C library.
56 # Define NO_UNSETENV if you don't have unsetenv in the C library.
58 # Define NO_MKDTEMP if you don't have mkdtemp in the C library.
60 # Define NO_MKSTEMPS if you don't have mkstemps in the C library.
62 # Define NO_LIBGEN_H if you don't have libgen.h.
64 # Define NEEDS_LIBGEN if your libgen needs -lgen when linking
66 # Define NO_SYS_SELECT_H if you don't have sys/select.h.
68 # Define NO_SYMLINK_HEAD if you never want .git/HEAD to be a symbolic link.
69 # Enable it on Windows. By default, symrefs are still used.
71 # Define NO_SVN_TESTS if you want to skip time-consuming SVN interoperability
72 # tests. These tests take up a significant amount of the total test time
73 # but are not needed unless you plan to talk to SVN repos.
75 # Define NO_FINK if you are building on Darwin/Mac OS X, have Fink
76 # installed in /sw, but don't want GIT to link against any libraries
77 # installed there. If defined you may specify your own (or Fink's)
78 # include directories and library directories by defining CFLAGS
79 # and LDFLAGS appropriately.
81 # Define NO_DARWIN_PORTS if you are building on Darwin/Mac OS X,
82 # have DarwinPorts installed in /opt/local, but don't want GIT to
83 # link against any libraries installed there. If defined you may
84 # specify your own (or DarwinPort's) include directories and
85 # library directories by defining CFLAGS and LDFLAGS appropriately.
87 # Define BLK_SHA1 environment variable if you want the C version
88 # of the SHA1 that assumes you can do unaligned 32-bit loads and
89 # have a fast htonl() function.
91 # Define PPC_SHA1 environment variable when running make to make use of
92 # a bundled SHA1 routine optimized for PowerPC.
94 # Define NEEDS_CRYPTO_WITH_SSL if you need -lcrypto when using -lssl (Darwin).
96 # Define NEEDS_SSL_WITH_CRYPTO if you need -lssl when using -lcrypto (Darwin).
98 # Define NEEDS_LIBICONV if linking with libc is not enough (Darwin).
100 # Define NEEDS_SOCKET if linking with libc is not enough (SunOS,
103 # Define NEEDS_RESOLV if linking with -lnsl and/or -lsocket is not enough.
104 # Notably on Solaris hstrerror resides in libresolv and on Solaris 7
105 # inet_ntop and inet_pton additionally reside there.
107 # Define NO_MMAP if you want to avoid mmap.
109 # Define NO_PTHREADS if you do not have or do not want to use Pthreads.
111 # Define NO_PREAD if you have a problem with pread() system call (e.g.
112 # cygwin.dll before v1.5.22).
114 # Define NO_FAST_WORKING_DIRECTORY if accessing objects in pack files is
115 # generally faster on your platform than accessing the working directory.
117 # Define NO_TRUSTABLE_FILEMODE if your filesystem may claim to support
118 # the executable mode bit, but doesn't really do so.
120 # Define NO_IPV6 if you lack IPv6 support and getaddrinfo().
122 # Define NO_SOCKADDR_STORAGE if your platform does not have struct
125 # Define NO_ICONV if your libc does not properly support iconv.
127 # Define OLD_ICONV if your library has an old iconv(), where the second
128 # (input buffer pointer) parameter is declared with type (const char **).
130 # Define NO_DEFLATE_BOUND if your zlib does not have deflateBound.
132 # Define NO_R_TO_GCC_LINKER if your gcc does not like "-R/path/lib"
133 # that tells runtime paths to dynamic libraries;
134 # "-Wl,-rpath=/path/lib" is used instead.
136 # Define USE_NSEC below if you want git to care about sub-second file mtimes
137 # and ctimes. Note that you need recent glibc (at least 2.2.4) for this, and
138 # it will BREAK YOUR LOCAL DIFFS! show-diff and anything using it will likely
139 # randomly break unless your underlying filesystem supports those sub-second
140 # times (my ext3 doesn't).
142 # Define USE_ST_TIMESPEC if your "struct stat" uses "st_ctimespec" instead of
145 # Define NO_NSEC if your "struct stat" does not have "st_ctim.tv_nsec"
146 # available. This automatically turns USE_NSEC off.
148 # Define USE_STDEV below if you want git to care about the underlying device
149 # change being considered an inode change from the update-index perspective.
151 # Define NO_ST_BLOCKS_IN_STRUCT_STAT if your platform does not have st_blocks
152 # field that counts the on-disk footprint in 512-byte blocks.
154 # Define ASCIIDOC8 if you want to format documentation with AsciiDoc 8
156 # Define DOCBOOK_XSL_172 if you want to format man pages with DocBook XSL v1.72
157 # (not v1.73 or v1.71).
159 # Define ASCIIDOC_NO_ROFF if your DocBook XSL escapes raw roff directives
160 # (versions 1.72 and later and 1.68.1 and earlier).
162 # Define GNU_ROFF if your target system uses GNU groff. This forces
163 # apostrophes to be ASCII so that cut&pasting examples to the shell
166 # Define NO_PERL_MAKEMAKER if you cannot use Makefiles generated by perl's
167 # MakeMaker (e.g. using ActiveState under Cygwin).
169 # Define NO_PERL if you do not want Perl scripts or libraries at all.
171 # Define NO_PYTHON if you do not want Python scripts or libraries at all.
173 # Define NO_TCLTK if you do not want Tcl/Tk GUI.
175 # The TCL_PATH variable governs the location of the Tcl interpreter
176 # used to optimize git-gui for your system. Only used if NO_TCLTK
177 # is not set. Defaults to the bare 'tclsh'.
179 # The TCLTK_PATH variable governs the location of the Tcl/Tk interpreter.
180 # If not set it defaults to the bare 'wish'. If it is set to the empty
181 # string then NO_TCLTK will be forced (this is used by configure script).
183 # Define THREADED_DELTA_SEARCH if you have pthreads and wish to exploit
184 # parallel delta searching when packing objects.
186 # Define INTERNAL_QSORT to use Git's implementation of qsort(), which
187 # is a simplified version of the merge sort used in glibc. This is
188 # recommended if Git triggers O(n^2) behavior in your platform's qsort().
190 # Define UNRELIABLE_FSTAT if your system's fstat does not return the same
191 # information on a not yet closed file that lstat would return for the same
192 # file after it was closed.
194 # Define OBJECT_CREATION_USES_RENAMES if your operating systems has problems
195 # when hardlinking a file to another name and unlinking the original file right
196 # away (some NTFS drivers seem to zero the contents in that scenario).
198 # Define NO_CROSS_DIRECTORY_HARDLINKS if you plan to distribute the installed
199 # programs as a tar, where bin/ and libexec/ might be on different file systems.
201 # Define USE_NED_ALLOCATOR if you want to replace the platforms default
202 # memory allocators with the nedmalloc allocator written by Niall Douglas.
204 # Define NO_REGEX if you have no or inferior regex support in your C library.
206 # Define JSMIN to point to JavaScript minifier that functions as
207 # a filter to have gitweb.js minified.
209 # Define DEFAULT_PAGER to a sensible pager command (defaults to "less") if
210 # you want to use something different. The value will be interpreted by the
211 # shell at runtime when it is used.
213 # Define DEFAULT_EDITOR to a sensible editor command (defaults to "vi") if you
214 # want to use something different. The value will be interpreted by the shell
215 # if necessary when it is used. Examples:
217 # DEFAULT_EDITOR='~/bin/vi',
218 # DEFAULT_EDITOR='$GIT_FALLBACK_EDITOR',
219 # DEFAULT_EDITOR='"C:\Program Files\Vim\gvim.exe" --nofork'
221 # Define COMPUTE_HEADER_DEPENDENCIES if your compiler supports the -MMD option
222 # and you want to avoid rebuilding objects when an unrelated header file
225 # Define CHECK_HEADER_DEPENDENCIES to check for problems in the hard-coded
228 GIT-VERSION-FILE
: FORCE
229 @
$(SHELL_PATH
) .
/GIT-VERSION-GEN
230 -include GIT-VERSION-FILE
232 uname_S
:= $(shell sh
-c
'uname -s 2>/dev/null || echo not')
233 uname_M
:= $(shell sh
-c
'uname -m 2>/dev/null || echo not')
234 uname_O
:= $(shell sh
-c
'uname -o 2>/dev/null || echo not')
235 uname_R
:= $(shell sh
-c
'uname -r 2>/dev/null || echo not')
236 uname_P
:= $(shell sh
-c
'uname -p 2>/dev/null || echo not')
237 uname_V
:= $(shell sh
-c
'uname -v 2>/dev/null || echo not')
240 # avoid the MingW and Cygwin configuration sections
245 # CFLAGS and LDFLAGS are for the users to override from the command line.
247 CFLAGS
= -g
-O2
-Wall
249 ALL_CFLAGS
= $(CFLAGS
)
250 ALL_LDFLAGS
= $(LDFLAGS
)
253 # Among the variables below, these:
259 # ETC_GITCONFIG (but not sysconfdir)
260 # can be specified as a relative path some/where/else;
261 # this is interpreted as relative to $(prefix) and "git" at
262 # runtime figures out where they are based on the path to the executable.
263 # This can help installing the suite in a relocatable way.
266 bindir_relative
= bin
267 bindir = $(prefix)/$(bindir_relative
)
270 gitexecdir
= libexec
/git-core
271 sharedir
= $(prefix)/share
272 template_dir
= share
/git-core
/templates
273 htmldir
= share
/doc
/git-doc
274 ifeq ($(prefix),/usr
)
276 ETC_GITCONFIG
= $(sysconfdir
)/gitconfig
278 sysconfdir
= $(prefix)/etc
279 ETC_GITCONFIG
= etc
/gitconfig
285 # JavaScript minifier invocation that can function as filter
288 # default configuration for gitweb
289 GITWEB_CONFIG
= gitweb_config.perl
290 GITWEB_CONFIG_SYSTEM
= /etc
/gitweb.conf
291 GITWEB_HOME_LINK_STR
= projects
293 GITWEB_PROJECTROOT
= /pub
/git
294 GITWEB_PROJECT_MAXDEPTH
= 2007
296 GITWEB_STRICT_EXPORT
=
299 GITWEB_HOMETEXT
= indextext.html
300 GITWEB_CSS
= gitweb.css
301 GITWEB_LOGO
= git-logo.png
302 GITWEB_FAVICON
= git-favicon.png
304 GITWEB_JS
= gitweb.min.js
306 GITWEB_JS
= gitweb.js
311 export prefix bindir sharedir sysconfdir
322 PTHREAD_LIBS
= -lpthread
324 export TCL_PATH TCLTK_PATH
326 # sparse is architecture-neutral, which means that we need to tell it
327 # explicitly what architecture to check for. Fix this up for yours..
328 SPARSE_FLAGS
= -D__BIG_ENDIAN__
-D__powerpc__
332 ### --- END CONFIGURATION SECTION ---
334 # Those must not be GNU-specific; they are shared with perl/ which may
335 # be built by a different compiler. (Note that this is an artifact now
336 # but it still might be nice to keep that distinction.)
340 # Guard against environment variables
352 TEST_PROGRAMS_NEED_X
=
354 SCRIPT_SH
+= git-am.sh
355 SCRIPT_SH
+= git-bisect.sh
356 SCRIPT_SH
+= git-difftool--helper.sh
357 SCRIPT_SH
+= git-filter-branch.sh
358 SCRIPT_SH
+= git-lost-found.sh
359 SCRIPT_SH
+= git-merge-octopus.sh
360 SCRIPT_SH
+= git-merge-one-file.sh
361 SCRIPT_SH
+= git-merge-resolve.sh
362 SCRIPT_SH
+= git-mergetool.sh
363 SCRIPT_SH
+= git-mergetool--lib.sh
364 SCRIPT_SH
+= git-notes.sh
365 SCRIPT_SH
+= git-parse-remote.sh
366 SCRIPT_SH
+= git-pull.sh
367 SCRIPT_SH
+= git-quiltimport.sh
368 SCRIPT_SH
+= git-rebase--interactive.sh
369 SCRIPT_SH
+= git-rebase.sh
370 SCRIPT_SH
+= git-repack.sh
371 SCRIPT_SH
+= git-request-pull.sh
372 SCRIPT_SH
+= git-sh-setup.sh
373 SCRIPT_SH
+= git-stash.sh
374 SCRIPT_SH
+= git-submodule.sh
375 SCRIPT_SH
+= git-web--browse.sh
377 SCRIPT_PERL
+= git-add--interactive.perl
378 SCRIPT_PERL
+= git-difftool.perl
379 SCRIPT_PERL
+= git-archimport.perl
380 SCRIPT_PERL
+= git-cvsexportcommit.perl
381 SCRIPT_PERL
+= git-cvsimport.perl
382 SCRIPT_PERL
+= git-cvsserver.perl
383 SCRIPT_PERL
+= git-relink.perl
384 SCRIPT_PERL
+= git-send-email.perl
385 SCRIPT_PERL
+= git-svn.perl
387 SCRIPTS
= $(patsubst %.sh
,%,$(SCRIPT_SH
)) \
388 $(patsubst %.perl
,%,$(SCRIPT_PERL
)) \
389 $(patsubst %.py
,%,$(SCRIPT_PYTHON
)) \
395 # ... and all the rest that could be moved out of bindir to gitexecdir
396 PROGRAMS
+= $(EXTRA_PROGRAMS
)
398 PROGRAM_OBJS
+= fast-import.o
399 PROGRAM_OBJS
+= imap-send.o
400 PROGRAM_OBJS
+= shell.o
401 PROGRAM_OBJS
+= show-index.o
402 PROGRAM_OBJS
+= upload-pack.o
403 PROGRAM_OBJS
+= http-backend.o
405 PROGRAMS
+= $(patsubst %.o
,git-
%$X,$(PROGRAM_OBJS
))
407 TEST_PROGRAMS_NEED_X
+= test-chmtime
408 TEST_PROGRAMS_NEED_X
+= test-ctype
409 TEST_PROGRAMS_NEED_X
+= test-date
410 TEST_PROGRAMS_NEED_X
+= test-delta
411 TEST_PROGRAMS_NEED_X
+= test-dump-cache-tree
412 TEST_PROGRAMS_NEED_X
+= test-genrandom
413 TEST_PROGRAMS_NEED_X
+= test-match-trees
414 TEST_PROGRAMS_NEED_X
+= test-parse-options
415 TEST_PROGRAMS_NEED_X
+= test-path-utils
416 TEST_PROGRAMS_NEED_X
+= test-run-command
417 TEST_PROGRAMS_NEED_X
+= test-sha1
418 TEST_PROGRAMS_NEED_X
+= test-sigchain
419 TEST_PROGRAMS_NEED_X
+= test-index-version
421 TEST_PROGRAMS
:= $(patsubst %,%$X,$(TEST_PROGRAMS_NEED_X
))
423 # List built-in command $C whose implementation cmd_$C() is not in
424 # builtin-$C.o but is linked in as part of some other command.
425 BUILT_INS
+= $(patsubst builtin-
%.o
,git-
%$X,$(BUILTIN_OBJS
))
427 BUILT_INS
+= git-cherry
$X
428 BUILT_INS
+= git-cherry-pick
$X
429 BUILT_INS
+= git-format-patch
$X
430 BUILT_INS
+= git-fsck-objects
$X
431 BUILT_INS
+= git-get-tar-commit-id
$X
432 BUILT_INS
+= git-init
$X
433 BUILT_INS
+= git-merge-subtree
$X
434 BUILT_INS
+= git-peek-remote
$X
435 BUILT_INS
+= git-repo-config
$X
436 BUILT_INS
+= git-show
$X
437 BUILT_INS
+= git-stage
$X
438 BUILT_INS
+= git-status
$X
439 BUILT_INS
+= git-whatchanged
$X
441 # what 'all' will build and 'install' will install in gitexecdir,
442 # excluding programs for built-in commands
443 ALL_PROGRAMS
= $(PROGRAMS
) $(SCRIPTS
)
445 # what 'all' will build but not install in gitexecdir
446 OTHER_PROGRAMS
= git
$X
448 # what test wrappers are needed and 'install' will install, in bindir
449 BINDIR_PROGRAMS_NEED_X
+= git
450 BINDIR_PROGRAMS_NEED_X
+= git-upload-pack
451 BINDIR_PROGRAMS_NEED_X
+= git-receive-pack
452 BINDIR_PROGRAMS_NEED_X
+= git-upload-archive
453 BINDIR_PROGRAMS_NEED_X
+= git-shell
455 BINDIR_PROGRAMS_NO_X
+= git-cvsserver
457 # Set paths to tools early so that they can be used for version tests.
462 PERL_PATH
= /usr
/bin
/perl
465 PYTHON_PATH
= /usr
/bin
/python
472 XDIFF_LIB
=xdiff
/lib.a
480 LIB_H
+= cache-tree.h
483 LIB_H
+= compat
/bswap.h
484 LIB_H
+= compat
/cygwin.h
485 LIB_H
+= compat
/mingw.h
486 LIB_H
+= compat
/win32
/pthread.h
495 LIB_H
+= git-compat-util.h
500 LIB_H
+= levenshtein.h
501 LIB_H
+= list-objects.h
505 LIB_H
+= merge-recursive.h
510 LIB_H
+= pack-revindex.h
511 LIB_H
+= parse-options.h
516 LIB_H
+= reflog-walk.h
520 LIB_H
+= resolve-undo.h
522 LIB_H
+= run-command.h
523 LIB_H
+= sha1-lookup.h
527 LIB_H
+= string-list.h
533 LIB_H
+= unpack-trees.h
536 LIB_H
+= xdiff-interface.h
537 LIB_H
+= xdiff
/xdiff.h
539 LIB_OBJS
+= abspath.o
543 LIB_OBJS
+= archive.o
544 LIB_OBJS
+= archive-tar.o
545 LIB_OBJS
+= archive-zip.o
552 LIB_OBJS
+= cache-tree.o
554 LIB_OBJS
+= combine-diff.o
557 LIB_OBJS
+= connect.o
558 LIB_OBJS
+= convert.o
560 LIB_OBJS
+= csum-file.o
563 LIB_OBJS
+= decorate.o
564 LIB_OBJS
+= diffcore-break.o
565 LIB_OBJS
+= diffcore-delta.o
566 LIB_OBJS
+= diffcore-order.o
567 LIB_OBJS
+= diffcore-pickaxe.o
568 LIB_OBJS
+= diffcore-rename.o
569 LIB_OBJS
+= diff-delta.o
570 LIB_OBJS
+= diff-lib.o
571 LIB_OBJS
+= diff-no-index.o
576 LIB_OBJS
+= environment.o
577 LIB_OBJS
+= exec_cmd.o
585 LIB_OBJS
+= levenshtein.o
586 LIB_OBJS
+= list-objects.o
587 LIB_OBJS
+= ll-merge.o
588 LIB_OBJS
+= lockfile.o
589 LIB_OBJS
+= log-tree.o
590 LIB_OBJS
+= mailmap.o
591 LIB_OBJS
+= match-trees.o
592 LIB_OBJS
+= merge-file.o
593 LIB_OBJS
+= merge-recursive.o
594 LIB_OBJS
+= name-hash.o
597 LIB_OBJS
+= pack-check.o
598 LIB_OBJS
+= pack-refs.o
599 LIB_OBJS
+= pack-revindex.o
600 LIB_OBJS
+= pack-write.o
602 LIB_OBJS
+= parse-options.o
603 LIB_OBJS
+= patch-delta.o
604 LIB_OBJS
+= patch-ids.o
606 LIB_OBJS
+= pkt-line.o
607 LIB_OBJS
+= preload-index.o
609 LIB_OBJS
+= progress.o
611 LIB_OBJS
+= reachable.o
612 LIB_OBJS
+= read-cache.o
613 LIB_OBJS
+= reflog-walk.o
616 LIB_OBJS
+= replace_object.o
618 LIB_OBJS
+= resolve-undo.o
619 LIB_OBJS
+= revision.o
620 LIB_OBJS
+= run-command.o
621 LIB_OBJS
+= server-info.o
623 LIB_OBJS
+= sha1-lookup.o
624 LIB_OBJS
+= sha1_file.o
625 LIB_OBJS
+= sha1_name.o
626 LIB_OBJS
+= shallow.o
627 LIB_OBJS
+= sideband.o
628 LIB_OBJS
+= sigchain.o
630 LIB_OBJS
+= string-list.o
631 LIB_OBJS
+= submodule.o
632 LIB_OBJS
+= symlinks.o
635 LIB_OBJS
+= transport.o
636 LIB_OBJS
+= transport-helper.o
637 LIB_OBJS
+= tree-diff.o
639 LIB_OBJS
+= tree-walk.o
640 LIB_OBJS
+= unpack-trees.o
642 LIB_OBJS
+= userdiff.o
645 LIB_OBJS
+= wrapper.o
646 LIB_OBJS
+= write_or_die.o
648 LIB_OBJS
+= wt-status.o
649 LIB_OBJS
+= xdiff-interface.o
651 BUILTIN_OBJS
+= builtin-add.o
652 BUILTIN_OBJS
+= builtin-annotate.o
653 BUILTIN_OBJS
+= builtin-apply.o
654 BUILTIN_OBJS
+= builtin-archive.o
655 BUILTIN_OBJS
+= builtin-bisect--helper.o
656 BUILTIN_OBJS
+= builtin-blame.o
657 BUILTIN_OBJS
+= builtin-branch.o
658 BUILTIN_OBJS
+= builtin-bundle.o
659 BUILTIN_OBJS
+= builtin-cat-file.o
660 BUILTIN_OBJS
+= builtin-check-attr.o
661 BUILTIN_OBJS
+= builtin-check-ref-format.o
662 BUILTIN_OBJS
+= builtin-checkout-index.o
663 BUILTIN_OBJS
+= builtin-checkout.o
664 BUILTIN_OBJS
+= builtin-clean.o
665 BUILTIN_OBJS
+= builtin-clone.o
666 BUILTIN_OBJS
+= builtin-commit-tree.o
667 BUILTIN_OBJS
+= builtin-commit.o
668 BUILTIN_OBJS
+= builtin-config.o
669 BUILTIN_OBJS
+= builtin-count-objects.o
670 BUILTIN_OBJS
+= builtin-describe.o
671 BUILTIN_OBJS
+= builtin-diff-files.o
672 BUILTIN_OBJS
+= builtin-diff-index.o
673 BUILTIN_OBJS
+= builtin-diff-tree.o
674 BUILTIN_OBJS
+= builtin-diff.o
675 BUILTIN_OBJS
+= builtin-fast-export.o
676 BUILTIN_OBJS
+= builtin-fetch-pack.o
677 BUILTIN_OBJS
+= builtin-fetch.o
678 BUILTIN_OBJS
+= builtin-fmt-merge-msg.o
679 BUILTIN_OBJS
+= builtin-for-each-ref.o
680 BUILTIN_OBJS
+= builtin-fsck.o
681 BUILTIN_OBJS
+= builtin-gc.o
682 BUILTIN_OBJS
+= builtin-grep.o
683 BUILTIN_OBJS
+= builtin-hash-object.o
684 BUILTIN_OBJS
+= builtin-help.o
685 BUILTIN_OBJS
+= builtin-index-pack.o
686 BUILTIN_OBJS
+= builtin-init-db.o
687 BUILTIN_OBJS
+= builtin-log.o
688 BUILTIN_OBJS
+= builtin-ls-files.o
689 BUILTIN_OBJS
+= builtin-ls-remote.o
690 BUILTIN_OBJS
+= builtin-ls-tree.o
691 BUILTIN_OBJS
+= builtin-mailinfo.o
692 BUILTIN_OBJS
+= builtin-mailsplit.o
693 BUILTIN_OBJS
+= builtin-merge.o
694 BUILTIN_OBJS
+= builtin-merge-base.o
695 BUILTIN_OBJS
+= builtin-merge-file.o
696 BUILTIN_OBJS
+= builtin-merge-index.o
697 BUILTIN_OBJS
+= builtin-merge-ours.o
698 BUILTIN_OBJS
+= builtin-merge-recursive.o
699 BUILTIN_OBJS
+= builtin-merge-tree.o
700 BUILTIN_OBJS
+= builtin-mktag.o
701 BUILTIN_OBJS
+= builtin-mktree.o
702 BUILTIN_OBJS
+= builtin-mv.o
703 BUILTIN_OBJS
+= builtin-name-rev.o
704 BUILTIN_OBJS
+= builtin-pack-objects.o
705 BUILTIN_OBJS
+= builtin-pack-redundant.o
706 BUILTIN_OBJS
+= builtin-pack-refs.o
707 BUILTIN_OBJS
+= builtin-patch-id.o
708 BUILTIN_OBJS
+= builtin-prune-packed.o
709 BUILTIN_OBJS
+= builtin-prune.o
710 BUILTIN_OBJS
+= builtin-push.o
711 BUILTIN_OBJS
+= builtin-read-tree.o
712 BUILTIN_OBJS
+= builtin-receive-pack.o
713 BUILTIN_OBJS
+= builtin-reflog.o
714 BUILTIN_OBJS
+= builtin-remote.o
715 BUILTIN_OBJS
+= builtin-replace.o
716 BUILTIN_OBJS
+= builtin-rerere.o
717 BUILTIN_OBJS
+= builtin-reset.o
718 BUILTIN_OBJS
+= builtin-rev-list.o
719 BUILTIN_OBJS
+= builtin-rev-parse.o
720 BUILTIN_OBJS
+= builtin-revert.o
721 BUILTIN_OBJS
+= builtin-rm.o
722 BUILTIN_OBJS
+= builtin-send-pack.o
723 BUILTIN_OBJS
+= builtin-shortlog.o
724 BUILTIN_OBJS
+= builtin-show-branch.o
725 BUILTIN_OBJS
+= builtin-show-ref.o
726 BUILTIN_OBJS
+= builtin-stripspace.o
727 BUILTIN_OBJS
+= builtin-symbolic-ref.o
728 BUILTIN_OBJS
+= builtin-tag.o
729 BUILTIN_OBJS
+= builtin-tar-tree.o
730 BUILTIN_OBJS
+= builtin-unpack-file.o
731 BUILTIN_OBJS
+= builtin-unpack-objects.o
732 BUILTIN_OBJS
+= builtin-update-index.o
733 BUILTIN_OBJS
+= builtin-update-ref.o
734 BUILTIN_OBJS
+= builtin-update-server-info.o
735 BUILTIN_OBJS
+= builtin-upload-archive.o
736 BUILTIN_OBJS
+= builtin-var.o
737 BUILTIN_OBJS
+= builtin-verify-pack.o
738 BUILTIN_OBJS
+= builtin-verify-tag.o
739 BUILTIN_OBJS
+= builtin-write-tree.o
741 TEST_OBJS
:= $(patsubst test-
%$X,test-
%.o
,$(TEST_PROGRAMS
))
743 GITLIBS
= $(LIB_FILE
) $(XDIFF_LIB
)
747 # Platform specific tweaks
750 # We choose to avoid "if .. else if .. else .. endif endif"
751 # because maintaining the nesting to match is a pain. If
752 # we had "elif" things would have been much nicer...
754 ifeq ($(uname_S
),Linux
)
755 NO_STRLCPY
= YesPlease
756 NO_MKSTEMPS
= YesPlease
757 THREADED_DELTA_SEARCH
= YesPlease
759 ifeq ($(uname_S
),GNU
/kFreeBSD
)
760 NO_STRLCPY
= YesPlease
761 NO_MKSTEMPS
= YesPlease
762 THREADED_DELTA_SEARCH
= YesPlease
764 ifeq ($(uname_S
),UnixWare
)
766 NEEDS_SOCKET
= YesPlease
767 NEEDS_NSL
= YesPlease
768 NEEDS_SSL_WITH_CRYPTO
= YesPlease
769 NEEDS_LIBICONV
= YesPlease
770 SHELL_PATH
= /usr
/local
/bin
/bash
772 NO_HSTRERROR
= YesPlease
773 NO_MKSTEMPS
= YesPlease
774 BASIC_CFLAGS
+= -Kthread
775 BASIC_CFLAGS
+= -I
/usr
/local
/include
776 BASIC_LDFLAGS
+= -L
/usr
/local
/lib
779 NO_STRCASESTR
= YesPlease
780 NO_MEMMEM
= YesPlease
782 ifeq ($(uname_S
),SCO_SV
)
783 ifeq ($(uname_R
),3.2)
788 BASIC_CFLAGS
+= -Kthread
790 NEEDS_SOCKET
= YesPlease
791 NEEDS_NSL
= YesPlease
792 NEEDS_SSL_WITH_CRYPTO
= YesPlease
793 NEEDS_LIBICONV
= YesPlease
794 SHELL_PATH
= /usr
/bin
/bash
796 NO_HSTRERROR
= YesPlease
797 NO_MKSTEMPS
= YesPlease
798 BASIC_CFLAGS
+= -I
/usr
/local
/include
799 BASIC_LDFLAGS
+= -L
/usr
/local
/lib
800 NO_STRCASESTR
= YesPlease
801 NO_MEMMEM
= YesPlease
805 ifeq ($(uname_S
),Darwin
)
806 NEEDS_CRYPTO_WITH_SSL
= YesPlease
807 NEEDS_SSL_WITH_CRYPTO
= YesPlease
808 NEEDS_LIBICONV
= YesPlease
809 ifeq ($(shell expr
"$(uname_R)" : '[15678]\.'),2)
810 OLD_ICONV
= UnfortunatelyYes
812 ifeq ($(shell expr
"$(uname_R)" : '[15]\.'),2)
813 NO_STRLCPY
= YesPlease
815 NO_MEMMEM
= YesPlease
816 THREADED_DELTA_SEARCH
= YesPlease
817 USE_ST_TIMESPEC
= YesPlease
819 ifeq ($(uname_S
),SunOS
)
820 NEEDS_SOCKET
= YesPlease
821 NEEDS_NSL
= YesPlease
822 SHELL_PATH
= /bin
/bash
823 SANE_TOOL_PATH
= /usr
/xpg6
/bin
:/usr
/xpg4
/bin
824 NO_STRCASESTR
= YesPlease
825 NO_MEMMEM
= YesPlease
826 NO_MKDTEMP
= YesPlease
827 NO_MKSTEMPS
= YesPlease
829 THREADED_DELTA_SEARCH
= YesPlease
830 ifeq ($(uname_R
),5.7)
831 NEEDS_RESOLV
= YesPlease
833 NO_SOCKADDR_STORAGE
= YesPlease
834 NO_UNSETENV
= YesPlease
835 NO_SETENV
= YesPlease
836 NO_STRLCPY
= YesPlease
837 NO_C99_FORMAT
= YesPlease
838 NO_STRTOUMAX
= YesPlease
840 ifeq ($(uname_R
),5.8)
841 NO_UNSETENV
= YesPlease
842 NO_SETENV
= YesPlease
843 NO_C99_FORMAT
= YesPlease
844 NO_STRTOUMAX
= YesPlease
846 ifeq ($(uname_R
),5.9)
847 NO_UNSETENV
= YesPlease
848 NO_SETENV
= YesPlease
849 NO_C99_FORMAT
= YesPlease
850 NO_STRTOUMAX
= YesPlease
852 INSTALL
= /usr
/ucb
/install
854 BASIC_CFLAGS
+= -D__EXTENSIONS__
-D__sun__
-DHAVE_ALLOCA_H
856 ifeq ($(uname_O
),Cygwin
)
857 NO_D_TYPE_IN_DIRENT
= YesPlease
858 NO_D_INO_IN_DIRENT
= YesPlease
859 NO_STRCASESTR
= YesPlease
860 NO_MEMMEM
= YesPlease
861 NO_MKSTEMPS
= YesPlease
862 NO_SYMLINK_HEAD
= YesPlease
863 NEEDS_LIBICONV
= YesPlease
864 NO_FAST_WORKING_DIRECTORY
= UnfortunatelyYes
865 NO_TRUSTABLE_FILEMODE
= UnfortunatelyYes
866 OLD_ICONV
= UnfortunatelyYes
867 NO_ST_BLOCKS_IN_STRUCT_STAT
= YesPlease
868 # There are conflicting reports about this.
869 # On some boxes NO_MMAP is needed, and not so elsewhere.
870 # Try commenting this out if you suspect MMAP is more efficient
874 COMPAT_OBJS
+= compat
/cygwin.o
875 UNRELIABLE_FSTAT
= UnfortunatelyYes
877 ifeq ($(uname_S
),FreeBSD
)
878 NEEDS_LIBICONV
= YesPlease
879 OLD_ICONV
= YesPlease
880 NO_MEMMEM
= YesPlease
881 BASIC_CFLAGS
+= -I
/usr
/local
/include
882 BASIC_LDFLAGS
+= -L
/usr
/local
/lib
883 DIR_HAS_BSD_GROUP_SEMANTICS
= YesPlease
884 USE_ST_TIMESPEC
= YesPlease
885 THREADED_DELTA_SEARCH
= YesPlease
886 ifeq ($(shell expr
"$(uname_R)" : '4\.'),2)
887 PTHREAD_LIBS
= -pthread
888 NO_UINTMAX_T
= YesPlease
889 NO_STRTOUMAX
= YesPlease
892 ifeq ($(uname_S
),OpenBSD
)
893 NO_STRCASESTR
= YesPlease
894 NO_MEMMEM
= YesPlease
895 USE_ST_TIMESPEC
= YesPlease
896 NEEDS_LIBICONV
= YesPlease
897 BASIC_CFLAGS
+= -I
/usr
/local
/include
898 BASIC_LDFLAGS
+= -L
/usr
/local
/lib
899 THREADED_DELTA_SEARCH
= YesPlease
901 ifeq ($(uname_S
),NetBSD
)
902 ifeq ($(shell expr
"$(uname_R)" : '[01]\.'),2)
903 NEEDS_LIBICONV
= YesPlease
905 BASIC_CFLAGS
+= -I
/usr
/pkg
/include
906 BASIC_LDFLAGS
+= -L
/usr
/pkg
/lib
$(CC_LD_DYNPATH
)/usr
/pkg
/lib
907 THREADED_DELTA_SEARCH
= YesPlease
908 USE_ST_TIMESPEC
= YesPlease
909 NO_MKSTEMPS
= YesPlease
911 ifeq ($(uname_S
),AIX
)
912 NO_STRCASESTR
=YesPlease
913 NO_MEMMEM
= YesPlease
914 NO_MKDTEMP
= YesPlease
915 NO_MKSTEMPS
= YesPlease
916 NO_STRLCPY
= YesPlease
918 FREAD_READS_DIRECTORIES
= UnfortunatelyYes
919 INTERNAL_QSORT
= UnfortunatelyYes
920 NEEDS_LIBICONV
=YesPlease
921 BASIC_CFLAGS
+= -D_LARGE_FILES
922 ifneq ($(shell expr
"$(uname_V)" : '[1234]'),1)
923 THREADED_DELTA_SEARCH
= YesPlease
925 NO_PTHREADS
= YesPlease
928 ifeq ($(uname_S
),GNU
)
931 NO_MKSTEMPS
= YesPlease
933 ifeq ($(uname_S
),IRIX
)
934 NO_SETENV
= YesPlease
935 NO_UNSETENV
= YesPlease
936 NO_STRCASESTR
= YesPlease
937 NO_MEMMEM
= YesPlease
938 NO_MKSTEMPS
= YesPlease
939 NO_MKDTEMP
= YesPlease
940 # When compiled with the MIPSpro 7.4.4m compiler, and without pthreads
941 # (i.e. NO_PTHREADS is set), and _with_ MMAP (i.e. NO_MMAP is not set),
942 # git dies with a segmentation fault when trying to access the first
943 # entry of a reflog. The conservative choice is made to always set
944 # NO_MMAP. If you suspect that your compiler is not affected by this
945 # issue, comment out the NO_MMAP statement.
947 SNPRINTF_RETURNS_BOGUS
= YesPlease
948 SHELL_PATH
= /usr
/gnu
/bin
/bash
949 NEEDS_LIBGEN
= YesPlease
950 THREADED_DELTA_SEARCH
= YesPlease
952 ifeq ($(uname_S
),IRIX64
)
954 NO_UNSETENV
= YesPlease
955 NO_STRCASESTR
=YesPlease
956 NO_MEMMEM
= YesPlease
957 NO_MKSTEMPS
= YesPlease
958 NO_MKDTEMP
= YesPlease
959 # When compiled with the MIPSpro 7.4.4m compiler, and without pthreads
960 # (i.e. NO_PTHREADS is set), and _with_ MMAP (i.e. NO_MMAP is not set),
961 # git dies with a segmentation fault when trying to access the first
962 # entry of a reflog. The conservative choice is made to always set
963 # NO_MMAP. If you suspect that your compiler is not affected by this
964 # issue, comment out the NO_MMAP statement.
966 SNPRINTF_RETURNS_BOGUS
= YesPlease
967 SHELL_PATH
=/usr
/gnu
/bin
/bash
968 NEEDS_LIBGEN
= YesPlease
969 THREADED_DELTA_SEARCH
= YesPlease
971 ifeq ($(uname_S
),HP-UX
)
974 NO_STRCASESTR
=YesPlease
975 NO_MEMMEM
= YesPlease
976 NO_MKSTEMPS
= YesPlease
977 NO_STRLCPY
= YesPlease
978 NO_MKDTEMP
= YesPlease
979 NO_UNSETENV
= YesPlease
980 NO_HSTRERROR
= YesPlease
981 NO_SYS_SELECT_H
= YesPlease
982 SNPRINTF_RETURNS_BOGUS
= YesPlease
984 ifeq ($(uname_S
),Windows
)
985 GIT_VERSION
:= $(GIT_VERSION
).MSVC
988 NEEDS_CRYPTO_WITH_SSL
= YesPlease
989 NO_LIBGEN_H
= YesPlease
990 NO_SYMLINK_HEAD
= YesPlease
992 NO_SETENV
= YesPlease
993 NO_UNSETENV
= YesPlease
994 NO_STRCASESTR
= YesPlease
995 NO_STRLCPY
= YesPlease
996 NO_MEMMEM
= YesPlease
997 # NEEDS_LIBICONV = YesPlease
999 NO_C99_FORMAT
= YesPlease
1000 NO_STRTOUMAX
= YesPlease
1001 NO_STRTOULL
= YesPlease
1002 NO_MKDTEMP
= YesPlease
1003 NO_MKSTEMPS
= YesPlease
1004 SNPRINTF_RETURNS_BOGUS
= YesPlease
1005 NO_SVN_TESTS
= YesPlease
1006 NO_PERL_MAKEMAKER
= YesPlease
1007 RUNTIME_PREFIX
= YesPlease
1008 NO_POSIX_ONLY_PROGRAMS
= YesPlease
1009 NO_ST_BLOCKS_IN_STRUCT_STAT
= YesPlease
1011 USE_WIN32_MMAP
= YesPlease
1012 # USE_NED_ALLOCATOR = YesPlease
1013 UNRELIABLE_FSTAT
= UnfortunatelyYes
1014 OBJECT_CREATION_USES_RENAMES
= UnfortunatelyNeedsTo
1015 NO_REGEX
= YesPlease
1017 NO_PYTHON
= YesPlease
1018 BLK_SHA1
= YesPlease
1019 THREADED_DELTA_SEARCH
= YesPlease
1021 CC
= compat
/vcbuild
/scripts
/clink.pl
1022 AR
= compat
/vcbuild
/scripts
/lib.pl
1024 BASIC_CFLAGS
= -nologo
-I.
-I..
/zlib
-Icompat
/vcbuild
-Icompat
/vcbuild
/include -DWIN32
-D_CONSOLE
-DHAVE_STRING_H
-D_CRT_SECURE_NO_WARNINGS
-D_CRT_NONSTDC_NO_DEPRECATE
1025 COMPAT_OBJS
= compat
/msvc.o compat
/fnmatch
/fnmatch.o compat
/winansi.o compat
/win32
/pthread.o
1026 COMPAT_CFLAGS
= -D__USE_MINGW_ACCESS
-DNOGDI
-DHAVE_STRING_H
-DHAVE_ALLOCA_H
-Icompat
-Icompat
/fnmatch
-Icompat
/regex
-Icompat
/fnmatch
-Icompat
/win32
-DSTRIP_EXTENSION
=\".exe
\"
1027 BASIC_LDFLAGS
= -IGNORE
:4217 -IGNORE
:4049 -NOLOGO
-SUBSYSTEM
:CONSOLE
-NODEFAULTLIB
:MSVCRT.lib
1028 EXTLIBS
= advapi32.lib shell32.lib wininet.lib ws2_32.lib
1032 BASIC_CFLAGS
+= -GL
-Os
-MT
1033 BASIC_LDFLAGS
+= -LTCG
1036 BASIC_CFLAGS
+= -Zi
-MTd
1040 ifneq (,$(findstring MINGW
,$(uname_S
)))
1042 NO_PREAD
= YesPlease
1043 NEEDS_CRYPTO_WITH_SSL
= YesPlease
1044 NO_LIBGEN_H
= YesPlease
1045 NO_SYMLINK_HEAD
= YesPlease
1046 NO_SETENV
= YesPlease
1047 NO_UNSETENV
= YesPlease
1048 NO_STRCASESTR
= YesPlease
1049 NO_STRLCPY
= YesPlease
1050 NO_MEMMEM
= YesPlease
1051 NEEDS_LIBICONV
= YesPlease
1052 OLD_ICONV
= YesPlease
1053 NO_C99_FORMAT
= YesPlease
1054 NO_STRTOUMAX
= YesPlease
1055 NO_MKDTEMP
= YesPlease
1056 NO_MKSTEMPS
= YesPlease
1057 SNPRINTF_RETURNS_BOGUS
= YesPlease
1058 NO_SVN_TESTS
= YesPlease
1059 NO_PERL_MAKEMAKER
= YesPlease
1060 RUNTIME_PREFIX
= YesPlease
1061 NO_POSIX_ONLY_PROGRAMS
= YesPlease
1062 NO_ST_BLOCKS_IN_STRUCT_STAT
= YesPlease
1064 USE_WIN32_MMAP
= YesPlease
1065 USE_NED_ALLOCATOR
= YesPlease
1066 UNRELIABLE_FSTAT
= UnfortunatelyYes
1067 OBJECT_CREATION_USES_RENAMES
= UnfortunatelyNeedsTo
1068 NO_REGEX
= YesPlease
1069 NO_PYTHON
= YesPlease
1070 BLK_SHA1
= YesPlease
1071 THREADED_DELTA_SEARCH
= YesPlease
1072 COMPAT_CFLAGS
+= -D__USE_MINGW_ACCESS
-DNOGDI
-Icompat
-Icompat
/fnmatch
-Icompat
/win32
1073 COMPAT_CFLAGS
+= -DSTRIP_EXTENSION
=\".exe
\"
1074 COMPAT_OBJS
+= compat
/mingw.o compat
/fnmatch
/fnmatch.o compat
/winansi.o \
1075 compat
/win32
/pthread.o
1079 ifneq (,$(wildcard ..
/THIS_IS_MSYSGIT
))
1080 htmldir
=doc
/git
/html
/
1082 INSTALL
= /bin
/install
1083 EXTLIBS
+= /mingw
/lib
/libz.a
1084 NO_R_TO_GCC_LINKER
= YesPlease
1085 INTERNAL_QSORT
= YesPlease
1091 -include config.mak.autogen
1094 ifdef CHECK_HEADER_DEPENDENCIES
1095 USE_COMPUTED_HEADER_DEPENDENCIES
=
1098 ifdef COMPUTE_HEADER_DEPENDENCIES
1099 USE_COMPUTED_HEADER_DEPENDENCIES
= YesPlease
1102 ifdef SANE_TOOL_PATH
1103 SANE_TOOL_PATH_SQ
= $(subst ','\'',$(SANE_TOOL_PATH))
1104 BROKEN_PATH_FIX = 's|^\
# @@BROKEN_PATH_FIX@@$$|git_broken_path_fix $(SANE_TOOL_PATH_SQ)|'
1105 PATH
:= $(SANE_TOOL_PATH
):${PATH}
1107 BROKEN_PATH_FIX
= '/^\# @@BROKEN_PATH_FIX@@$$/d'
1110 ifeq ($(uname_S
),Darwin
)
1112 ifeq ($(shell test -d
/sw
/lib
&& echo y
),y
)
1113 BASIC_CFLAGS
+= -I
/sw
/include
1114 BASIC_LDFLAGS
+= -L
/sw
/lib
1117 ifndef NO_DARWIN_PORTS
1118 ifeq ($(shell test -d
/opt
/local
/lib
&& echo y
),y
)
1119 BASIC_CFLAGS
+= -I
/opt
/local
/include
1120 BASIC_LDFLAGS
+= -L
/opt
/local
/lib
1126 ifndef CC_LD_DYNPATH
1127 ifdef NO_R_TO_GCC_LINKER
1128 # Some gcc does not accept and pass -R to the linker to specify
1129 # the runtime dynamic library path.
1130 CC_LD_DYNPATH
= -Wl
,-rpath
,
1137 COMPAT_CFLAGS
+= -DNO_LIBGEN_H
1138 COMPAT_OBJS
+= compat
/basename.o
1142 BASIC_CFLAGS
+= -DNO_CURL
1143 REMOTE_CURL_PRIMARY
=
1144 REMOTE_CURL_ALIASES
=
1148 # Try "-Wl,-rpath=$(CURLDIR)/$(lib)" in such a case.
1149 BASIC_CFLAGS
+= -I
$(CURLDIR
)/include
1150 CURL_LIBCURL
= -L
$(CURLDIR
)/$(lib
) $(CC_LD_DYNPATH
)$(CURLDIR
)/$(lib
) -lcurl
1152 CURL_LIBCURL
= -lcurl
1154 REMOTE_CURL_PRIMARY
= git-remote-http
$X
1155 REMOTE_CURL_ALIASES
= git-remote-https
$X git-remote-ftp
$X git-remote-ftps
$X
1156 REMOTE_CURL_NAMES
= $(REMOTE_CURL_PRIMARY
) $(REMOTE_CURL_ALIASES
)
1157 PROGRAM_OBJS
+= http-fetch.o
1158 PROGRAMS
+= $(REMOTE_CURL_NAMES
)
1159 curl_check
:= $(shell (echo
070908; curl-config
--vernum
) |
sort -r | sed
-ne
2p
)
1160 ifeq "$(curl_check)" "070908"
1162 PROGRAM_OBJS
+= http-push.o
1167 BASIC_CFLAGS
+= -I
$(EXPATDIR
)/include
1168 EXPAT_LIBEXPAT
= -L
$(EXPATDIR
)/$(lib
) $(CC_LD_DYNPATH
)$(EXPATDIR
)/$(lib
) -lexpat
1170 EXPAT_LIBEXPAT
= -lexpat
1176 BASIC_CFLAGS
+= -I
$(ZLIB_PATH
)/include
1177 EXTLIBS
+= -L
$(ZLIB_PATH
)/$(lib
) $(CC_LD_DYNPATH
)$(ZLIB_PATH
)/$(lib
)
1181 ifndef NO_POSIX_ONLY_PROGRAMS
1182 PROGRAM_OBJS
+= daemon.o
1185 OPENSSL_LIBSSL
= -lssl
1187 BASIC_CFLAGS
+= -I
$(OPENSSLDIR
)/include
1188 OPENSSL_LINK
= -L
$(OPENSSLDIR
)/$(lib
) $(CC_LD_DYNPATH
)$(OPENSSLDIR
)/$(lib
)
1192 ifdef NEEDS_CRYPTO_WITH_SSL
1193 OPENSSL_LINK
+= -lcrypto
1196 BASIC_CFLAGS
+= -DNO_OPENSSL
1200 ifdef NEEDS_SSL_WITH_CRYPTO
1201 LIB_4_CRYPTO
= $(OPENSSL_LINK
) -lcrypto
-lssl
1203 LIB_4_CRYPTO
= $(OPENSSL_LINK
) -lcrypto
1205 ifdef NEEDS_LIBICONV
1207 BASIC_CFLAGS
+= -I
$(ICONVDIR
)/include
1208 ICONV_LINK
= -L
$(ICONVDIR
)/$(lib
) $(CC_LD_DYNPATH
)$(ICONVDIR
)/$(lib
)
1212 EXTLIBS
+= $(ICONV_LINK
) -liconv
1226 ifdef NO_D_TYPE_IN_DIRENT
1227 BASIC_CFLAGS
+= -DNO_D_TYPE_IN_DIRENT
1229 ifdef NO_D_INO_IN_DIRENT
1230 BASIC_CFLAGS
+= -DNO_D_INO_IN_DIRENT
1232 ifdef NO_ST_BLOCKS_IN_STRUCT_STAT
1233 BASIC_CFLAGS
+= -DNO_ST_BLOCKS_IN_STRUCT_STAT
1236 BASIC_CFLAGS
+= -DUSE_NSEC
1238 ifdef USE_ST_TIMESPEC
1239 BASIC_CFLAGS
+= -DUSE_ST_TIMESPEC
1242 BASIC_CFLAGS
+= -DNO_NSEC
1245 BASIC_CFLAGS
+= -DNO_C99_FORMAT
1247 ifdef SNPRINTF_RETURNS_BOGUS
1248 COMPAT_CFLAGS
+= -DSNPRINTF_RETURNS_BOGUS
1249 COMPAT_OBJS
+= compat
/snprintf.o
1251 ifdef FREAD_READS_DIRECTORIES
1252 COMPAT_CFLAGS
+= -DFREAD_READS_DIRECTORIES
1253 COMPAT_OBJS
+= compat
/fopen.o
1255 ifdef NO_SYMLINK_HEAD
1256 BASIC_CFLAGS
+= -DNO_SYMLINK_HEAD
1259 COMPAT_CFLAGS
+= -DNO_STRCASESTR
1260 COMPAT_OBJS
+= compat
/strcasestr.o
1263 COMPAT_CFLAGS
+= -DNO_STRLCPY
1264 COMPAT_OBJS
+= compat
/strlcpy.o
1267 COMPAT_CFLAGS
+= -DNO_STRTOUMAX
1268 COMPAT_OBJS
+= compat
/strtoumax.o
1271 COMPAT_CFLAGS
+= -DNO_STRTOULL
1274 COMPAT_CFLAGS
+= -DNO_SETENV
1275 COMPAT_OBJS
+= compat
/setenv.o
1278 COMPAT_CFLAGS
+= -DNO_MKDTEMP
1279 COMPAT_OBJS
+= compat
/mkdtemp.o
1282 COMPAT_CFLAGS
+= -DNO_MKSTEMPS
1283 COMPAT_OBJS
+= compat
/mkstemps.o
1286 COMPAT_CFLAGS
+= -DNO_UNSETENV
1287 COMPAT_OBJS
+= compat
/unsetenv.o
1289 ifdef NO_SYS_SELECT_H
1290 BASIC_CFLAGS
+= -DNO_SYS_SELECT_H
1293 COMPAT_CFLAGS
+= -DNO_MMAP
1294 COMPAT_OBJS
+= compat
/mmap.o
1296 ifdef USE_WIN32_MMAP
1297 COMPAT_CFLAGS
+= -DUSE_WIN32_MMAP
1298 COMPAT_OBJS
+= compat
/win32mmap.o
1301 ifdef OBJECT_CREATION_USES_RENAMES
1302 COMPAT_CFLAGS
+= -DOBJECT_CREATION_MODE
=1
1305 COMPAT_CFLAGS
+= -DNO_PREAD
1306 COMPAT_OBJS
+= compat
/pread.o
1308 ifdef NO_FAST_WORKING_DIRECTORY
1309 BASIC_CFLAGS
+= -DNO_FAST_WORKING_DIRECTORY
1311 ifdef NO_TRUSTABLE_FILEMODE
1312 BASIC_CFLAGS
+= -DNO_TRUSTABLE_FILEMODE
1315 BASIC_CFLAGS
+= -DNO_IPV6
1318 BASIC_CFLAGS
+= -Duintmax_t
=uint32_t
1320 ifdef NO_SOCKADDR_STORAGE
1322 BASIC_CFLAGS
+= -Dsockaddr_storage
=sockaddr_in
1324 BASIC_CFLAGS
+= -Dsockaddr_storage
=sockaddr_in6
1328 LIB_OBJS
+= compat
/inet_ntop.o
1331 LIB_OBJS
+= compat
/inet_pton.o
1335 BASIC_CFLAGS
+= -DNO_ICONV
1339 BASIC_CFLAGS
+= -DOLD_ICONV
1342 ifdef NO_DEFLATE_BOUND
1343 BASIC_CFLAGS
+= -DNO_DEFLATE_BOUND
1347 SHA1_HEADER
= "block-sha1/sha1.h"
1348 LIB_OBJS
+= block-sha1
/sha1.o
1349 LIB_H
+= block-sha1
/sha1.h
1352 SHA1_HEADER
= "ppc/sha1.h"
1353 LIB_OBJS
+= ppc
/sha1.o ppc
/sha1ppc.o
1356 SHA1_HEADER
= <openssl
/sha.h
>
1357 EXTLIBS
+= $(LIB_4_CRYPTO
)
1360 ifdef NO_PERL_MAKEMAKER
1361 export NO_PERL_MAKEMAKER
1364 COMPAT_CFLAGS
+= -DNO_HSTRERROR
1365 COMPAT_OBJS
+= compat
/hstrerror.o
1368 COMPAT_CFLAGS
+= -DNO_MEMMEM
1369 COMPAT_OBJS
+= compat
/memmem.o
1371 ifdef INTERNAL_QSORT
1372 COMPAT_CFLAGS
+= -DINTERNAL_QSORT
1373 COMPAT_OBJS
+= compat
/qsort.o
1375 ifdef RUNTIME_PREFIX
1376 COMPAT_CFLAGS
+= -DRUNTIME_PREFIX
1380 THREADED_DELTA_SEARCH
=
1381 BASIC_CFLAGS
+= -DNO_PTHREADS
1383 EXTLIBS
+= $(PTHREAD_LIBS
)
1386 ifdef THREADED_DELTA_SEARCH
1387 BASIC_CFLAGS
+= -DTHREADED_DELTA_SEARCH
1388 LIB_OBJS
+= thread-utils.o
1390 ifdef DIR_HAS_BSD_GROUP_SEMANTICS
1391 COMPAT_CFLAGS
+= -DDIR_HAS_BSD_GROUP_SEMANTICS
1393 ifdef UNRELIABLE_FSTAT
1394 BASIC_CFLAGS
+= -DUNRELIABLE_FSTAT
1397 COMPAT_CFLAGS
+= -Icompat
/regex
1398 COMPAT_OBJS
+= compat
/regex
/regex.o
1401 ifdef USE_NED_ALLOCATOR
1402 COMPAT_CFLAGS
+= -DUSE_NED_ALLOCATOR
-DOVERRIDE_STRDUP
-DNDEBUG
-DREPLACE_SYSTEM_ALLOCATOR
-Icompat
/nedmalloc
1403 COMPAT_OBJS
+= compat
/nedmalloc
/nedmalloc.o
1406 ifeq ($(TCLTK_PATH
),)
1410 ifeq ($(PERL_PATH
),)
1414 ifeq ($(PYTHON_PATH
),)
1418 QUIET_SUBDIR0
= +$(MAKE
) -C
# space to separate -C and subdir
1421 ifneq ($(findstring $(MAKEFLAGS
),w
),w
)
1422 PRINT_DIR
= --no-print-directory
1427 ifneq ($(findstring $(MAKEFLAGS
),s
),s
)
1429 QUIET_CC
= @echo
' ' CC
$@
;
1430 QUIET_AR
= @echo
' ' AR
$@
;
1431 QUIET_LINK
= @echo
' ' LINK
$@
;
1432 QUIET_BUILT_IN
= @echo
' ' BUILTIN
$@
;
1433 QUIET_GEN
= @echo
' ' GEN
$@
;
1434 QUIET_LNCP
= @echo
' ' LN
/CP
$@
;
1435 QUIET_SUBDIR0
= +@subdir
=
1436 QUIET_SUBDIR1
= ;$(NO_SUBDIR
) echo
' ' SUBDIR
$$subdir; \
1437 $(MAKE
) $(PRINT_DIR
) -C
$$subdir
1440 export QUIET_BUILT_IN
1448 # Shell quote (do not use $(call) to accommodate ancient setups);
1450 SHA1_HEADER_SQ
= $(subst ','\'',$(SHA1_HEADER))
1451 ETC_GITCONFIG_SQ = $(subst ','\'',$(ETC_GITCONFIG
))
1453 DESTDIR_SQ
= $(subst ','\'',$(DESTDIR))
1454 bindir_SQ = $(subst ','\'',$(bindir))
1455 bindir_relative_SQ
= $(subst ','\'',$(bindir_relative))
1456 mandir_SQ = $(subst ','\'',$(mandir))
1457 infodir_SQ
= $(subst ','\'',$(infodir))
1458 gitexecdir_SQ = $(subst ','\'',$(gitexecdir
))
1459 template_dir_SQ
= $(subst ','\'',$(template_dir))
1460 htmldir_SQ = $(subst ','\'',$(htmldir
))
1461 prefix_SQ
= $(subst ','\'',$(prefix))
1463 SHELL_PATH_SQ = $(subst ','\'',$(SHELL_PATH
))
1464 PERL_PATH_SQ
= $(subst ','\'',$(PERL_PATH))
1465 PYTHON_PATH_SQ = $(subst ','\'',$(PYTHON_PATH
))
1466 TCLTK_PATH_SQ
= $(subst ','\'',$(TCLTK_PATH))
1468 LIBS = $(GITLIBS) $(EXTLIBS)
1470 BASIC_CFLAGS += -DSHA1_HEADER='$(SHA1_HEADER_SQ
)' \
1472 LIB_OBJS += $(COMPAT_OBJS)
1476 ifdef DEFAULT_EDITOR
1477 DEFAULT_EDITOR_CQ = "$(subst ",\",$(subst \,\\,$(DEFAULT_EDITOR)))"
1478 DEFAULT_EDITOR_CQ_SQ = $(subst ','\'',$(DEFAULT_EDITOR_CQ
))
1480 BASIC_CFLAGS
+= -DDEFAULT_EDITOR
='$(DEFAULT_EDITOR_CQ_SQ)'
1484 DEFAULT_PAGER_CQ
= "$(subst ",\",$(subst \
,\\,$(DEFAULT_PAGER
)))"
1485 DEFAULT_PAGER_CQ_SQ = $(subst ','\'',$(DEFAULT_PAGER_CQ))
1487 BASIC_CFLAGS += -DDEFAULT_PAGER='$(DEFAULT_PAGER_CQ_SQ)'
1490 ALL_CFLAGS += $(BASIC_CFLAGS)
1491 ALL_LDFLAGS += $(BASIC_LDFLAGS)
1493 export TAR INSTALL DESTDIR SHELL_PATH
1498 SHELL = $(SHELL_PATH)
1500 all:: shell_compatibility_test $(ALL_PROGRAMS) $(BUILT_INS) $(OTHER_PROGRAMS) GIT-BUILD-OPTIONS
1502 $(QUIET_BUILT_IN)$(foreach p,$(patsubst %$X,%,$(filter %$X,$(ALL_PROGRAMS) $(BUILT_INS) git$X)), test -d '$p' -o '$p' -ef '$p$X' || $(RM) '$p';)
1507 $(QUIET_SUBDIR0)git-gui $(QUIET_SUBDIR1) gitexecdir='$(gitexec_instdir_SQ)' all
1508 $(QUIET_SUBDIR0)gitk-git $(QUIET_SUBDIR1) all
1511 $(QUIET_SUBDIR0)perl $(QUIET_SUBDIR1) PERL_PATH='$(PERL_PATH_SQ)' prefix='$(prefix_SQ)' all
1514 $(QUIET_SUBDIR0)git_remote_helpers $(QUIET_SUBDIR1) PYTHON_PATH='$(PYTHON_PATH_SQ)' prefix='$(prefix_SQ)' all
1516 $(QUIET_SUBDIR0)templates $(QUIET_SUBDIR1)
1518 please_set_SHELL_PATH_to_a_more_modern_shell:
1521 shell_compatibility_test: please_set_SHELL_PATH_to_a_more_modern_shell
1523 strip: $(PROGRAMS) git$X
1524 $(STRIP) $(STRIP_OPTS) $(PROGRAMS) git$X
1526 git.o: common-cmds.h
1527 git.s git.o: ALL_CFLAGS += -DGIT_VERSION='"$(GIT_VERSION
)"' \
1528 '-DGIT_HTML_PATH="$(htmldir_SQ
)"'
1530 git$X: git.o $(BUILTIN_OBJS) $(GITLIBS)
1531 $(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ git.o \
1532 $(BUILTIN_OBJS) $(ALL_LDFLAGS) $(LIBS)
1534 builtin-help.o: common-cmds.h
1535 builtin-help.s builtin-help.o: ALL_CFLAGS += \
1536 '-DGIT_HTML_PATH="$(htmldir_SQ
)"' \
1537 '-DGIT_MAN_PATH="$(mandir_SQ
)"' \
1538 '-DGIT_INFO_PATH="$(infodir_SQ
)"'
1541 $(QUIET_BUILT_IN)$(RM) $@ && \
1542 ln git$X $@ 2>/dev/null || \
1543 ln -s git$X $@ 2>/dev/null || \
1546 common-cmds.h: ./generate-cmdlist.sh command-list.txt
1548 common-cmds.h: $(wildcard Documentation/git-*.txt)
1549 $(QUIET_GEN)./generate-cmdlist.sh > $@+ && mv $@+ $@
1551 $(patsubst %.sh,%,$(SCRIPT_SH)) : % : %.sh
1552 $(QUIET_GEN)$(RM) $@ $@+ && \
1553 sed -e '1s|#!.*/sh|#!$(SHELL_PATH_SQ)|' \
1554 -e 's|@SHELL_PATH@|$(SHELL_PATH_SQ)|' \
1555 -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' \
1556 -e 's/@@NO_CURL@@/$(NO_CURL)/g' \
1557 -e $(BROKEN_PATH_FIX) \
1563 $(patsubst %.perl,%,$(SCRIPT_PERL)): perl/perl.mak
1565 perl/perl.mak: GIT-CFLAGS perl/Makefile perl/Makefile.PL
1566 $(QUIET_SUBDIR0)perl $(QUIET_SUBDIR1) PERL_PATH='$(PERL_PATH_SQ)' prefix='$(prefix_SQ)' $(@F)
1568 $(patsubst %.perl,%,$(SCRIPT_PERL)): % : %.perl
1569 $(QUIET_GEN)$(RM) $@ $@+ && \
1570 INSTLIBDIR=`MAKEFLAGS= $(MAKE) -C perl -s --no-print-directory instlibdir` && \
1572 -e ' s|#!.*perl|#!$(PERL_PATH_SQ)|' \
1574 -e ' s=.*=use lib (split(/$(pathsep)/, $$ENV{GITPERLLIB} || "@@INSTLIBDIR@@
"));=' \
1578 -e 's|@@INSTLIBDIR@@|'"$$INSTLIBDIR"'|g' \
1579 -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' \
1585 OTHER_PROGRAMS += gitweb/gitweb.cgi gitweb/gitweb.min.js
1586 gitweb/gitweb.cgi: gitweb/gitweb.perl gitweb/gitweb.min.js
1588 OTHER_PROGRAMS += gitweb/gitweb.cgi
1589 gitweb/gitweb.cgi: gitweb/gitweb.perl
1591 $(QUIET_GEN)$(RM) $@ $@+ && \
1592 sed -e '1s|#!.*perl|#!$(PERL_PATH_SQ)|' \
1593 -e 's|++GIT_VERSION++|$(GIT_VERSION)|g' \
1594 -e 's|++GIT_BINDIR++|$(bindir)|g' \
1595 -e 's|++GITWEB_CONFIG++|$(GITWEB_CONFIG)|g' \
1596 -e 's|++GITWEB_CONFIG_SYSTEM++|$(GITWEB_CONFIG_SYSTEM)|g' \
1597 -e 's|++GITWEB_HOME_LINK_STR++|$(GITWEB_HOME_LINK_STR)|g' \
1598 -e 's|++GITWEB_SITENAME++|$(GITWEB_SITENAME)|g' \
1599 -e 's|++GITWEB_PROJECTROOT++|$(GITWEB_PROJECTROOT)|g' \
1600 -e 's|"++GITWEB_PROJECT_MAXDEPTH
++"|$(GITWEB_PROJECT_MAXDEPTH)|g' \
1601 -e 's|++GITWEB_EXPORT_OK++|$(GITWEB_EXPORT_OK)|g' \
1602 -e 's|++GITWEB_STRICT_EXPORT++|$(GITWEB_STRICT_EXPORT)|g' \
1603 -e 's|++GITWEB_BASE_URL++|$(GITWEB_BASE_URL)|g' \
1604 -e 's|++GITWEB_LIST++|$(GITWEB_LIST)|g' \
1605 -e 's|++GITWEB_HOMETEXT++|$(GITWEB_HOMETEXT)|g' \
1606 -e 's|++GITWEB_CSS++|$(GITWEB_CSS)|g' \
1607 -e 's|++GITWEB_LOGO++|$(GITWEB_LOGO)|g' \
1608 -e 's|++GITWEB_FAVICON++|$(GITWEB_FAVICON)|g' \
1609 -e 's|++GITWEB_JS++|$(GITWEB_JS)|g' \
1610 -e 's|++GITWEB_SITE_HEADER++|$(GITWEB_SITE_HEADER)|g' \
1611 -e 's|++GITWEB_SITE_FOOTER++|$(GITWEB_SITE_FOOTER)|g' \
1616 git-instaweb: git-instaweb.sh gitweb/gitweb.cgi gitweb/gitweb.css gitweb/gitweb.js
1617 $(QUIET_GEN)$(RM) $@ $@+ && \
1618 sed -e '1s|#!.*/sh|#!$(SHELL_PATH_SQ)|' \
1619 -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' \
1620 -e 's/@@NO_CURL@@/$(NO_CURL)/g' \
1621 -e '/@@GITWEB_CGI@@/r gitweb/gitweb.cgi' \
1622 -e '/@@GITWEB_CGI@@/d' \
1623 -e '/@@GITWEB_CSS@@/r gitweb/gitweb.css' \
1624 -e '/@@GITWEB_CSS@@/d' \
1625 -e '/@@GITWEB_JS@@/r gitweb/gitweb.js' \
1626 -e '/@@GITWEB_JS@@/d' \
1627 -e 's|@@PERL@@|$(PERL_PATH_SQ)|g' \
1632 $(patsubst %.perl,%,$(SCRIPT_PERL)) git-instaweb: % : unimplemented.sh
1633 $(QUIET_GEN)$(RM) $@ $@+ && \
1634 sed -e '1s|#!.*/sh|#!$(SHELL_PATH_SQ)|' \
1635 -e 's|@@REASON@@|NO_PERL=$(NO_PERL)|g' \
1636 unimplemented.sh >$@+ && \
1643 gitweb/gitweb.min.js: gitweb/gitweb.js
1644 $(QUIET_GEN)$(JSMIN) <$< >$@
1648 $(patsubst %.py,%,$(SCRIPT_PYTHON)): GIT-CFLAGS
1649 $(patsubst %.py,%,$(SCRIPT_PYTHON)): % : %.py
1650 $(QUIET_GEN)$(RM) $@ $@+ && \
1651 INSTLIBDIR=`MAKEFLAGS= $(MAKE) -C git_remote_helpers -s \
1652 --no-print-directory prefix='$(prefix_SQ)' DESTDIR='$(DESTDIR_SQ)' \
1655 -e ' s|#!.*python|#!$(PYTHON_PATH_SQ)|' \
1657 -e 's|^import sys.*|&; \\\
1659 sys.path[0] = os.environ.has_key("GITPYTHONLIB
") and \\\
1660 os.environ["GITPYTHONLIB
"] or \\\
1661 "@@INSTLIBDIR@@
"|' \
1662 -e 's|@@INSTLIBDIR@@|'"$$INSTLIBDIR"'|g' \
1667 $(patsubst %.py,%,$(SCRIPT_PYTHON)): % : unimplemented.sh
1668 $(QUIET_GEN)$(RM) $@ $@+ && \
1669 sed -e '1s|#!.*/sh|#!$(SHELL_PATH_SQ)|' \
1670 -e 's|@@REASON@@|NO_PYTHON=$(NO_PYTHON)|g' \
1671 unimplemented.sh >$@+ && \
1676 configure: configure.ac
1677 $(QUIET_GEN)$(RM) $@ $<+ && \
1678 sed -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' \
1680 autoconf -o $@ $<+ && \
1683 # These can record GIT_VERSION
1685 $(patsubst %.sh,%,$(SCRIPT_SH)) \
1686 $(patsubst %.perl,%,$(SCRIPT_PERL)) \
1689 GIT_OBJS := $(LIB_OBJS) $(BUILTIN_OBJS) $(PROGRAM_OBJS) $(TEST_OBJS) \
1690 git.o http.o http-walker.o remote-curl.o
1691 XDIFF_OBJS = xdiff/xdiffi.o xdiff/xprepare.o xdiff/xutils.o xdiff/xemit.o \
1692 xdiff/xmerge.o xdiff/xpatience.o
1693 OBJECTS := $(GIT_OBJS) $(XDIFF_OBJS)
1695 dep_files := $(foreach f,$(OBJECTS),$(dir $f).depend/$(notdir $f).d)
1697 ifdef COMPUTE_HEADER_DEPENDENCIES
1698 dep_dirs := $(addsuffix .depend,$(sort $(dir $(OBJECTS))))
1702 missing_dep_dirs := $(filter-out $(wildcard $(dep_dirs)),$(dep_dirs))
1703 dep_file = $(dir $@).depend/$(notdir $@).d
1704 dep_args = -MF $(dep_file) -MMD -MP
1705 ifdef CHECK_HEADER_DEPENDENCIES
1706 $(error cannot compute header dependencies outside a normal build. \
1707 Please unset CHECK_HEADER_DEPENDENCIES and try again)
1711 ifndef COMPUTE_HEADER_DEPENDENCIES
1712 ifndef CHECK_HEADER_DEPENDENCIES
1719 ifdef CHECK_HEADER_DEPENDENCIES
1720 ifndef PRINT_HEADER_DEPENDENCIES
1721 missing_deps = $(filter-out $(notdir $^), \
1722 $(notdir $(shell $(MAKE) -s $@ \
1723 CHECK_HEADER_DEPENDENCIES=YesPlease \
1724 USE_COMPUTED_HEADER_DEPENDENCIES=YesPlease \
1725 PRINT_HEADER_DEPENDENCIES=YesPlease)))
1729 ASM_SRC := $(wildcard $(OBJECTS:o=S))
1730 ASM_OBJ := $(ASM_SRC:S=o)
1731 C_OBJ := $(filter-out $(ASM_OBJ),$(OBJECTS))
1735 ifdef PRINT_HEADER_DEPENDENCIES
1736 $(C_OBJ): %.o: %.c FORCE
1738 $(ASM_OBJ): %.o: %.S FORCE
1741 ifndef CHECK_HEADER_DEPENDENCIES
1742 $(error cannot print header dependencies during a normal build. \
1743 Please set CHECK_HEADER_DEPENDENCIES and try again)
1747 ifndef PRINT_HEADER_DEPENDENCIES
1748 ifdef CHECK_HEADER_DEPENDENCIES
1749 $(C_OBJ): %.o: %.c $(dep_files) FORCE
1750 @set -e; echo CHECK $@; \
1751 missing_deps="$(missing_deps
)"; \
1752 if test "$$missing_deps"; \
1754 echo missing dependencies: $$missing_deps; \
1757 $(ASM_OBJ): %.o: %.S $(dep_files) FORCE
1758 @set -e; echo CHECK $@; \
1759 missing_deps="$(missing_deps
)"; \
1760 if test "$$missing_deps"; \
1762 echo missing dependencies: $$missing_deps; \
1768 ifndef CHECK_HEADER_DEPENDENCIES
1769 $(C_OBJ): %.o: %.c GIT-CFLAGS $(missing_dep_dirs)
1770 $(QUIET_CC)$(CC) -o $*.o -c $(dep_args) $(ALL_CFLAGS) $<
1771 $(ASM_OBJ): %.o: %.S GIT-CFLAGS $(missing_dep_dirs)
1772 $(QUIET_CC)$(CC) -o $*.o -c $(dep_args) $(ALL_CFLAGS) $<
1775 %.s: %.c GIT-CFLAGS FORCE
1776 $(QUIET_CC)$(CC) -S $(ALL_CFLAGS) $<
1778 ifdef USE_COMPUTED_HEADER_DEPENDENCIES
1779 # Take advantage of gcc's on-the-fly dependency generation
1780 # See <http://gcc.gnu.org/gcc-3.0/features.html>.
1781 dep_files_present := $(wildcard $(dep_files))
1782 ifneq ($(dep_files_present),)
1783 include $(dep_files_present)
1786 # Dependencies on header files, for platforms that do not support
1787 # the gcc -MMD option.
1789 # Dependencies on automatically generated headers such as common-cmds.h
1790 # should _not_ be included here, since they are necessary even when
1791 # building an object for the first time.
1793 # XXX. Please check occasionally that these include all dependencies
1796 $(GIT_OBJS): $(LIB_H)
1797 builtin-branch.o builtin-checkout.o builtin-clone.o builtin-reset.o branch.o transport.o: branch.h
1798 builtin-bundle.o bundle.o transport.o: bundle.h
1799 builtin-bisect--helper.o builtin-rev-list.o bisect.o: bisect.h
1800 builtin-clone.o builtin-fetch-pack.o transport.o: fetch-pack.h
1801 builtin-send-pack.o transport.o: send-pack.h
1802 builtin-log.o builtin-shortlog.o: shortlog.h
1803 builtin-prune.o builtin-reflog.o reachable.o: reachable.h
1804 builtin-commit.o builtin-revert.o wt-status.o: wt-status.h
1805 builtin-tar-tree.o archive-tar.o: tar.h
1806 builtin-pack-objects.o: thread-utils.h
1807 http-fetch.o http-walker.o remote-curl.o transport.o walker.o: walker.h
1808 http.o http-walker.o http-push.o remote-curl.o: http.h
1810 xdiff-interface.o $(XDIFF_OBJS): \
1811 xdiff/xinclude.h xdiff/xmacros.h xdiff/xdiff.h xdiff/xtypes.h \
1812 xdiff/xutils.h xdiff/xprepare.h xdiff/xdiffi.h xdiff/xemit.h
1815 exec_cmd.s exec_cmd.o: ALL_CFLAGS += \
1816 '-DGIT_EXEC_PATH="$(gitexecdir_SQ
)"' \
1817 '-DBINDIR="$(bindir_relative_SQ
)"' \
1818 '-DPREFIX="$(prefix_SQ
)"'
1820 builtin-init-db.s builtin-init-db.o: ALL_CFLAGS += \
1821 -DDEFAULT_GIT_TEMPLATE_DIR='"$(template_dir_SQ
)"'
1823 config.s config.o: ALL_CFLAGS += -DETC_GITCONFIG='"$(ETC_GITCONFIG_SQ
)"'
1825 http.s http.o: ALL_CFLAGS += -DGIT_USER_AGENT='"git
/$(GIT_VERSION
)"'
1828 http-walker.s http-walker.o: ALL_CFLAGS += -DNO_EXPAT
1831 git-%$X: %.o $(GITLIBS)
1832 $(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) $(LIBS)
1834 git-imap-send$X: imap-send.o $(GITLIBS)
1835 $(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) \
1836 $(LIBS) $(OPENSSL_LINK) $(OPENSSL_LIBSSL)
1838 git-http-fetch$X: revision.o http.o http-walker.o http-fetch.o $(GITLIBS)
1839 $(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) \
1840 $(LIBS) $(CURL_LIBCURL)
1841 git-http-push$X: revision.o http.o http-push.o $(GITLIBS)
1842 $(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) \
1843 $(LIBS) $(CURL_LIBCURL) $(EXPAT_LIBEXPAT)
1845 $(REMOTE_CURL_ALIASES): $(REMOTE_CURL_PRIMARY)
1846 $(QUIET_LNCP)$(RM) $@ && \
1847 ln $< $@ 2>/dev/null || \
1848 ln -s $< $@ 2>/dev/null || \
1851 $(REMOTE_CURL_PRIMARY): remote-curl.o http.o http-walker.o $(GITLIBS)
1852 $(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) \
1853 $(LIBS) $(CURL_LIBCURL) $(EXPAT_LIBEXPAT)
1855 $(LIB_FILE): $(LIB_OBJS)
1856 $(QUIET_AR)$(RM) $@ && $(AR) rcs $@ $(LIB_OBJS)
1858 $(XDIFF_LIB): $(XDIFF_OBJS)
1859 $(QUIET_AR)$(RM) $@ && $(AR) rcs $@ $(XDIFF_OBJS)
1863 $(MAKE) -C Documentation all
1866 $(MAKE) -C Documentation man
1869 $(MAKE) -C Documentation html
1872 $(MAKE) -C Documentation info
1875 $(MAKE) -C Documentation pdf
1879 $(FIND) . -name '*.[hcS]' -print | xargs etags -a
1883 $(FIND) . -name '*.[hcS]' -print | xargs ctags -a
1887 $(FIND) . -name '*.[hcS]' -print | xargs cscope -b
1889 ### Detect prefix changes
1890 TRACK_CFLAGS = $(subst ','\'',$(ALL_CFLAGS)):\
1891 $(bindir_SQ):$(gitexecdir_SQ):$(template_dir_SQ):$(prefix_SQ)
1894 @FLAGS='$(TRACK_CFLAGS)'; \
1895 if test x"$$FLAGS" != x"`cat GIT-CFLAGS 2>/dev/null`" ; then \
1896 echo 1>&2 " * new build flags or
prefix"; \
1897 echo "$$FLAGS" >GIT-CFLAGS; \
1900 # We need to apply sq twice, once to protect from the shell
1901 # that runs GIT-BUILD-OPTIONS, and then again to protect it
1902 # and the first level quoting from the shell that runs "echo
".
1903 GIT-BUILD-OPTIONS: FORCE
1904 @echo SHELL_PATH=\''$(subst ','\'',$(SHELL_PATH_SQ))'\' >$@
1905 @echo PERL_PATH=\''$(subst ','\'',$(PERL_PATH_SQ))'\' >>$@
1906 @echo TAR=\''$(subst ','\'',$(subst ','\'',$(TAR)))'\' >>$@
1907 @echo NO_CURL=\''$(subst ','\'',$(subst ','\'',$(NO_CURL)))'\' >>$@
1908 @echo NO_PERL=\''$(subst ','\'',$(subst ','\'',$(NO_PERL)))'\' >>$@
1909 @echo NO_PYTHON=\''$(subst ','\'',$(subst ','\'',$(NO_PYTHON)))'\' >>$@
1911 ### Detect Tck/Tk interpreter path changes
1913 TRACK_VARS = $(subst ','\'',-DTCLTK_PATH='$(TCLTK_PATH_SQ)')
1916 @VARS='$(TRACK_VARS)'; \
1917 if test x"$$VARS" != x"`cat $@ 2>/dev/null`" ; then \
1918 echo 1>&2 " * new Tcl
/Tk interpreter location
"; \
1919 echo "$$VARS" >$@; \
1923 test_bindir_programs := $(patsubst %,bin-wrappers/%,$(BINDIR_PROGRAMS_NEED_X) $(BINDIR_PROGRAMS_NO_X) $(TEST_PROGRAMS_NEED_X))
1925 all:: $(TEST_PROGRAMS) $(test_bindir_programs)
1927 bin-wrappers/%: wrap-for-bin.sh
1928 @mkdir -p bin-wrappers
1929 $(QUIET_GEN)sed -e '1s|#!.*/sh|#!$(SHELL_PATH_SQ)|' \
1930 -e 's|@@BUILD_DIR@@|$(shell pwd)|' \
1931 -e 's|@@PROG@@|$(@F)|' < $< > $@ && \
1934 # GNU make supports exporting all variables by "export" without parameters.
1935 # However, the environment gets quite big, and some programs have problems
1945 test-ctype$X: ctype.o
1947 test-date$X: date.o ctype.o
1949 test-delta$X: diff-delta.o patch-delta.o
1951 test-parse-options$X: parse-options.o
1953 .PRECIOUS: $(TEST_OBJS)
1955 test-%$X: test-%.o $(GITLIBS)
1956 $(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) $(LIBS)
1958 check-sha1:: test-sha1$X
1961 check: common-cmds.h
1966 sparse $(ALL_CFLAGS) $(SPARSE_FLAGS) $$i || exit; \
1969 echo 2>&1 "Did you mean
'make test'?
"; \
1974 ./fixup-builtins $(BUILT_INS) $(PROGRAMS) $(SCRIPTS)
1976 ### Installation rules
1978 ifneq ($(filter /%,$(firstword $(template_dir))),)
1979 template_instdir = $(template_dir)
1981 template_instdir = $(prefix)/$(template_dir)
1983 export template_instdir
1985 ifneq ($(filter /%,$(firstword $(gitexecdir))),)
1986 gitexec_instdir = $(gitexecdir)
1988 gitexec_instdir = $(prefix)/$(gitexecdir)
1990 gitexec_instdir_SQ = $(subst ','\'',$(gitexec_instdir))
1991 export gitexec_instdir
1993 install_bindir_programs := $(patsubst %,%$X,$(BINDIR_PROGRAMS_NEED_X)) $(BINDIR_PROGRAMS_NO_X)
1996 $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(bindir_SQ)'
1997 $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
1998 $(INSTALL) $(ALL_PROGRAMS) '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
1999 $(INSTALL) $(install_bindir_programs) '$(DESTDIR_SQ)$(bindir_SQ)'
2000 $(MAKE) -C templates DESTDIR='$(DESTDIR_SQ)' install
2002 $(MAKE) -C perl prefix='$(prefix_SQ)' DESTDIR='$(DESTDIR_SQ)' install
2005 $(MAKE) -C git_remote_helpers prefix='$(prefix_SQ)' DESTDIR='$(DESTDIR_SQ)' install
2008 $(MAKE) -C gitk-git install
2009 $(MAKE) -C git-gui gitexecdir='$(gitexec_instdir_SQ)' install
2012 $(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';)
2015 bindir=$$(cd '$(DESTDIR_SQ)$(bindir_SQ)' && pwd) && \
2016 execdir=$$(cd '$(DESTDIR_SQ)$(gitexec_instdir_SQ)' && pwd) && \
2017 { test "$$bindir/" = "$$execdir/" || \
2018 { $(RM) "$$execdir/git
$X" && \
2019 test -z "$(NO_CROSS_DIRECTORY_HARDLINKS
)" && \
2020 ln "$$bindir/git
$X" "$$execdir/git
$X" 2>/dev/null || \
2021 cp "$$bindir/git
$X" "$$execdir/git
$X"; } ; } && \
2022 { for p in $(BUILT_INS); do \
2023 $(RM) "$$execdir/$$p" && \
2024 ln "$$execdir/git
$X" "$$execdir/$$p" 2>/dev/null || \
2025 ln -s "git
$X" "$$execdir/$$p" 2>/dev/null || \
2026 cp "$$execdir/git
$X" "$$execdir/$$p" || exit; \
2028 { for p in $(REMOTE_CURL_ALIASES); do \
2029 $(RM) "$$execdir/$$p" && \
2030 ln "$$execdir/git-remote-http
$X" "$$execdir/$$p" 2>/dev/null || \
2031 ln -s "git-remote-http
$X" "$$execdir/$$p" 2>/dev/null || \
2032 cp "$$execdir/git-remote-http
$X" "$$execdir/$$p" || exit; \
2034 ./check_bindir "z
$$bindir" "z
$$execdir" "$$bindir/git-add
$X"
2037 $(MAKE) -C Documentation install
2040 $(MAKE) -C Documentation install-man
2043 $(MAKE) -C Documentation install-html
2046 $(MAKE) -C Documentation install-info
2049 $(MAKE) -C Documentation install-pdf
2052 $(MAKE) -C Documentation quick-install
2055 $(MAKE) -C Documentation quick-install-man
2058 $(MAKE) -C Documentation quick-install-html
2062 ### Maintainer's dist rules
2064 git.spec: git.spec.in
2065 sed -e 's/@@VERSION@@/$(GIT_VERSION)/g' < $< > $@+
2068 GIT_TARNAME=git-$(GIT_VERSION)
2069 dist: git.spec git-archive$(X) configure
2070 ./git-archive --format=tar \
2071 --prefix=$(GIT_TARNAME)/ HEAD^{tree} > $(GIT_TARNAME).tar
2072 @mkdir -p $(GIT_TARNAME)
2073 @cp git.spec configure $(GIT_TARNAME)
2074 @echo $(GIT_VERSION) > $(GIT_TARNAME)/version
2075 @$(MAKE) -C git-gui TARDIR=../$(GIT_TARNAME)/git-gui dist-version
2076 $(TAR) rf $(GIT_TARNAME).tar \
2077 $(GIT_TARNAME)/git.spec \
2078 $(GIT_TARNAME)/configure \
2079 $(GIT_TARNAME)/version \
2080 $(GIT_TARNAME)/git-gui/version
2081 @$(RM) -r $(GIT_TARNAME)
2082 gzip -f -9 $(GIT_TARNAME).tar
2086 --define "_source_filedigest_algorithm md5
" \
2087 --define "_binary_filedigest_algorithm md5
" \
2088 -ta $(GIT_TARNAME).tar.gz
2090 htmldocs = git-htmldocs-$(GIT_VERSION)
2091 manpages = git-manpages-$(GIT_VERSION)
2093 $(RM) -r .doc-tmp-dir
2095 $(MAKE) -C Documentation WEBDOC_DEST=../.doc-tmp-dir install-webdoc
2096 cd .doc-tmp-dir && $(TAR) cf ../$(htmldocs).tar .
2097 gzip -n -9 -f $(htmldocs).tar
2099 $(RM) -r .doc-tmp-dir
2100 mkdir -p .doc-tmp-dir/man1 .doc-tmp-dir/man5 .doc-tmp-dir/man7
2101 $(MAKE) -C Documentation DESTDIR=./ \
2102 man1dir=../.doc-tmp-dir/man1 \
2103 man5dir=../.doc-tmp-dir/man5 \
2104 man7dir=../.doc-tmp-dir/man7 \
2106 cd .doc-tmp-dir && $(TAR) cf ../$(manpages).tar .
2107 gzip -n -9 -f $(manpages).tar
2108 $(RM) -r .doc-tmp-dir
2116 $(RM) *.o block-sha1/*.o ppc/*.o compat/*.o compat/*/*.o xdiff/*.o \
2117 $(LIB_FILE) $(XDIFF_LIB)
2118 $(RM) $(ALL_PROGRAMS) $(BUILT_INS) git$X
2119 $(RM) $(TEST_PROGRAMS)
2120 $(RM) -r bin-wrappers
2121 $(RM) -r $(dep_dirs)
2122 $(RM) *.spec *.pyc *.pyo */*.pyc */*.pyo common-cmds.h TAGS tags cscope*
2123 $(RM) -r autom4te.cache
2124 $(RM) config.log config.mak.autogen config.mak.append config.status config.cache
2125 $(RM) -r $(GIT_TARNAME) .doc-tmp-dir
2126 $(RM) $(GIT_TARNAME).tar.gz git-core_$(GIT_VERSION)-*.tar.gz
2127 $(RM) $(htmldocs).tar.gz $(manpages).tar.gz
2128 $(MAKE) -C Documentation/ clean
2130 $(RM) gitweb/gitweb.cgi
2131 $(MAKE) -C perl clean
2134 $(MAKE) -C git_remote_helpers clean
2136 $(MAKE) -C templates/ clean
2139 $(MAKE) -C gitk-git clean
2140 $(MAKE) -C git-gui clean
2142 $(RM) GIT-VERSION-FILE GIT-CFLAGS GIT-GUI-VARS GIT-BUILD-OPTIONS
2144 .PHONY: all install clean strip
2145 .PHONY: shell_compatibility_test please_set_SHELL_PATH_to_a_more_modern_shell
2146 .PHONY: FORCE TAGS tags cscope
2148 ### Check documentation
2151 @(for v in $(ALL_PROGRAMS) $(BUILT_INS) git gitk; \
2154 git-merge-octopus | git-merge-ours | git-merge-recursive | \
2155 git-merge-resolve | git-merge-subtree | \
2156 git-fsck-objects | git-init-db | \
2157 git-?*--?* ) continue ;; \
2159 test -f "Documentation
/$$v.txt
" || \
2160 echo "no doc
: $$v"; \
2161 sed -e '/^#/d' command-list.txt | \
2162 grep -q "^
$$v[ ]" || \
2165 *) echo "no link
: $$v";; \
2171 -e 's/^/listed /' command-list.txt; \
2172 ls -1 Documentation/git*txt | \
2173 sed -e 's|Documentation/|documented |' \
2175 ) | while read how cmd; \
2177 case "$$how,$$cmd" in \
2181 documented,gitattributes | \
2182 documented,gitignore | \
2183 documented,gitmodules | \
2184 documented,gitcli | \
2185 documented,git-tools | \
2186 documented,gitcore-tutorial | \
2187 documented,gitcvs-migration | \
2188 documented,gitdiffcore | \
2189 documented,gitglossary | \
2190 documented,githooks | \
2191 documented,gitrepository-layout | \
2192 documented,gittutorial | \
2193 documented,gittutorial-2 | \
2194 sentinel,not,matching,is,ok ) continue ;; \
2196 case " $(ALL_PROGRAMS
) $(BUILT_INS
) git gitk
" in \
2198 *) echo "removed but
$$how: $$cmd" ;; \
2202 ### Make sure built-ins do not have dups and listed in git.c
2207 ### Test suite coverage testing
2209 .PHONY: coverage coverage-clean coverage-build coverage-report
2212 $(MAKE) coverage-build
2213 $(MAKE) coverage-report
2218 COVERAGE_CFLAGS = $(CFLAGS) -O0 -ftest-coverage -fprofile-arcs
2219 COVERAGE_LDFLAGS = $(CFLAGS) -O0 -lgcov
2221 coverage-build: coverage-clean
2222 $(MAKE) CFLAGS="$(COVERAGE_CFLAGS
)" LDFLAGS="$(COVERAGE_LDFLAGS
)" all
2223 $(MAKE) CFLAGS="$(COVERAGE_CFLAGS
)" LDFLAGS="$(COVERAGE_LDFLAGS
)" \
2228 grep '^function.*called 0 ' *.c.gcov \
2229 | sed -e 's/\([^:]*\)\.gcov: *function \([^ ]*\) called.*/\1: \2/' \
2230 | tee coverage-untested-functions