Junio C Hamano | 2731d04 | 2005-12-01 12:26:41 -0800 | [diff] [blame] | 1 | # The default target of this Makefile is... |
Junio C Hamano | 6fc301b | 2007-01-10 12:24:54 -0800 | [diff] [blame] | 2 | all:: |
Junio C Hamano | 2731d04 | 2005-12-01 12:26:41 -0800 | [diff] [blame] | 3 | |
Shawn O. Pearce | 2314c94 | 2007-03-06 02:09:14 -0500 | [diff] [blame] | 4 | # Define V=1 to have a more verbose compile. |
Shawn O. Pearce | 74f2b2a | 2007-03-06 01:35:01 -0500 | [diff] [blame] | 5 | # |
Junio C Hamano | 0e0aea5 | 2009-06-05 18:36:15 -0500 | [diff] [blame] | 6 | # Define SHELL_PATH to a POSIX shell if your /bin/sh is broken. |
| 7 | # |
| 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. |
| 10 | # |
Michal Rokos | c4582f9 | 2008-03-05 16:46:13 +0100 | [diff] [blame] | 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. |
| 14 | # |
Brandon Casey | cba2252 | 2008-02-08 20:32:47 -0600 | [diff] [blame] | 15 | # Define FREAD_READS_DIRECTORIES if your are on a system which succeeds |
| 16 | # when attempting to read from an fopen'ed directory. |
| 17 | # |
Linus Torvalds | 765ac8e | 2006-02-28 15:07:20 -0800 | [diff] [blame] | 18 | # Define NO_OPENSSL environment variable if you do not have OpenSSL. |
Nicolas Pitre | 30ae47b | 2009-08-17 20:09:56 -0400 | [diff] [blame] | 19 | # This also implies BLK_SHA1. |
Petr Baudis | 5bdac8b | 2005-07-29 17:48:26 +0200 | [diff] [blame] | 20 | # |
Johan Herland | 8da1e21 | 2008-06-15 12:14:12 +0200 | [diff] [blame] | 21 | # Define NO_CURL if you do not have libcurl installed. git-http-pull and |
Nick Hengeveld | 58e60dd | 2005-11-02 11:19:24 -0800 | [diff] [blame] | 22 | # git-http-push are not built, and you cannot use http:// and https:// |
| 23 | # transports. |
Johannes Schindelin | b2c0bd6 | 2005-07-31 02:14:23 +0200 | [diff] [blame] | 24 | # |
Patrick Mauritz | 6d9bbc5 | 2005-09-19 16:11:19 +0200 | [diff] [blame] | 25 | # Define CURLDIR=/foo/bar if your curl header and library files are in |
| 26 | # /foo/bar/include and /foo/bar/lib directories. |
| 27 | # |
Nick Hengeveld | 58e60dd | 2005-11-02 11:19:24 -0800 | [diff] [blame] | 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. |
| 30 | # |
Serge van den Boom | 85b4518 | 2009-01-28 21:43:57 +0100 | [diff] [blame] | 31 | # Define EXPATDIR=/foo/bar if your expat header and library files are in |
| 32 | # /foo/bar/include and /foo/bar/lib directories. |
| 33 | # |
Junio C Hamano | 35a730f | 2006-01-19 17:13:51 -0800 | [diff] [blame] | 34 | # Define NO_D_INO_IN_DIRENT if you don't have d_ino in your struct dirent. |
| 35 | # |
Junio C Hamano | 63be37b | 2006-01-19 17:13:57 -0800 | [diff] [blame] | 36 | # Define NO_D_TYPE_IN_DIRENT if your platform defines DT_UNKNOWN but lacks |
Eric Blake | a50dec2 | 2010-04-01 16:43:54 -0600 | [diff] [blame] | 37 | # d_type in struct dirent (Cygwin 1.5, fixed in Cygwin 1.7). |
Junio C Hamano | 63be37b | 2006-01-19 17:13:57 -0800 | [diff] [blame] | 38 | # |
Ramsay Allan Jones | 579d1fb | 2006-07-30 16:38:28 +0100 | [diff] [blame] | 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). |
Jakub Narebski | 465e649 | 2006-08-04 17:55:58 +0200 | [diff] [blame] | 42 | # some C compilers supported these specifiers prior to C99 as an extension. |
Ramsay Allan Jones | 579d1fb | 2006-07-30 16:38:28 +0100 | [diff] [blame] | 43 | # |
Linus Torvalds | ef34af2 | 2005-09-18 18:30:50 -0700 | [diff] [blame] | 44 | # Define NO_STRCASESTR if you don't have strcasestr. |
| 45 | # |
René Scharfe | b21b9f1 | 2007-09-07 00:32:54 +0200 | [diff] [blame] | 46 | # Define NO_MEMMEM if you don't have memmem. |
| 47 | # |
Peter Eriksen | 817151e | 2006-06-24 16:01:25 +0200 | [diff] [blame] | 48 | # Define NO_STRLCPY if you don't have strlcpy. |
| 49 | # |
Jason Riedy | bc6b4f5 | 2007-02-19 16:22:56 -0800 | [diff] [blame] | 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. |
| 53 | # |
Jason Riedy | e40b61f | 2005-12-02 15:08:28 -0800 | [diff] [blame] | 54 | # Define NO_SETENV if you don't have setenv in the C library. |
| 55 | # |
Jakub Narebski | bfa8fcc | 2008-01-18 02:03:51 +0100 | [diff] [blame] | 56 | # Define NO_UNSETENV if you don't have unsetenv in the C library. |
| 57 | # |
Shawn O. Pearce | ca5bb5d | 2007-10-20 16:03:49 -0400 | [diff] [blame] | 58 | # Define NO_MKDTEMP if you don't have mkdtemp in the C library. |
| 59 | # |
David Aguilar | 0620b39 | 2009-05-31 01:35:50 -0700 | [diff] [blame] | 60 | # Define NO_MKSTEMPS if you don't have mkstemps in the C library. |
| 61 | # |
David Aguilar | e1c0688 | 2009-05-31 01:35:51 -0700 | [diff] [blame] | 62 | # Define NO_LIBGEN_H if you don't have libgen.h. |
| 63 | # |
Brandon Casey | ecc395c | 2009-07-10 12:10:45 -0500 | [diff] [blame] | 64 | # Define NEEDS_LIBGEN if your libgen needs -lgen when linking |
| 65 | # |
Robert Schiele | 2600973 | 2008-01-24 19:34:46 +0100 | [diff] [blame] | 66 | # Define NO_SYS_SELECT_H if you don't have sys/select.h. |
| 67 | # |
Junio C Hamano | 9f0bb90 | 2006-05-02 00:40:24 -0700 | [diff] [blame] | 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. |
Pavel Roskin | 2fabd21 | 2005-11-15 00:59:50 -0500 | [diff] [blame] | 70 | # |
Pavel Roskin | 0285358 | 2006-07-09 02:44:58 -0700 | [diff] [blame] | 71 | # Define NO_SVN_TESTS if you want to skip time-consuming SVN interoperability |
Eric Wong | 60d02cc | 2006-07-06 00:14:16 -0700 | [diff] [blame] | 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. |
| 74 | # |
Shawn Pearce | 8eb38ca | 2006-07-24 00:28:28 -0400 | [diff] [blame] | 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. |
| 80 | # |
| 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. |
| 86 | # |
Linus Torvalds | d7c208a | 2009-08-05 16:13:20 -0700 | [diff] [blame] | 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. |
| 90 | # |
Petr Baudis | 5bdac8b | 2005-07-29 17:48:26 +0200 | [diff] [blame] | 91 | # Define PPC_SHA1 environment variable when running make to make use of |
| 92 | # a bundled SHA1 routine optimized for PowerPC. |
Junio C Hamano | 597c9cc | 2005-09-07 12:22:56 -0700 | [diff] [blame] | 93 | # |
Brian Gernhardt | 0460dba | 2009-09-08 09:54:38 -0400 | [diff] [blame] | 94 | # Define NEEDS_CRYPTO_WITH_SSL if you need -lcrypto when using -lssl (Darwin). |
| 95 | # |
| 96 | # Define NEEDS_SSL_WITH_CRYPTO if you need -lssl when using -lcrypto (Darwin). |
Patrick Mauritz | f0ebff0 | 2005-09-06 01:24:03 +0200 | [diff] [blame] | 97 | # |
Junio C Hamano | 597c9cc | 2005-09-07 12:22:56 -0700 | [diff] [blame] | 98 | # Define NEEDS_LIBICONV if linking with libc is not enough (Darwin). |
Patrick Mauritz | f0ebff0 | 2005-09-06 01:24:03 +0200 | [diff] [blame] | 99 | # |
| 100 | # Define NEEDS_SOCKET if linking with libc is not enough (SunOS, |
| 101 | # Patrick Mauritz). |
| 102 | # |
Brandon Casey | 70cf991 | 2009-06-05 18:36:10 -0500 | [diff] [blame] | 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. |
| 106 | # |
Johannes Schindelin | 730d48a | 2005-10-08 15:54:36 -0700 | [diff] [blame] | 107 | # Define NO_MMAP if you want to avoid mmap. |
| 108 | # |
Junio C Hamano | 46059cc | 2008-11-15 04:08:14 -0800 | [diff] [blame] | 109 | # Define NO_PTHREADS if you do not have or do not want to use Pthreads. |
| 110 | # |
Stefan-W. Hahn | 6900679 | 2007-01-09 22:04:12 +0100 | [diff] [blame] | 111 | # Define NO_PREAD if you have a problem with pread() system call (e.g. |
Eric Blake | a50dec2 | 2010-04-01 16:43:54 -0600 | [diff] [blame] | 112 | # cygwin1.dll before v1.5.22). |
Stefan-W. Hahn | 6900679 | 2007-01-09 22:04:12 +0100 | [diff] [blame] | 113 | # |
Shawn O. Pearce | 1510fea | 2006-12-14 06:15:57 -0500 | [diff] [blame] | 114 | # Define NO_FAST_WORKING_DIRECTORY if accessing objects in pack files is |
| 115 | # generally faster on your platform than accessing the working directory. |
| 116 | # |
Shawn O. Pearce | c869753 | 2006-12-30 23:53:55 -0500 | [diff] [blame] | 117 | # Define NO_TRUSTABLE_FILEMODE if your filesystem may claim to support |
| 118 | # the executable mode bit, but doesn't really do so. |
| 119 | # |
hpa | 49744d6 | 2005-09-28 16:52:21 -0700 | [diff] [blame] | 120 | # Define NO_IPV6 if you lack IPv6 support and getaddrinfo(). |
| 121 | # |
Junio C Hamano | bdc37f5 | 2006-01-19 17:13:32 -0800 | [diff] [blame] | 122 | # Define NO_SOCKADDR_STORAGE if your platform does not have struct |
| 123 | # sockaddr_storage. |
| 124 | # |
Fernando J. Pereda | b6e56ec | 2006-02-16 09:38:01 +0100 | [diff] [blame] | 125 | # Define NO_ICONV if your libc does not properly support iconv. |
| 126 | # |
Ramsay Jones | fd547a9 | 2007-03-03 18:29:03 +0000 | [diff] [blame] | 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 **). |
| 129 | # |
David Symonds | 609a228 | 2007-11-07 14:24:28 +1100 | [diff] [blame] | 130 | # Define NO_DEFLATE_BOUND if your zlib does not have deflateBound. |
| 131 | # |
Matt Kraai | 2064887 | 2007-06-30 10:05:03 -0700 | [diff] [blame] | 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. |
Junio C Hamano | bbfc63d | 2006-12-27 14:17:35 -0800 | [diff] [blame] | 135 | # |
Petr Baudis | 5bdac8b | 2005-07-29 17:48:26 +0200 | [diff] [blame] | 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). |
Junio C Hamano | f6af75d | 2006-06-23 17:57:48 -0700 | [diff] [blame] | 141 | # |
Brian Gernhardt | c567383 | 2009-03-08 16:04:28 -0400 | [diff] [blame] | 142 | # Define USE_ST_TIMESPEC if your "struct stat" uses "st_ctimespec" instead of |
| 143 | # "st_ctim" |
| 144 | # |
Kjetil Barvik | c06ff49 | 2009-03-04 18:47:40 +0100 | [diff] [blame] | 145 | # Define NO_NSEC if your "struct stat" does not have "st_ctim.tv_nsec" |
| 146 | # available. This automatically turns USE_NSEC off. |
| 147 | # |
Petr Baudis | 5bdac8b | 2005-07-29 17:48:26 +0200 | [diff] [blame] | 148 | # Define USE_STDEV below if you want git to care about the underlying device |
Johannes Schindelin | 10455d2 | 2007-11-30 11:35:23 +0000 | [diff] [blame] | 149 | # change being considered an inode change from the update-index perspective. |
Alex Riesen | f848718 | 2006-12-04 10:50:04 +0100 | [diff] [blame] | 150 | # |
Junio C Hamano | fdb2a2a | 2008-08-18 21:57:16 +0200 | [diff] [blame] | 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. |
| 153 | # |
Junio C Hamano | 4c7100a | 2007-06-14 22:20:16 -0700 | [diff] [blame] | 154 | # Define ASCIIDOC8 if you want to format documentation with AsciiDoc 8 |
| 155 | # |
Jonathan Nieder | 162213d | 2009-10-09 05:15:29 -0500 | [diff] [blame] | 156 | # Define DOCBOOK_XSL_172 if you want to format man pages with DocBook XSL v1.72 |
| 157 | # (not v1.73 or v1.71). |
| 158 | # |
| 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). |
Jonas Fonseca | 7f55cf4 | 2007-11-14 10:38:46 +0100 | [diff] [blame] | 161 | # |
Thomas Rast | 204d363 | 2009-10-22 10:19:06 +0200 | [diff] [blame] | 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 |
| 164 | # will work. |
| 165 | # |
Alex Riesen | f848718 | 2006-12-04 10:50:04 +0100 | [diff] [blame] | 166 | # Define NO_PERL_MAKEMAKER if you cannot use Makefiles generated by perl's |
| 167 | # MakeMaker (e.g. using ActiveState under Cygwin). |
| 168 | # |
Jeff King | 499c293 | 2009-04-03 15:32:20 -0400 | [diff] [blame] | 169 | # Define NO_PERL if you do not want Perl scripts or libraries at all. |
| 170 | # |
Johan Herland | d4e1b47 | 2009-11-18 02:42:31 +0100 | [diff] [blame] | 171 | # Define NO_PYTHON if you do not want Python scripts or libraries at all. |
| 172 | # |
Eygene Ryabinkin | 3cfaf11 | 2007-03-28 04:00:23 -0700 | [diff] [blame] | 173 | # Define NO_TCLTK if you do not want Tcl/Tk GUI. |
| 174 | # |
Shawn O. Pearce | 5f5dbd7 | 2007-05-07 23:36:31 -0400 | [diff] [blame] | 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'. |
| 178 | # |
| 179 | # The TCLTK_PATH variable governs the location of the Tcl/Tk interpreter. |
Eygene Ryabinkin | 81b63c7 | 2007-03-28 04:12:07 -0700 | [diff] [blame] | 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). |
| 182 | # |
Brian Downing | 43fe901 | 2008-02-05 15:10:44 -0600 | [diff] [blame] | 183 | # Define INTERNAL_QSORT to use Git's implementation of qsort(), which |
| 184 | # is a simplified version of the merge sort used in glibc. This is |
| 185 | # recommended if Git triggers O(n^2) behavior in your platform's qsort(). |
| 186 | # |
Johannes Sixt | 34779c5 | 2009-04-20 10:17:00 +0200 | [diff] [blame] | 187 | # Define UNRELIABLE_FSTAT if your system's fstat does not return the same |
| 188 | # information on a not yet closed file that lstat would return for the same |
| 189 | # file after it was closed. |
Johannes Schindelin | be66a6c | 2009-04-25 11:57:14 +0200 | [diff] [blame] | 190 | # |
Johannes Schindelin | 348df16 | 2009-04-28 00:32:25 +0200 | [diff] [blame] | 191 | # Define OBJECT_CREATION_USES_RENAMES if your operating systems has problems |
| 192 | # when hardlinking a file to another name and unlinking the original file right |
Johannes Schindelin | be66a6c | 2009-04-25 11:57:14 +0200 | [diff] [blame] | 193 | # away (some NTFS drivers seem to zero the contents in that scenario). |
Junio C Hamano | 2c8f8b1 | 2009-05-23 01:43:08 -0700 | [diff] [blame] | 194 | # |
Johannes Schindelin | 3426e34 | 2009-05-11 13:02:18 +0200 | [diff] [blame] | 195 | # Define NO_CROSS_DIRECTORY_HARDLINKS if you plan to distribute the installed |
| 196 | # programs as a tar, where bin/ and libexec/ might be on different file systems. |
Marius Storm-Olsen | f0ed822 | 2009-05-31 18:15:23 +0200 | [diff] [blame] | 197 | # |
| 198 | # Define USE_NED_ALLOCATOR if you want to replace the platforms default |
| 199 | # memory allocators with the nedmalloc allocator written by Niall Douglas. |
Jeff King | 02232ad | 2009-06-16 15:07:40 -0400 | [diff] [blame] | 200 | # |
| 201 | # Define NO_REGEX if you have no or inferior regex support in your C library. |
Jonathan Nieder | 8f4b576 | 2009-10-30 20:44:41 -0500 | [diff] [blame] | 202 | # |
Jakub Narebski | 63267de | 2009-09-01 13:39:20 +0200 | [diff] [blame] | 203 | # Define JSMIN to point to JavaScript minifier that functions as |
| 204 | # a filter to have gitweb.js minified. |
Junio C Hamano | 8678bc0 | 2009-12-01 11:28:15 -0800 | [diff] [blame] | 205 | # |
Mark Rada | 0e6ce21 | 2010-04-02 20:35:05 -0400 | [diff] [blame] | 206 | # Define CSSMIN to point to a CSS minifier in order to generate a minified |
| 207 | # version of gitweb.css |
| 208 | # |
Junio C Hamano | a3d023d | 2009-10-30 20:45:34 -0500 | [diff] [blame] | 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. |
| 212 | # |
Jonathan Nieder | 8f4b576 | 2009-10-30 20:44:41 -0500 | [diff] [blame] | 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: |
| 216 | # |
| 217 | # DEFAULT_EDITOR='~/bin/vi', |
| 218 | # DEFAULT_EDITOR='$GIT_FALLBACK_EDITOR', |
| 219 | # DEFAULT_EDITOR='"C:\Program Files\Vim\gvim.exe" --nofork' |
Jonathan Nieder | dfea575 | 2010-01-26 09:52:49 -0600 | [diff] [blame] | 220 | # |
| 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 |
| 223 | # changes. |
Jonathan Nieder | f2fabbf | 2010-01-26 09:57:15 -0600 | [diff] [blame] | 224 | # |
| 225 | # Define CHECK_HEADER_DEPENDENCIES to check for problems in the hard-coded |
| 226 | # dependency rules. |
Petr Baudis | 5bdac8b | 2005-07-29 17:48:26 +0200 | [diff] [blame] | 227 | |
Jonathan Nieder | 13fca9f | 2010-01-06 02:06:58 -0600 | [diff] [blame] | 228 | GIT-VERSION-FILE: FORCE |
Fredrik Kuivinen | 3654638 | 2006-02-14 00:15:14 +0100 | [diff] [blame] | 229 | @$(SHELL_PATH) ./GIT-VERSION-GEN |
Junio C Hamano | 9b88fce | 2005-12-27 14:40:17 -0800 | [diff] [blame] | 230 | -include GIT-VERSION-FILE |
Petr Baudis | 5bdac8b | 2005-07-29 17:48:26 +0200 | [diff] [blame] | 231 | |
Paul Jakma | e15f545 | 2006-02-20 23:36:28 +0000 | [diff] [blame] | 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') |
Junio C Hamano | 46059cc | 2008-11-15 04:08:14 -0800 | [diff] [blame] | 237 | uname_V := $(shell sh -c 'uname -v 2>/dev/null || echo not') |
Paul Jakma | e15f545 | 2006-02-20 23:36:28 +0000 | [diff] [blame] | 238 | |
Ramsay Jones | d691d84 | 2009-11-07 20:08:01 +0000 | [diff] [blame] | 239 | ifdef MSVC |
| 240 | # avoid the MingW and Cygwin configuration sections |
| 241 | uname_S := Windows |
| 242 | uname_O := Windows |
| 243 | endif |
| 244 | |
Junio C Hamano | 94d2331 | 2005-11-13 01:46:13 -0800 | [diff] [blame] | 245 | # CFLAGS and LDFLAGS are for the users to override from the command line. |
Junio C Hamano | 12aa745 | 2005-11-04 23:50:09 -0800 | [diff] [blame] | 246 | |
Pavel Roskin | b05701c | 2005-08-06 01:36:15 -0400 | [diff] [blame] | 247 | CFLAGS = -g -O2 -Wall |
Junio C Hamano | 94d2331 | 2005-11-13 01:46:13 -0800 | [diff] [blame] | 248 | LDFLAGS = |
Gary V. Vaughan | ebef827 | 2010-05-14 09:31:32 +0000 | [diff] [blame] | 249 | ALL_CFLAGS = $(CPPFLAGS) $(CFLAGS) |
Junio C Hamano | 94d2331 | 2005-11-13 01:46:13 -0800 | [diff] [blame] | 250 | ALL_LDFLAGS = $(LDFLAGS) |
Junio C Hamano | 4dc0002 | 2006-01-12 21:42:25 -0800 | [diff] [blame] | 251 | STRIP ?= strip |
Thomas Glanzmann | 29c2cce | 2005-05-07 10:41:54 +0200 | [diff] [blame] | 252 | |
Johannes Sixt | 49fa65a | 2008-07-23 21:12:18 +0200 | [diff] [blame] | 253 | # Among the variables below, these: |
| 254 | # gitexecdir |
| 255 | # template_dir |
Steffen Prohaska | 026fa0d | 2009-01-18 13:00:09 +0100 | [diff] [blame] | 256 | # mandir |
| 257 | # infodir |
Johannes Sixt | 49fa65a | 2008-07-23 21:12:18 +0200 | [diff] [blame] | 258 | # htmldir |
| 259 | # ETC_GITCONFIG (but not sysconfdir) |
Steffen Prohaska | 026fa0d | 2009-01-18 13:00:09 +0100 | [diff] [blame] | 260 | # can be specified as a relative path some/where/else; |
| 261 | # this is interpreted as relative to $(prefix) and "git" at |
Johannes Sixt | 49fa65a | 2008-07-23 21:12:18 +0200 | [diff] [blame] | 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. |
| 264 | |
Pavel Roskin | b05701c | 2005-08-06 01:36:15 -0400 | [diff] [blame] | 265 | prefix = $(HOME) |
Steffen Prohaska | 026fa0d | 2009-01-18 13:00:09 +0100 | [diff] [blame] | 266 | bindir_relative = bin |
| 267 | bindir = $(prefix)/$(bindir_relative) |
| 268 | mandir = share/man |
| 269 | infodir = share/info |
| 270 | gitexecdir = libexec/git-core |
Johannes Sixt | 9354768 | 2007-06-11 10:02:17 +0200 | [diff] [blame] | 271 | sharedir = $(prefix)/share |
Steffen Prohaska | 026fa0d | 2009-01-18 13:00:09 +0100 | [diff] [blame] | 272 | template_dir = share/git-core/templates |
| 273 | htmldir = share/doc/git-doc |
Josh Triplett | b51b8bb | 2007-04-24 00:51:35 -0700 | [diff] [blame] | 274 | ifeq ($(prefix),/usr) |
| 275 | sysconfdir = /etc |
Steffen Prohaska | 026fa0d | 2009-01-18 13:00:09 +0100 | [diff] [blame] | 276 | ETC_GITCONFIG = $(sysconfdir)/gitconfig |
Josh Triplett | b51b8bb | 2007-04-24 00:51:35 -0700 | [diff] [blame] | 277 | else |
| 278 | sysconfdir = $(prefix)/etc |
Steffen Prohaska | 026fa0d | 2009-01-18 13:00:09 +0100 | [diff] [blame] | 279 | ETC_GITCONFIG = etc/gitconfig |
Josh Triplett | b51b8bb | 2007-04-24 00:51:35 -0700 | [diff] [blame] | 280 | endif |
Robert Schiele | 10861be | 2007-08-01 06:30:35 +0200 | [diff] [blame] | 281 | lib = lib |
Petr Baudis | a682ef9 | 2005-08-05 01:56:38 +0200 | [diff] [blame] | 282 | # DESTDIR= |
Johannes Schindelin | 352c811 | 2009-05-23 10:04:48 +0200 | [diff] [blame] | 283 | pathsep = : |
Petr Baudis | 5c2a7fb | 2005-04-13 02:14:06 -0700 | [diff] [blame] | 284 | |
Michael J Gruber | 8ea7ad6 | 2009-02-10 16:14:13 +0100 | [diff] [blame] | 285 | export prefix bindir sharedir sysconfdir |
Jakub Narebski | e14421b | 2006-06-29 22:11:25 +0200 | [diff] [blame] | 286 | |
Pavel Roskin | b05701c | 2005-08-06 01:36:15 -0400 | [diff] [blame] | 287 | CC = gcc |
| 288 | AR = ar |
Emil Medve | 4cb08df | 2007-07-14 12:51:44 -0500 | [diff] [blame] | 289 | RM = rm -f |
Gary V. Vaughan | d1b1a91 | 2010-05-14 09:31:36 +0000 | [diff] [blame^] | 290 | DIFF = diff |
Junio C Hamano | 229a7ed | 2005-09-23 10:41:40 -0700 | [diff] [blame] | 291 | TAR = tar |
David Kastrup | 89b2f19 | 2007-07-29 15:23:28 -0700 | [diff] [blame] | 292 | FIND = find |
Pavel Roskin | b05701c | 2005-08-06 01:36:15 -0400 | [diff] [blame] | 293 | INSTALL = install |
| 294 | RPMBUILD = rpmbuild |
Shawn O. Pearce | 5f5dbd7 | 2007-05-07 23:36:31 -0400 | [diff] [blame] | 295 | TCL_PATH = tclsh |
Eygene Ryabinkin | 81b63c7 | 2007-03-28 04:12:07 -0700 | [diff] [blame] | 296 | TCLTK_PATH = wish |
David M. Syzdek | 158629b | 2008-11-02 14:43:20 -0900 | [diff] [blame] | 297 | PTHREAD_LIBS = -lpthread |
Gary V. Vaughan | 48793cf | 2010-05-14 09:31:34 +0000 | [diff] [blame] | 298 | PTHREAD_CFLAGS = |
Linus Torvalds | e83c516 | 2005-04-07 15:13:13 -0700 | [diff] [blame] | 299 | |
Shawn O. Pearce | 5f5dbd7 | 2007-05-07 23:36:31 -0400 | [diff] [blame] | 300 | export TCL_PATH TCLTK_PATH |
| 301 | |
Linus Torvalds | 44c9e85 | 2005-07-03 10:02:35 -0700 | [diff] [blame] | 302 | # sparse is architecture-neutral, which means that we need to tell it |
| 303 | # explicitly what architecture to check for. Fix this up for yours.. |
Pavel Roskin | b05701c | 2005-08-06 01:36:15 -0400 | [diff] [blame] | 304 | SPARSE_FLAGS = -D__BIG_ENDIAN__ -D__powerpc__ |
Linus Torvalds | 44c9e85 | 2005-07-03 10:02:35 -0700 | [diff] [blame] | 305 | |
Petr Baudis | 28818ff | 2005-07-29 17:50:24 +0200 | [diff] [blame] | 306 | |
| 307 | |
| 308 | ### --- END CONFIGURATION SECTION --- |
| 309 | |
Petr Baudis | 8d7f586 | 2006-06-25 03:47:03 +0200 | [diff] [blame] | 310 | # Those must not be GNU-specific; they are shared with perl/ which may |
Petr Baudis | 18b0fc1 | 2006-09-23 20:20:47 +0200 | [diff] [blame] | 311 | # be built by a different compiler. (Note that this is an artifact now |
| 312 | # but it still might be nice to keep that distinction.) |
Linus Torvalds | 81b50f3 | 2010-02-22 08:42:18 -0800 | [diff] [blame] | 313 | BASIC_CFLAGS = -I. |
Petr Baudis | 18b0fc1 | 2006-09-23 20:20:47 +0200 | [diff] [blame] | 314 | BASIC_LDFLAGS = |
Petr Baudis | 8d7f586 | 2006-06-25 03:47:03 +0200 | [diff] [blame] | 315 | |
Johannes Schindelin | 5c928c0 | 2009-03-25 17:27:28 +0100 | [diff] [blame] | 316 | # Guard against environment variables |
| 317 | BUILTIN_OBJS = |
| 318 | BUILT_INS = |
| 319 | COMPAT_CFLAGS = |
| 320 | COMPAT_OBJS = |
Jonathan Nieder | a673cfe | 2010-03-19 22:20:12 -0500 | [diff] [blame] | 321 | EXTRA_CPPFLAGS = |
Johannes Schindelin | 5c928c0 | 2009-03-25 17:27:28 +0100 | [diff] [blame] | 322 | LIB_H = |
| 323 | LIB_OBJS = |
Jonathan Nieder | 1b22c99 | 2010-01-26 09:54:23 -0600 | [diff] [blame] | 324 | PROGRAM_OBJS = |
Johannes Schindelin | 5c928c0 | 2009-03-25 17:27:28 +0100 | [diff] [blame] | 325 | PROGRAMS = |
| 326 | SCRIPT_PERL = |
Johan Herland | d4e1b47 | 2009-11-18 02:42:31 +0100 | [diff] [blame] | 327 | SCRIPT_PYTHON = |
Johannes Schindelin | 5c928c0 | 2009-03-25 17:27:28 +0100 | [diff] [blame] | 328 | SCRIPT_SH = |
Jonathan Nieder | 46bac90 | 2010-01-31 11:46:53 -0800 | [diff] [blame] | 329 | SCRIPT_LIB = |
Jonathan Nieder | 225f78c | 2010-01-26 10:08:44 -0600 | [diff] [blame] | 330 | TEST_PROGRAMS_NEED_X = |
Johannes Schindelin | 5c928c0 | 2009-03-25 17:27:28 +0100 | [diff] [blame] | 331 | |
Jonathan Nieder | c40d92e | 2010-03-19 19:06:15 -0500 | [diff] [blame] | 332 | # Having this variable in your environment would break pipelines because |
| 333 | # you cause "cd" to echo its destination to stdout. It can also take |
| 334 | # scripts to unexpected places. If you like CDPATH, define it for your |
| 335 | # interactive shell sessions without exporting it. |
| 336 | unexport CDPATH |
| 337 | |
Junio C Hamano | 74ca5e6 | 2008-03-12 01:46:26 -0700 | [diff] [blame] | 338 | SCRIPT_SH += git-am.sh |
| 339 | SCRIPT_SH += git-bisect.sh |
David Aguilar | afcbc8e | 2009-04-07 01:21:20 -0700 | [diff] [blame] | 340 | SCRIPT_SH += git-difftool--helper.sh |
Junio C Hamano | 74ca5e6 | 2008-03-12 01:46:26 -0700 | [diff] [blame] | 341 | SCRIPT_SH += git-filter-branch.sh |
| 342 | SCRIPT_SH += git-lost-found.sh |
| 343 | SCRIPT_SH += git-merge-octopus.sh |
| 344 | SCRIPT_SH += git-merge-one-file.sh |
| 345 | SCRIPT_SH += git-merge-resolve.sh |
Junio C Hamano | 74ca5e6 | 2008-03-12 01:46:26 -0700 | [diff] [blame] | 346 | SCRIPT_SH += git-mergetool.sh |
Junio C Hamano | 74ca5e6 | 2008-03-12 01:46:26 -0700 | [diff] [blame] | 347 | SCRIPT_SH += git-pull.sh |
| 348 | SCRIPT_SH += git-quiltimport.sh |
| 349 | SCRIPT_SH += git-rebase--interactive.sh |
| 350 | SCRIPT_SH += git-rebase.sh |
| 351 | SCRIPT_SH += git-repack.sh |
| 352 | SCRIPT_SH += git-request-pull.sh |
Junio C Hamano | 74ca5e6 | 2008-03-12 01:46:26 -0700 | [diff] [blame] | 353 | SCRIPT_SH += git-stash.sh |
| 354 | SCRIPT_SH += git-submodule.sh |
| 355 | SCRIPT_SH += git-web--browse.sh |
Petr Baudis | 28818ff | 2005-07-29 17:50:24 +0200 | [diff] [blame] | 356 | |
Jonathan Nieder | 46bac90 | 2010-01-31 11:46:53 -0800 | [diff] [blame] | 357 | SCRIPT_LIB += git-mergetool--lib |
| 358 | SCRIPT_LIB += git-parse-remote |
| 359 | SCRIPT_LIB += git-sh-setup |
| 360 | |
Junio C Hamano | 74ca5e6 | 2008-03-12 01:46:26 -0700 | [diff] [blame] | 361 | SCRIPT_PERL += git-add--interactive.perl |
David Aguilar | afcbc8e | 2009-04-07 01:21:20 -0700 | [diff] [blame] | 362 | SCRIPT_PERL += git-difftool.perl |
Junio C Hamano | 74ca5e6 | 2008-03-12 01:46:26 -0700 | [diff] [blame] | 363 | SCRIPT_PERL += git-archimport.perl |
| 364 | SCRIPT_PERL += git-cvsexportcommit.perl |
| 365 | SCRIPT_PERL += git-cvsimport.perl |
| 366 | SCRIPT_PERL += git-cvsserver.perl |
| 367 | SCRIPT_PERL += git-relink.perl |
| 368 | SCRIPT_PERL += git-send-email.perl |
| 369 | SCRIPT_PERL += git-svn.perl |
Junio C Hamano | 60036a4 | 2005-07-30 17:31:47 -0700 | [diff] [blame] | 370 | |
Andreas Ericsson | d6ebd25 | 2005-11-22 00:44:15 +0100 | [diff] [blame] | 371 | SCRIPTS = $(patsubst %.sh,%,$(SCRIPT_SH)) \ |
| 372 | $(patsubst %.perl,%,$(SCRIPT_PERL)) \ |
Johan Herland | d4e1b47 | 2009-11-18 02:42:31 +0100 | [diff] [blame] | 373 | $(patsubst %.py,%,$(SCRIPT_PYTHON)) \ |
Shawn O. Pearce | e475fe1 | 2007-11-23 15:35:08 -0500 | [diff] [blame] | 374 | git-instaweb |
Andreas Ericsson | d6ebd25 | 2005-11-22 00:44:15 +0100 | [diff] [blame] | 375 | |
Junio C Hamano | 42f7740 | 2006-08-15 21:38:07 -0700 | [diff] [blame] | 376 | # Empty... |
| 377 | EXTRA_PROGRAMS = |
Andreas Ericsson | d6ebd25 | 2005-11-22 00:44:15 +0100 | [diff] [blame] | 378 | |
Junio C Hamano | 74ca5e6 | 2008-03-12 01:46:26 -0700 | [diff] [blame] | 379 | # ... and all the rest that could be moved out of bindir to gitexecdir |
| 380 | PROGRAMS += $(EXTRA_PROGRAMS) |
Jonathan Nieder | 1b22c99 | 2010-01-26 09:54:23 -0600 | [diff] [blame] | 381 | |
| 382 | PROGRAM_OBJS += fast-import.o |
| 383 | PROGRAM_OBJS += imap-send.o |
| 384 | PROGRAM_OBJS += shell.o |
| 385 | PROGRAM_OBJS += show-index.o |
| 386 | PROGRAM_OBJS += upload-pack.o |
| 387 | PROGRAM_OBJS += http-backend.o |
| 388 | |
| 389 | PROGRAMS += $(patsubst %.o,git-%$X,$(PROGRAM_OBJS)) |
Junio C Hamano | 74ca5e6 | 2008-03-12 01:46:26 -0700 | [diff] [blame] | 390 | |
Jonathan Nieder | 225f78c | 2010-01-26 10:08:44 -0600 | [diff] [blame] | 391 | TEST_PROGRAMS_NEED_X += test-chmtime |
| 392 | TEST_PROGRAMS_NEED_X += test-ctype |
| 393 | TEST_PROGRAMS_NEED_X += test-date |
| 394 | TEST_PROGRAMS_NEED_X += test-delta |
| 395 | TEST_PROGRAMS_NEED_X += test-dump-cache-tree |
| 396 | TEST_PROGRAMS_NEED_X += test-genrandom |
| 397 | TEST_PROGRAMS_NEED_X += test-match-trees |
| 398 | TEST_PROGRAMS_NEED_X += test-parse-options |
| 399 | TEST_PROGRAMS_NEED_X += test-path-utils |
| 400 | TEST_PROGRAMS_NEED_X += test-run-command |
| 401 | TEST_PROGRAMS_NEED_X += test-sha1 |
| 402 | TEST_PROGRAMS_NEED_X += test-sigchain |
| 403 | TEST_PROGRAMS_NEED_X += test-index-version |
| 404 | |
Junio C Hamano | a026d53 | 2010-03-02 12:44:08 -0800 | [diff] [blame] | 405 | TEST_PROGRAMS = $(patsubst %,%$X,$(TEST_PROGRAMS_NEED_X)) |
Andreas Ericsson | d6ebd25 | 2005-11-22 00:44:15 +0100 | [diff] [blame] | 406 | |
Junio C Hamano | 1736855 | 2008-02-23 11:08:25 -0800 | [diff] [blame] | 407 | # List built-in command $C whose implementation cmd_$C() is not in |
Linus Torvalds | 81b50f3 | 2010-02-22 08:42:18 -0800 | [diff] [blame] | 408 | # builtin/$C.o but is linked in as part of some other command. |
| 409 | BUILT_INS += $(patsubst builtin/%.o,git-%$X,$(BUILTIN_OBJS)) |
Junio C Hamano | 74ca5e6 | 2008-03-12 01:46:26 -0700 | [diff] [blame] | 410 | |
Junio C Hamano | 74ca5e6 | 2008-03-12 01:46:26 -0700 | [diff] [blame] | 411 | BUILT_INS += git-cherry$X |
Stephan Beyer | fcb6c07 | 2009-02-09 23:00:45 +0100 | [diff] [blame] | 412 | BUILT_INS += git-cherry-pick$X |
Junio C Hamano | 74ca5e6 | 2008-03-12 01:46:26 -0700 | [diff] [blame] | 413 | BUILT_INS += git-format-patch$X |
| 414 | BUILT_INS += git-fsck-objects$X |
| 415 | BUILT_INS += git-get-tar-commit-id$X |
| 416 | BUILT_INS += git-init$X |
| 417 | BUILT_INS += git-merge-subtree$X |
| 418 | BUILT_INS += git-peek-remote$X |
| 419 | BUILT_INS += git-repo-config$X |
| 420 | BUILT_INS += git-show$X |
Junio C Hamano | 24b1f65 | 2008-12-03 00:30:34 -0800 | [diff] [blame] | 421 | BUILT_INS += git-stage$X |
Junio C Hamano | 74ca5e6 | 2008-03-12 01:46:26 -0700 | [diff] [blame] | 422 | BUILT_INS += git-status$X |
| 423 | BUILT_INS += git-whatchanged$X |
Junio C Hamano | 9173080 | 2006-04-10 17:37:58 -0700 | [diff] [blame] | 424 | |
Junio C Hamano | ad17f01 | 2009-08-07 12:09:29 -0700 | [diff] [blame] | 425 | # what 'all' will build and 'install' will install in gitexecdir, |
| 426 | # excluding programs for built-in commands |
Junio C Hamano | 6506e15 | 2007-02-06 21:27:09 -0800 | [diff] [blame] | 427 | ALL_PROGRAMS = $(PROGRAMS) $(SCRIPTS) |
Linus Torvalds | e83c516 | 2005-04-07 15:13:13 -0700 | [diff] [blame] | 428 | |
Eygene Ryabinkin | 3cfaf11 | 2007-03-28 04:00:23 -0700 | [diff] [blame] | 429 | # what 'all' will build but not install in gitexecdir |
Jeff King | 499c293 | 2009-04-03 15:32:20 -0400 | [diff] [blame] | 430 | OTHER_PROGRAMS = git$X |
Eygene Ryabinkin | 3cfaf11 | 2007-03-28 04:00:23 -0700 | [diff] [blame] | 431 | |
Matthew Ogilvie | ea92519 | 2009-12-02 22:14:05 -0700 | [diff] [blame] | 432 | # what test wrappers are needed and 'install' will install, in bindir |
| 433 | BINDIR_PROGRAMS_NEED_X += git |
| 434 | BINDIR_PROGRAMS_NEED_X += git-upload-pack |
| 435 | BINDIR_PROGRAMS_NEED_X += git-receive-pack |
| 436 | BINDIR_PROGRAMS_NEED_X += git-upload-archive |
| 437 | BINDIR_PROGRAMS_NEED_X += git-shell |
| 438 | |
| 439 | BINDIR_PROGRAMS_NO_X += git-cvsserver |
| 440 | |
Ryan Anderson | 3d32051 | 2005-11-21 00:11:22 -0500 | [diff] [blame] | 441 | # Set paths to tools early so that they can be used for version tests. |
| 442 | ifndef SHELL_PATH |
| 443 | SHELL_PATH = /bin/sh |
| 444 | endif |
| 445 | ifndef PERL_PATH |
| 446 | PERL_PATH = /usr/bin/perl |
| 447 | endif |
Johan Herland | d4e1b47 | 2009-11-18 02:42:31 +0100 | [diff] [blame] | 448 | ifndef PYTHON_PATH |
| 449 | PYTHON_PATH = /usr/bin/python |
| 450 | endif |
Junio C Hamano | 720d150 | 2005-09-10 17:46:27 -0700 | [diff] [blame] | 451 | |
Luben Tuikov | 3a79347 | 2006-12-14 23:03:03 -0800 | [diff] [blame] | 452 | export PERL_PATH |
Johan Herland | d4e1b47 | 2009-11-18 02:42:31 +0100 | [diff] [blame] | 453 | export PYTHON_PATH |
Luben Tuikov | 3a79347 | 2006-12-14 23:03:03 -0800 | [diff] [blame] | 454 | |
Linus Torvalds | 0a02ce7 | 2005-04-18 12:49:39 -0700 | [diff] [blame] | 455 | LIB_FILE=libgit.a |
Linus Torvalds | 3443546 | 2006-03-24 20:13:22 -0800 | [diff] [blame] | 456 | XDIFF_LIB=xdiff/lib.a |
Linus Torvalds | 0a02ce7 | 2005-04-18 12:49:39 -0700 | [diff] [blame] | 457 | |
Jeff King | 7519443 | 2009-09-09 07:38:58 -0400 | [diff] [blame] | 458 | LIB_H += advice.h |
Junio C Hamano | 74ca5e6 | 2008-03-12 01:46:26 -0700 | [diff] [blame] | 459 | LIB_H += archive.h |
| 460 | LIB_H += attr.h |
| 461 | LIB_H += blob.h |
| 462 | LIB_H += builtin.h |
| 463 | LIB_H += cache.h |
| 464 | LIB_H += cache-tree.h |
Jonathan Nieder | 21528ab | 2010-01-26 09:44:47 -0600 | [diff] [blame] | 465 | LIB_H += color.h |
Junio C Hamano | 74ca5e6 | 2008-03-12 01:46:26 -0700 | [diff] [blame] | 466 | LIB_H += commit.h |
Dmitry V. Levin | 7545712 | 2009-11-02 02:09:05 +0300 | [diff] [blame] | 467 | LIB_H += compat/bswap.h |
Dmitry Potapov | adbc0b6 | 2008-09-30 17:53:47 +0400 | [diff] [blame] | 468 | LIB_H += compat/cygwin.h |
Stephan Beyer | fcb6c07 | 2009-02-09 23:00:45 +0100 | [diff] [blame] | 469 | LIB_H += compat/mingw.h |
Andrzej K. Haczewski | 44626dc | 2010-01-15 21:12:20 +0100 | [diff] [blame] | 470 | LIB_H += compat/win32/pthread.h |
Junio C Hamano | 74ca5e6 | 2008-03-12 01:46:26 -0700 | [diff] [blame] | 471 | LIB_H += csum-file.h |
| 472 | LIB_H += decorate.h |
| 473 | LIB_H += delta.h |
| 474 | LIB_H += diffcore.h |
| 475 | LIB_H += diff.h |
| 476 | LIB_H += dir.h |
Jonathan Nieder | 21528ab | 2010-01-26 09:44:47 -0600 | [diff] [blame] | 477 | LIB_H += exec_cmd.h |
Junio C Hamano | 74ca5e6 | 2008-03-12 01:46:26 -0700 | [diff] [blame] | 478 | LIB_H += fsck.h |
| 479 | LIB_H += git-compat-util.h |
Adam Simpkins | c12172d | 2008-05-04 03:36:53 -0700 | [diff] [blame] | 480 | LIB_H += graph.h |
Junio C Hamano | 74ca5e6 | 2008-03-12 01:46:26 -0700 | [diff] [blame] | 481 | LIB_H += grep.h |
| 482 | LIB_H += hash.h |
Miklos Vajna | 940208a | 2008-07-30 01:16:58 +0200 | [diff] [blame] | 483 | LIB_H += help.h |
Johannes Schindelin | 8af84da | 2008-08-31 15:50:23 +0200 | [diff] [blame] | 484 | LIB_H += levenshtein.h |
Junio C Hamano | 74ca5e6 | 2008-03-12 01:46:26 -0700 | [diff] [blame] | 485 | LIB_H += list-objects.h |
| 486 | LIB_H += ll-merge.h |
| 487 | LIB_H += log-tree.h |
| 488 | LIB_H += mailmap.h |
Miklos Vajna | db3a954 | 2008-09-03 01:49:05 +0200 | [diff] [blame] | 489 | LIB_H += merge-recursive.h |
Johannes Schindelin | a97a746 | 2009-10-09 12:21:57 +0200 | [diff] [blame] | 490 | LIB_H += notes.h |
Junio C Hamano | 74ca5e6 | 2008-03-12 01:46:26 -0700 | [diff] [blame] | 491 | LIB_H += object.h |
| 492 | LIB_H += pack.h |
Johan Herland | 94e724a | 2008-06-15 16:05:06 +0200 | [diff] [blame] | 493 | LIB_H += pack-refs.h |
Junio C Hamano | 74ca5e6 | 2008-03-12 01:46:26 -0700 | [diff] [blame] | 494 | LIB_H += pack-revindex.h |
| 495 | LIB_H += parse-options.h |
| 496 | LIB_H += patch-ids.h |
Junio C Hamano | 74ca5e6 | 2008-03-12 01:46:26 -0700 | [diff] [blame] | 497 | LIB_H += pkt-line.h |
| 498 | LIB_H += progress.h |
| 499 | LIB_H += quote.h |
| 500 | LIB_H += reflog-walk.h |
| 501 | LIB_H += refs.h |
| 502 | LIB_H += remote.h |
Stephan Beyer | 5b2fd95 | 2008-07-09 14:58:57 +0200 | [diff] [blame] | 503 | LIB_H += rerere.h |
Junio C Hamano | cfc5789 | 2009-12-25 00:30:51 -0800 | [diff] [blame] | 504 | LIB_H += resolve-undo.h |
Junio C Hamano | 74ca5e6 | 2008-03-12 01:46:26 -0700 | [diff] [blame] | 505 | LIB_H += revision.h |
| 506 | LIB_H += run-command.h |
Junio C Hamano | 628522e | 2007-12-29 02:05:47 -0800 | [diff] [blame] | 507 | LIB_H += sha1-lookup.h |
Junio C Hamano | 74ca5e6 | 2008-03-12 01:46:26 -0700 | [diff] [blame] | 508 | LIB_H += sideband.h |
Jeff King | 4a16d07 | 2009-01-22 01:02:35 -0500 | [diff] [blame] | 509 | LIB_H += sigchain.h |
Junio C Hamano | 74ca5e6 | 2008-03-12 01:46:26 -0700 | [diff] [blame] | 510 | LIB_H += strbuf.h |
Stephan Beyer | fcb6c07 | 2009-02-09 23:00:45 +0100 | [diff] [blame] | 511 | LIB_H += string-list.h |
Johannes Schindelin | 752c0c2 | 2009-10-19 14:38:32 +0200 | [diff] [blame] | 512 | LIB_H += submodule.h |
Junio C Hamano | 74ca5e6 | 2008-03-12 01:46:26 -0700 | [diff] [blame] | 513 | LIB_H += tag.h |
| 514 | LIB_H += transport.h |
| 515 | LIB_H += tree.h |
| 516 | LIB_H += tree-walk.h |
| 517 | LIB_H += unpack-trees.h |
Jeff King | be58e70 | 2008-10-05 17:43:21 -0400 | [diff] [blame] | 518 | LIB_H += userdiff.h |
Junio C Hamano | 74ca5e6 | 2008-03-12 01:46:26 -0700 | [diff] [blame] | 519 | LIB_H += utf8.h |
Jonathan Nieder | 21528ab | 2010-01-26 09:44:47 -0600 | [diff] [blame] | 520 | LIB_H += xdiff-interface.h |
| 521 | LIB_H += xdiff/xdiff.h |
Junio C Hamano | 8f3f9b0 | 2005-07-23 17:54:41 -0700 | [diff] [blame] | 522 | |
Dmitry Potapov | 5b8e6f8 | 2008-06-28 00:46:42 +0400 | [diff] [blame] | 523 | LIB_OBJS += abspath.o |
Jeff King | 7519443 | 2009-09-09 07:38:58 -0400 | [diff] [blame] | 524 | LIB_OBJS += advice.o |
Junio C Hamano | 74ca5e6 | 2008-03-12 01:46:26 -0700 | [diff] [blame] | 525 | LIB_OBJS += alias.o |
| 526 | LIB_OBJS += alloc.o |
| 527 | LIB_OBJS += archive.o |
| 528 | LIB_OBJS += archive-tar.o |
| 529 | LIB_OBJS += archive-zip.o |
| 530 | LIB_OBJS += attr.o |
| 531 | LIB_OBJS += base85.o |
Christian Couder | a2ad79c | 2009-03-26 05:55:24 +0100 | [diff] [blame] | 532 | LIB_OBJS += bisect.o |
Junio C Hamano | 74ca5e6 | 2008-03-12 01:46:26 -0700 | [diff] [blame] | 533 | LIB_OBJS += blob.o |
| 534 | LIB_OBJS += branch.o |
| 535 | LIB_OBJS += bundle.o |
| 536 | LIB_OBJS += cache-tree.o |
| 537 | LIB_OBJS += color.o |
| 538 | LIB_OBJS += combine-diff.o |
| 539 | LIB_OBJS += commit.o |
| 540 | LIB_OBJS += config.o |
| 541 | LIB_OBJS += connect.o |
| 542 | LIB_OBJS += convert.o |
| 543 | LIB_OBJS += copy.o |
| 544 | LIB_OBJS += csum-file.o |
| 545 | LIB_OBJS += ctype.o |
| 546 | LIB_OBJS += date.o |
| 547 | LIB_OBJS += decorate.o |
| 548 | LIB_OBJS += diffcore-break.o |
| 549 | LIB_OBJS += diffcore-delta.o |
| 550 | LIB_OBJS += diffcore-order.o |
| 551 | LIB_OBJS += diffcore-pickaxe.o |
| 552 | LIB_OBJS += diffcore-rename.o |
| 553 | LIB_OBJS += diff-delta.o |
| 554 | LIB_OBJS += diff-lib.o |
Stephan Beyer | fcb6c07 | 2009-02-09 23:00:45 +0100 | [diff] [blame] | 555 | LIB_OBJS += diff-no-index.o |
Junio C Hamano | 74ca5e6 | 2008-03-12 01:46:26 -0700 | [diff] [blame] | 556 | LIB_OBJS += diff.o |
| 557 | LIB_OBJS += dir.o |
Stephan Beyer | d82f33e | 2008-07-25 18:28:41 +0200 | [diff] [blame] | 558 | LIB_OBJS += editor.o |
Junio C Hamano | 74ca5e6 | 2008-03-12 01:46:26 -0700 | [diff] [blame] | 559 | LIB_OBJS += entry.o |
| 560 | LIB_OBJS += environment.o |
| 561 | LIB_OBJS += exec_cmd.o |
| 562 | LIB_OBJS += fsck.o |
Adam Simpkins | c12172d | 2008-05-04 03:36:53 -0700 | [diff] [blame] | 563 | LIB_OBJS += graph.o |
Junio C Hamano | 74ca5e6 | 2008-03-12 01:46:26 -0700 | [diff] [blame] | 564 | LIB_OBJS += grep.o |
| 565 | LIB_OBJS += hash.o |
| 566 | LIB_OBJS += help.o |
Linus Torvalds | a503121 | 2010-01-21 15:25:19 -0800 | [diff] [blame] | 567 | LIB_OBJS += hex.o |
Junio C Hamano | 74ca5e6 | 2008-03-12 01:46:26 -0700 | [diff] [blame] | 568 | LIB_OBJS += ident.o |
Johannes Schindelin | 8af84da | 2008-08-31 15:50:23 +0200 | [diff] [blame] | 569 | LIB_OBJS += levenshtein.o |
Junio C Hamano | 74ca5e6 | 2008-03-12 01:46:26 -0700 | [diff] [blame] | 570 | LIB_OBJS += list-objects.o |
| 571 | LIB_OBJS += ll-merge.o |
| 572 | LIB_OBJS += lockfile.o |
| 573 | LIB_OBJS += log-tree.o |
| 574 | LIB_OBJS += mailmap.o |
| 575 | LIB_OBJS += match-trees.o |
| 576 | LIB_OBJS += merge-file.o |
Miklos Vajna | 9047ebb | 2008-08-12 18:45:14 +0200 | [diff] [blame] | 577 | LIB_OBJS += merge-recursive.o |
Linus Torvalds | 96872bc | 2008-03-21 13:16:24 -0700 | [diff] [blame] | 578 | LIB_OBJS += name-hash.o |
Johannes Schindelin | a97a746 | 2009-10-09 12:21:57 +0200 | [diff] [blame] | 579 | LIB_OBJS += notes.o |
Junio C Hamano | 74ca5e6 | 2008-03-12 01:46:26 -0700 | [diff] [blame] | 580 | LIB_OBJS += object.o |
| 581 | LIB_OBJS += pack-check.o |
Johan Herland | 94e724a | 2008-06-15 16:05:06 +0200 | [diff] [blame] | 582 | LIB_OBJS += pack-refs.o |
Junio C Hamano | 74ca5e6 | 2008-03-12 01:46:26 -0700 | [diff] [blame] | 583 | LIB_OBJS += pack-revindex.o |
| 584 | LIB_OBJS += pack-write.o |
| 585 | LIB_OBJS += pager.o |
| 586 | LIB_OBJS += parse-options.o |
| 587 | LIB_OBJS += patch-delta.o |
| 588 | LIB_OBJS += patch-ids.o |
Junio C Hamano | 74ca5e6 | 2008-03-12 01:46:26 -0700 | [diff] [blame] | 589 | LIB_OBJS += path.o |
| 590 | LIB_OBJS += pkt-line.o |
Stephan Beyer | fcb6c07 | 2009-02-09 23:00:45 +0100 | [diff] [blame] | 591 | LIB_OBJS += preload-index.o |
Junio C Hamano | 74ca5e6 | 2008-03-12 01:46:26 -0700 | [diff] [blame] | 592 | LIB_OBJS += pretty.o |
| 593 | LIB_OBJS += progress.o |
| 594 | LIB_OBJS += quote.o |
| 595 | LIB_OBJS += reachable.o |
| 596 | LIB_OBJS += read-cache.o |
| 597 | LIB_OBJS += reflog-walk.o |
| 598 | LIB_OBJS += refs.o |
| 599 | LIB_OBJS += remote.o |
Christian Couder | 6809557 | 2009-01-23 10:06:53 +0100 | [diff] [blame] | 600 | LIB_OBJS += replace_object.o |
Stephan Beyer | 5b2fd95 | 2008-07-09 14:58:57 +0200 | [diff] [blame] | 601 | LIB_OBJS += rerere.o |
Junio C Hamano | cfc5789 | 2009-12-25 00:30:51 -0800 | [diff] [blame] | 602 | LIB_OBJS += resolve-undo.o |
Junio C Hamano | 74ca5e6 | 2008-03-12 01:46:26 -0700 | [diff] [blame] | 603 | LIB_OBJS += revision.o |
| 604 | LIB_OBJS += run-command.o |
| 605 | LIB_OBJS += server-info.o |
| 606 | LIB_OBJS += setup.o |
Junio C Hamano | 628522e | 2007-12-29 02:05:47 -0800 | [diff] [blame] | 607 | LIB_OBJS += sha1-lookup.o |
Stephan Beyer | fcb6c07 | 2009-02-09 23:00:45 +0100 | [diff] [blame] | 608 | LIB_OBJS += sha1_file.o |
Junio C Hamano | 74ca5e6 | 2008-03-12 01:46:26 -0700 | [diff] [blame] | 609 | LIB_OBJS += sha1_name.o |
| 610 | LIB_OBJS += shallow.o |
| 611 | LIB_OBJS += sideband.o |
Jeff King | 4a16d07 | 2009-01-22 01:02:35 -0500 | [diff] [blame] | 612 | LIB_OBJS += sigchain.o |
Junio C Hamano | 74ca5e6 | 2008-03-12 01:46:26 -0700 | [diff] [blame] | 613 | LIB_OBJS += strbuf.o |
Stephan Beyer | fcb6c07 | 2009-02-09 23:00:45 +0100 | [diff] [blame] | 614 | LIB_OBJS += string-list.o |
Johannes Schindelin | 752c0c2 | 2009-10-19 14:38:32 +0200 | [diff] [blame] | 615 | LIB_OBJS += submodule.o |
Junio C Hamano | 74ca5e6 | 2008-03-12 01:46:26 -0700 | [diff] [blame] | 616 | LIB_OBJS += symlinks.o |
| 617 | LIB_OBJS += tag.o |
| 618 | LIB_OBJS += trace.o |
| 619 | LIB_OBJS += transport.o |
Daniel Barkalow | 6eb996b | 2009-08-05 01:01:53 -0400 | [diff] [blame] | 620 | LIB_OBJS += transport-helper.o |
Junio C Hamano | 74ca5e6 | 2008-03-12 01:46:26 -0700 | [diff] [blame] | 621 | LIB_OBJS += tree-diff.o |
| 622 | LIB_OBJS += tree.o |
| 623 | LIB_OBJS += tree-walk.o |
| 624 | LIB_OBJS += unpack-trees.o |
| 625 | LIB_OBJS += usage.o |
Stephan Beyer | fcb6c07 | 2009-02-09 23:00:45 +0100 | [diff] [blame] | 626 | LIB_OBJS += userdiff.o |
Junio C Hamano | 74ca5e6 | 2008-03-12 01:46:26 -0700 | [diff] [blame] | 627 | LIB_OBJS += utf8.o |
| 628 | LIB_OBJS += walker.o |
Linus Torvalds | 112db55 | 2008-06-22 12:19:25 -0700 | [diff] [blame] | 629 | LIB_OBJS += wrapper.o |
Junio C Hamano | 74ca5e6 | 2008-03-12 01:46:26 -0700 | [diff] [blame] | 630 | LIB_OBJS += write_or_die.o |
| 631 | LIB_OBJS += ws.o |
| 632 | LIB_OBJS += wt-status.o |
| 633 | LIB_OBJS += xdiff-interface.o |
Josef Weidendorfer | b1bf95b | 2005-07-31 21:17:43 +0200 | [diff] [blame] | 634 | |
Linus Torvalds | 81b50f3 | 2010-02-22 08:42:18 -0800 | [diff] [blame] | 635 | BUILTIN_OBJS += builtin/add.o |
| 636 | BUILTIN_OBJS += builtin/annotate.o |
| 637 | BUILTIN_OBJS += builtin/apply.o |
| 638 | BUILTIN_OBJS += builtin/archive.o |
| 639 | BUILTIN_OBJS += builtin/bisect--helper.o |
| 640 | BUILTIN_OBJS += builtin/blame.o |
| 641 | BUILTIN_OBJS += builtin/branch.o |
| 642 | BUILTIN_OBJS += builtin/bundle.o |
| 643 | BUILTIN_OBJS += builtin/cat-file.o |
| 644 | BUILTIN_OBJS += builtin/check-attr.o |
| 645 | BUILTIN_OBJS += builtin/check-ref-format.o |
| 646 | BUILTIN_OBJS += builtin/checkout-index.o |
| 647 | BUILTIN_OBJS += builtin/checkout.o |
| 648 | BUILTIN_OBJS += builtin/clean.o |
| 649 | BUILTIN_OBJS += builtin/clone.o |
| 650 | BUILTIN_OBJS += builtin/commit-tree.o |
| 651 | BUILTIN_OBJS += builtin/commit.o |
| 652 | BUILTIN_OBJS += builtin/config.o |
| 653 | BUILTIN_OBJS += builtin/count-objects.o |
| 654 | BUILTIN_OBJS += builtin/describe.o |
| 655 | BUILTIN_OBJS += builtin/diff-files.o |
| 656 | BUILTIN_OBJS += builtin/diff-index.o |
| 657 | BUILTIN_OBJS += builtin/diff-tree.o |
| 658 | BUILTIN_OBJS += builtin/diff.o |
| 659 | BUILTIN_OBJS += builtin/fast-export.o |
| 660 | BUILTIN_OBJS += builtin/fetch-pack.o |
| 661 | BUILTIN_OBJS += builtin/fetch.o |
| 662 | BUILTIN_OBJS += builtin/fmt-merge-msg.o |
| 663 | BUILTIN_OBJS += builtin/for-each-ref.o |
| 664 | BUILTIN_OBJS += builtin/fsck.o |
| 665 | BUILTIN_OBJS += builtin/gc.o |
| 666 | BUILTIN_OBJS += builtin/grep.o |
| 667 | BUILTIN_OBJS += builtin/hash-object.o |
| 668 | BUILTIN_OBJS += builtin/help.o |
| 669 | BUILTIN_OBJS += builtin/index-pack.o |
| 670 | BUILTIN_OBJS += builtin/init-db.o |
| 671 | BUILTIN_OBJS += builtin/log.o |
| 672 | BUILTIN_OBJS += builtin/ls-files.o |
| 673 | BUILTIN_OBJS += builtin/ls-remote.o |
| 674 | BUILTIN_OBJS += builtin/ls-tree.o |
| 675 | BUILTIN_OBJS += builtin/mailinfo.o |
| 676 | BUILTIN_OBJS += builtin/mailsplit.o |
| 677 | BUILTIN_OBJS += builtin/merge.o |
| 678 | BUILTIN_OBJS += builtin/merge-base.o |
| 679 | BUILTIN_OBJS += builtin/merge-file.o |
| 680 | BUILTIN_OBJS += builtin/merge-index.o |
| 681 | BUILTIN_OBJS += builtin/merge-ours.o |
| 682 | BUILTIN_OBJS += builtin/merge-recursive.o |
| 683 | BUILTIN_OBJS += builtin/merge-tree.o |
| 684 | BUILTIN_OBJS += builtin/mktag.o |
| 685 | BUILTIN_OBJS += builtin/mktree.o |
| 686 | BUILTIN_OBJS += builtin/mv.o |
| 687 | BUILTIN_OBJS += builtin/name-rev.o |
Junio C Hamano | 2949151 | 2010-03-15 00:52:06 -0700 | [diff] [blame] | 688 | BUILTIN_OBJS += builtin/notes.o |
Linus Torvalds | 81b50f3 | 2010-02-22 08:42:18 -0800 | [diff] [blame] | 689 | BUILTIN_OBJS += builtin/pack-objects.o |
| 690 | BUILTIN_OBJS += builtin/pack-redundant.o |
| 691 | BUILTIN_OBJS += builtin/pack-refs.o |
| 692 | BUILTIN_OBJS += builtin/patch-id.o |
| 693 | BUILTIN_OBJS += builtin/prune-packed.o |
| 694 | BUILTIN_OBJS += builtin/prune.o |
| 695 | BUILTIN_OBJS += builtin/push.o |
| 696 | BUILTIN_OBJS += builtin/read-tree.o |
| 697 | BUILTIN_OBJS += builtin/receive-pack.o |
| 698 | BUILTIN_OBJS += builtin/reflog.o |
| 699 | BUILTIN_OBJS += builtin/remote.o |
| 700 | BUILTIN_OBJS += builtin/replace.o |
| 701 | BUILTIN_OBJS += builtin/rerere.o |
| 702 | BUILTIN_OBJS += builtin/reset.o |
| 703 | BUILTIN_OBJS += builtin/rev-list.o |
| 704 | BUILTIN_OBJS += builtin/rev-parse.o |
| 705 | BUILTIN_OBJS += builtin/revert.o |
| 706 | BUILTIN_OBJS += builtin/rm.o |
| 707 | BUILTIN_OBJS += builtin/send-pack.o |
| 708 | BUILTIN_OBJS += builtin/shortlog.o |
| 709 | BUILTIN_OBJS += builtin/show-branch.o |
| 710 | BUILTIN_OBJS += builtin/show-ref.o |
| 711 | BUILTIN_OBJS += builtin/stripspace.o |
| 712 | BUILTIN_OBJS += builtin/symbolic-ref.o |
| 713 | BUILTIN_OBJS += builtin/tag.o |
| 714 | BUILTIN_OBJS += builtin/tar-tree.o |
| 715 | BUILTIN_OBJS += builtin/unpack-file.o |
| 716 | BUILTIN_OBJS += builtin/unpack-objects.o |
| 717 | BUILTIN_OBJS += builtin/update-index.o |
| 718 | BUILTIN_OBJS += builtin/update-ref.o |
| 719 | BUILTIN_OBJS += builtin/update-server-info.o |
| 720 | BUILTIN_OBJS += builtin/upload-archive.o |
| 721 | BUILTIN_OBJS += builtin/var.o |
| 722 | BUILTIN_OBJS += builtin/verify-pack.o |
| 723 | BUILTIN_OBJS += builtin/verify-tag.o |
| 724 | BUILTIN_OBJS += builtin/write-tree.o |
Linus Torvalds | 70827b1 | 2006-04-21 10:27:34 -0700 | [diff] [blame] | 725 | |
Johannes Schindelin | 54c261f | 2006-03-27 01:14:52 +0200 | [diff] [blame] | 726 | GITLIBS = $(LIB_FILE) $(XDIFF_LIB) |
Robert Schiele | bef19da | 2007-07-29 20:35:45 +0200 | [diff] [blame] | 727 | EXTLIBS = |
Linus Torvalds | cef661f | 2005-04-21 12:33:22 -0700 | [diff] [blame] | 728 | |
Junio C Hamano | 229a7ed | 2005-09-23 10:41:40 -0700 | [diff] [blame] | 729 | # |
| 730 | # Platform specific tweaks |
| 731 | # |
Junio C Hamano | f7c1534 | 2005-10-09 12:52:35 -0700 | [diff] [blame] | 732 | |
| 733 | # We choose to avoid "if .. else if .. else .. endif endif" |
| 734 | # because maintaining the nesting to match is a pain. If |
| 735 | # we had "elif" things would have been much nicer... |
Junio C Hamano | f7c1534 | 2005-10-09 12:52:35 -0700 | [diff] [blame] | 736 | |
Peter Eriksen | 817151e | 2006-06-24 16:01:25 +0200 | [diff] [blame] | 737 | ifeq ($(uname_S),Linux) |
| 738 | NO_STRLCPY = YesPlease |
David Aguilar | 0620b39 | 2009-05-31 01:35:50 -0700 | [diff] [blame] | 739 | NO_MKSTEMPS = YesPlease |
Peter Eriksen | 817151e | 2006-06-24 16:01:25 +0200 | [diff] [blame] | 740 | endif |
Gerrit Pape | ca7a741 | 2006-07-29 16:26:18 +0000 | [diff] [blame] | 741 | ifeq ($(uname_S),GNU/kFreeBSD) |
| 742 | NO_STRLCPY = YesPlease |
David Aguilar | 0620b39 | 2009-05-31 01:35:50 -0700 | [diff] [blame] | 743 | NO_MKSTEMPS = YesPlease |
Gerrit Pape | ca7a741 | 2006-07-29 16:26:18 +0000 | [diff] [blame] | 744 | endif |
Boyd Lynn Gerber | 457bb45 | 2008-06-08 14:47:54 -0600 | [diff] [blame] | 745 | ifeq ($(uname_S),UnixWare) |
| 746 | CC = cc |
| 747 | NEEDS_SOCKET = YesPlease |
| 748 | NEEDS_NSL = YesPlease |
| 749 | NEEDS_SSL_WITH_CRYPTO = YesPlease |
| 750 | NEEDS_LIBICONV = YesPlease |
| 751 | SHELL_PATH = /usr/local/bin/bash |
| 752 | NO_IPV6 = YesPlease |
| 753 | NO_HSTRERROR = YesPlease |
David Aguilar | 0620b39 | 2009-05-31 01:35:50 -0700 | [diff] [blame] | 754 | NO_MKSTEMPS = YesPlease |
Boyd Lynn Gerber | 457bb45 | 2008-06-08 14:47:54 -0600 | [diff] [blame] | 755 | BASIC_CFLAGS += -Kthread |
| 756 | BASIC_CFLAGS += -I/usr/local/include |
| 757 | BASIC_LDFLAGS += -L/usr/local/lib |
| 758 | INSTALL = ginstall |
| 759 | TAR = gtar |
| 760 | NO_STRCASESTR = YesPlease |
| 761 | NO_MEMMEM = YesPlease |
| 762 | endif |
| 763 | ifeq ($(uname_S),SCO_SV) |
| 764 | ifeq ($(uname_R),3.2) |
| 765 | CFLAGS = -O2 |
| 766 | endif |
| 767 | ifeq ($(uname_R),5) |
| 768 | CC = cc |
| 769 | BASIC_CFLAGS += -Kthread |
| 770 | endif |
| 771 | NEEDS_SOCKET = YesPlease |
| 772 | NEEDS_NSL = YesPlease |
| 773 | NEEDS_SSL_WITH_CRYPTO = YesPlease |
| 774 | NEEDS_LIBICONV = YesPlease |
| 775 | SHELL_PATH = /usr/bin/bash |
| 776 | NO_IPV6 = YesPlease |
| 777 | NO_HSTRERROR = YesPlease |
David Aguilar | 0620b39 | 2009-05-31 01:35:50 -0700 | [diff] [blame] | 778 | NO_MKSTEMPS = YesPlease |
Boyd Lynn Gerber | 457bb45 | 2008-06-08 14:47:54 -0600 | [diff] [blame] | 779 | BASIC_CFLAGS += -I/usr/local/include |
| 780 | BASIC_LDFLAGS += -L/usr/local/lib |
| 781 | NO_STRCASESTR = YesPlease |
| 782 | NO_MEMMEM = YesPlease |
| 783 | INSTALL = ginstall |
| 784 | TAR = gtar |
| 785 | endif |
Junio C Hamano | f7c1534 | 2005-10-09 12:52:35 -0700 | [diff] [blame] | 786 | ifeq ($(uname_S),Darwin) |
Brian Gernhardt | 0460dba | 2009-09-08 09:54:38 -0400 | [diff] [blame] | 787 | NEEDS_CRYPTO_WITH_SSL = YesPlease |
Junio C Hamano | 597c9cc | 2005-09-07 12:22:56 -0700 | [diff] [blame] | 788 | NEEDS_SSL_WITH_CRYPTO = YesPlease |
| 789 | NEEDS_LIBICONV = YesPlease |
Jay Soffian | 7233d22 | 2009-02-05 01:09:08 -0500 | [diff] [blame] | 790 | ifeq ($(shell expr "$(uname_R)" : '[15678]\.'),2) |
Wincent Colaiuta | fe4aafb | 2007-12-06 20:07:03 +0100 | [diff] [blame] | 791 | OLD_ICONV = UnfortunatelyYes |
| 792 | endif |
Jay Soffian | 7233d22 | 2009-02-05 01:09:08 -0500 | [diff] [blame] | 793 | ifeq ($(shell expr "$(uname_R)" : '[15]\.'),2) |
| 794 | NO_STRLCPY = YesPlease |
| 795 | endif |
Shawn O. Pearce | 3d59405 | 2007-09-09 01:09:17 -0400 | [diff] [blame] | 796 | NO_MEMMEM = YesPlease |
Brian Gernhardt | c567383 | 2009-03-08 16:04:28 -0400 | [diff] [blame] | 797 | USE_ST_TIMESPEC = YesPlease |
Junio C Hamano | 597c9cc | 2005-09-07 12:22:56 -0700 | [diff] [blame] | 798 | endif |
Junio C Hamano | f7c1534 | 2005-10-09 12:52:35 -0700 | [diff] [blame] | 799 | ifeq ($(uname_S),SunOS) |
Patrick Mauritz | f0ebff0 | 2005-09-06 01:24:03 +0200 | [diff] [blame] | 800 | NEEDS_SOCKET = YesPlease |
Junio C Hamano | 5a90d4a | 2005-09-11 22:25:49 -0700 | [diff] [blame] | 801 | NEEDS_NSL = YesPlease |
Junio C Hamano | 229a7ed | 2005-09-23 10:41:40 -0700 | [diff] [blame] | 802 | SHELL_PATH = /bin/bash |
Junio C Hamano | 0e0aea5 | 2009-06-05 18:36:15 -0500 | [diff] [blame] | 803 | SANE_TOOL_PATH = /usr/xpg6/bin:/usr/xpg4/bin |
Junio C Hamano | 229a7ed | 2005-09-23 10:41:40 -0700 | [diff] [blame] | 804 | NO_STRCASESTR = YesPlease |
René Scharfe | b21b9f1 | 2007-09-07 00:32:54 +0200 | [diff] [blame] | 805 | NO_MEMMEM = YesPlease |
Guido Ostkamp | 4e0da76 | 2007-11-16 19:59:58 +0100 | [diff] [blame] | 806 | NO_MKDTEMP = YesPlease |
David Aguilar | 0620b39 | 2009-05-31 01:35:50 -0700 | [diff] [blame] | 807 | NO_MKSTEMPS = YesPlease |
Jeff King | ee78cac | 2009-06-16 15:08:21 -0400 | [diff] [blame] | 808 | NO_REGEX = YesPlease |
Brandon Casey | a7a24ee | 2009-06-05 18:36:16 -0500 | [diff] [blame] | 809 | ifeq ($(uname_R),5.7) |
| 810 | NEEDS_RESOLV = YesPlease |
| 811 | NO_IPV6 = YesPlease |
| 812 | NO_SOCKADDR_STORAGE = YesPlease |
| 813 | NO_UNSETENV = YesPlease |
| 814 | NO_SETENV = YesPlease |
| 815 | NO_STRLCPY = YesPlease |
| 816 | NO_C99_FORMAT = YesPlease |
| 817 | NO_STRTOUMAX = YesPlease |
Junio C Hamano | a0c0be9 | 2009-05-22 22:55:31 -0700 | [diff] [blame] | 818 | endif |
Jason Riedy | e40b61f | 2005-12-02 15:08:28 -0800 | [diff] [blame] | 819 | ifeq ($(uname_R),5.8) |
Jason Riedy | 731043f | 2006-01-25 12:38:36 -0800 | [diff] [blame] | 820 | NO_UNSETENV = YesPlease |
Jason Riedy | e40b61f | 2005-12-02 15:08:28 -0800 | [diff] [blame] | 821 | NO_SETENV = YesPlease |
Dennis Stosberg | 66c4509 | 2006-08-15 11:01:22 +0200 | [diff] [blame] | 822 | NO_C99_FORMAT = YesPlease |
Jason Riedy | bc6b4f5 | 2007-02-19 16:22:56 -0800 | [diff] [blame] | 823 | NO_STRTOUMAX = YesPlease |
Jason Riedy | e40b61f | 2005-12-02 15:08:28 -0800 | [diff] [blame] | 824 | endif |
Dennis Stosberg | 40d88d4 | 2006-04-11 11:42:26 -0700 | [diff] [blame] | 825 | ifeq ($(uname_R),5.9) |
| 826 | NO_UNSETENV = YesPlease |
| 827 | NO_SETENV = YesPlease |
Dennis Stosberg | 66c4509 | 2006-08-15 11:01:22 +0200 | [diff] [blame] | 828 | NO_C99_FORMAT = YesPlease |
Jason Riedy | bc6b4f5 | 2007-02-19 16:22:56 -0800 | [diff] [blame] | 829 | NO_STRTOUMAX = YesPlease |
Dennis Stosberg | 40d88d4 | 2006-04-11 11:42:26 -0700 | [diff] [blame] | 830 | endif |
Brandon Casey | efc07de | 2009-05-27 21:17:05 -0500 | [diff] [blame] | 831 | INSTALL = /usr/ucb/install |
Junio C Hamano | 229a7ed | 2005-09-23 10:41:40 -0700 | [diff] [blame] | 832 | TAR = gtar |
Brandon Casey | 1d7b1af | 2009-06-19 10:10:39 -0500 | [diff] [blame] | 833 | BASIC_CFLAGS += -D__EXTENSIONS__ -D__sun__ -DHAVE_ALLOCA_H |
Patrick Mauritz | f0ebff0 | 2005-09-06 01:24:03 +0200 | [diff] [blame] | 834 | endif |
Junio C Hamano | f7c1534 | 2005-10-09 12:52:35 -0700 | [diff] [blame] | 835 | ifeq ($(uname_O),Cygwin) |
Jonathan Nieder | ecebd1e | 2010-04-03 02:47:00 -0500 | [diff] [blame] | 836 | ifeq ($(shell expr "$(uname_R)" : '1\.[1-6]\.'),4) |
Eric Blake | a50dec2 | 2010-04-01 16:43:54 -0600 | [diff] [blame] | 837 | NO_D_TYPE_IN_DIRENT = YesPlease |
| 838 | NO_D_INO_IN_DIRENT = YesPlease |
| 839 | NO_STRCASESTR = YesPlease |
| 840 | NO_MEMMEM = YesPlease |
| 841 | NO_MKSTEMPS = YesPlease |
| 842 | NO_SYMLINK_HEAD = YesPlease |
| 843 | NO_IPV6 = YesPlease |
| 844 | OLD_ICONV = UnfortunatelyYes |
| 845 | endif |
hpa | 1775451 | 2005-09-28 16:37:37 -0700 | [diff] [blame] | 846 | NEEDS_LIBICONV = YesPlease |
Shawn O. Pearce | 1510fea | 2006-12-14 06:15:57 -0500 | [diff] [blame] | 847 | NO_FAST_WORKING_DIRECTORY = UnfortunatelyYes |
Shawn O. Pearce | c869753 | 2006-12-30 23:53:55 -0500 | [diff] [blame] | 848 | NO_TRUSTABLE_FILEMODE = UnfortunatelyYes |
Ramsay Jones | 7560787 | 2009-11-19 18:46:24 +0000 | [diff] [blame] | 849 | NO_ST_BLOCKS_IN_STRUCT_STAT = YesPlease |
Junio C Hamano | 2e67a5f | 2005-11-17 11:29:47 -0800 | [diff] [blame] | 850 | # There are conflicting reports about this. |
| 851 | # On some boxes NO_MMAP is needed, and not so elsewhere. |
Junio C Hamano | 87ac139 | 2006-12-27 15:12:31 -0800 | [diff] [blame] | 852 | # Try commenting this out if you suspect MMAP is more efficient |
| 853 | NO_MMAP = YesPlease |
Peter Anvin | a23cd8e | 2005-09-28 19:08:37 -0700 | [diff] [blame] | 854 | X = .exe |
Ramsay Jones | 035b76b | 2009-10-27 19:11:55 +0000 | [diff] [blame] | 855 | COMPAT_OBJS += compat/cygwin.o |
| 856 | UNRELIABLE_FSTAT = UnfortunatelyYes |
Nicolas Pitre | 7c6ef2f | 2005-09-20 12:27:13 -0400 | [diff] [blame] | 857 | endif |
Alecs King | b3bf974 | 2006-01-27 02:04:30 +0800 | [diff] [blame] | 858 | ifeq ($(uname_S),FreeBSD) |
| 859 | NEEDS_LIBICONV = YesPlease |
Junio C Hamano | 21a0d9b | 2009-12-26 14:32:36 -0800 | [diff] [blame] | 860 | OLD_ICONV = YesPlease |
Robert Boone | a2f22db | 2007-09-10 11:43:35 -0500 | [diff] [blame] | 861 | NO_MEMMEM = YesPlease |
Petr Baudis | 8d7f586 | 2006-06-25 03:47:03 +0200 | [diff] [blame] | 862 | BASIC_CFLAGS += -I/usr/local/include |
| 863 | BASIC_LDFLAGS += -L/usr/local/lib |
Alex Riesen | 81a24b5 | 2008-03-05 00:15:39 +0100 | [diff] [blame] | 864 | DIR_HAS_BSD_GROUP_SEMANTICS = YesPlease |
Jeff King | 9140804 | 2009-03-22 04:08:48 -0400 | [diff] [blame] | 865 | USE_ST_TIMESPEC = YesPlease |
David M. Syzdek | 069bb57 | 2008-10-26 03:52:47 -0800 | [diff] [blame] | 866 | ifeq ($(shell expr "$(uname_R)" : '4\.'),2) |
David M. Syzdek | 158629b | 2008-11-02 14:43:20 -0900 | [diff] [blame] | 867 | PTHREAD_LIBS = -pthread |
David M. Syzdek | 069bb57 | 2008-10-26 03:52:47 -0800 | [diff] [blame] | 868 | NO_UINTMAX_T = YesPlease |
| 869 | NO_STRTOUMAX = YesPlease |
| 870 | endif |
R. Tyler Ballance | 44211e8 | 2010-03-21 12:01:50 -0700 | [diff] [blame] | 871 | PYTHON_PATH = /usr/local/bin/python |
Alecs King | b3bf974 | 2006-01-27 02:04:30 +0800 | [diff] [blame] | 872 | endif |
Junio C Hamano | f7c1534 | 2005-10-09 12:52:35 -0700 | [diff] [blame] | 873 | ifeq ($(uname_S),OpenBSD) |
Junio C Hamano | 5fb41e8 | 2005-10-10 11:51:11 -0700 | [diff] [blame] | 874 | NO_STRCASESTR = YesPlease |
René Scharfe | b21b9f1 | 2007-09-07 00:32:54 +0200 | [diff] [blame] | 875 | NO_MEMMEM = YesPlease |
Tony Kemp | 90f2e65 | 2009-05-14 16:47:41 +1000 | [diff] [blame] | 876 | USE_ST_TIMESPEC = YesPlease |
Han Boetes | 18c5a52 | 2005-10-01 08:23:26 +0200 | [diff] [blame] | 877 | NEEDS_LIBICONV = YesPlease |
Petr Baudis | 8d7f586 | 2006-06-25 03:47:03 +0200 | [diff] [blame] | 878 | BASIC_CFLAGS += -I/usr/local/include |
| 879 | BASIC_LDFLAGS += -L/usr/local/lib |
Junio C Hamano | 94d2331 | 2005-11-13 01:46:13 -0800 | [diff] [blame] | 880 | endif |
| 881 | ifeq ($(uname_S),NetBSD) |
Dennis Stosberg | e88856b | 2006-05-11 19:35:31 +0200 | [diff] [blame] | 882 | ifeq ($(shell expr "$(uname_R)" : '[01]\.'),2) |
| 883 | NEEDS_LIBICONV = YesPlease |
| 884 | endif |
Petr Baudis | 8d7f586 | 2006-06-25 03:47:03 +0200 | [diff] [blame] | 885 | BASIC_CFLAGS += -I/usr/pkg/include |
Junio C Hamano | f5b904d | 2008-08-16 21:56:24 -0700 | [diff] [blame] | 886 | BASIC_LDFLAGS += -L/usr/pkg/lib $(CC_LD_DYNPATH)/usr/pkg/lib |
Patrick Welche | 9a695fb | 2009-04-26 14:49:00 +0100 | [diff] [blame] | 887 | USE_ST_TIMESPEC = YesPlease |
David Aguilar | 0620b39 | 2009-05-31 01:35:50 -0700 | [diff] [blame] | 888 | NO_MKSTEMPS = YesPlease |
Han Boetes | 18c5a52 | 2005-10-01 08:23:26 +0200 | [diff] [blame] | 889 | endif |
Jason Riedy | a6da939 | 2005-12-06 14:20:16 -0800 | [diff] [blame] | 890 | ifeq ($(uname_S),AIX) |
| 891 | NO_STRCASESTR=YesPlease |
René Scharfe | b21b9f1 | 2007-09-07 00:32:54 +0200 | [diff] [blame] | 892 | NO_MEMMEM = YesPlease |
Mike Ralphson | 377d9c4 | 2008-05-07 09:35:55 +0100 | [diff] [blame] | 893 | NO_MKDTEMP = YesPlease |
David Aguilar | 0620b39 | 2009-05-31 01:35:50 -0700 | [diff] [blame] | 894 | NO_MKSTEMPS = YesPlease |
Peter Eriksen | 817151e | 2006-06-24 16:01:25 +0200 | [diff] [blame] | 895 | NO_STRLCPY = YesPlease |
Kjetil Barvik | c06ff49 | 2009-03-04 18:47:40 +0100 | [diff] [blame] | 896 | NO_NSEC = YesPlease |
Mike Ralphson | 377d9c4 | 2008-05-07 09:35:55 +0100 | [diff] [blame] | 897 | FREAD_READS_DIRECTORIES = UnfortunatelyYes |
| 898 | INTERNAL_QSORT = UnfortunatelyYes |
Jason Riedy | a6da939 | 2005-12-06 14:20:16 -0800 | [diff] [blame] | 899 | NEEDS_LIBICONV=YesPlease |
Mike Ralphson | 377d9c4 | 2008-05-07 09:35:55 +0100 | [diff] [blame] | 900 | BASIC_CFLAGS += -D_LARGE_FILES |
Dan McGee | 7eb151d | 2010-01-29 19:22:19 -0600 | [diff] [blame] | 901 | ifeq ($(shell expr "$(uname_V)" : '[1234]'),1) |
Junio C Hamano | 46059cc | 2008-11-15 04:08:14 -0800 | [diff] [blame] | 902 | NO_PTHREADS = YesPlease |
Gary V. Vaughan | 48793cf | 2010-05-14 09:31:34 +0000 | [diff] [blame] | 903 | else |
| 904 | PTHREAD_LIBS = -lpthread |
Junio C Hamano | 46059cc | 2008-11-15 04:08:14 -0800 | [diff] [blame] | 905 | endif |
Jason Riedy | a6da939 | 2005-12-06 14:20:16 -0800 | [diff] [blame] | 906 | endif |
Thomas Schwinge | c29ba0c | 2007-08-02 10:56:42 +0200 | [diff] [blame] | 907 | ifeq ($(uname_S),GNU) |
| 908 | # GNU/Hurd |
| 909 | NO_STRLCPY=YesPlease |
David Aguilar | 0620b39 | 2009-05-31 01:35:50 -0700 | [diff] [blame] | 910 | NO_MKSTEMPS = YesPlease |
Thomas Schwinge | c29ba0c | 2007-08-02 10:56:42 +0200 | [diff] [blame] | 911 | endif |
Brandon Casey | 1fdffc1 | 2009-07-10 12:10:46 -0500 | [diff] [blame] | 912 | ifeq ($(uname_S),IRIX) |
| 913 | NO_SETENV = YesPlease |
| 914 | NO_UNSETENV = YesPlease |
| 915 | NO_STRCASESTR = YesPlease |
| 916 | NO_MEMMEM = YesPlease |
| 917 | NO_MKSTEMPS = YesPlease |
| 918 | NO_MKDTEMP = YesPlease |
Brandon Casey | 651aef3 | 2009-10-08 19:09:37 -0500 | [diff] [blame] | 919 | # When compiled with the MIPSpro 7.4.4m compiler, and without pthreads |
| 920 | # (i.e. NO_PTHREADS is set), and _with_ MMAP (i.e. NO_MMAP is not set), |
| 921 | # git dies with a segmentation fault when trying to access the first |
| 922 | # entry of a reflog. The conservative choice is made to always set |
| 923 | # NO_MMAP. If you suspect that your compiler is not affected by this |
| 924 | # issue, comment out the NO_MMAP statement. |
Brandon Casey | 1fdffc1 | 2009-07-10 12:10:46 -0500 | [diff] [blame] | 925 | NO_MMAP = YesPlease |
Brandon Casey | 1fdffc1 | 2009-07-10 12:10:46 -0500 | [diff] [blame] | 926 | SNPRINTF_RETURNS_BOGUS = YesPlease |
| 927 | SHELL_PATH = /usr/gnu/bin/bash |
| 928 | NEEDS_LIBGEN = YesPlease |
| 929 | endif |
Johannes Schindelin | 289c4b3 | 2006-02-17 15:23:41 +0100 | [diff] [blame] | 930 | ifeq ($(uname_S),IRIX64) |
Johannes Schindelin | 289c4b3 | 2006-02-17 15:23:41 +0100 | [diff] [blame] | 931 | NO_SETENV=YesPlease |
Brandon Casey | 7c74ff5 | 2009-07-10 13:31:19 -0500 | [diff] [blame] | 932 | NO_UNSETENV = YesPlease |
Johannes Schindelin | 289c4b3 | 2006-02-17 15:23:41 +0100 | [diff] [blame] | 933 | NO_STRCASESTR=YesPlease |
René Scharfe | b21b9f1 | 2007-09-07 00:32:54 +0200 | [diff] [blame] | 934 | NO_MEMMEM = YesPlease |
David Aguilar | 0620b39 | 2009-05-31 01:35:50 -0700 | [diff] [blame] | 935 | NO_MKSTEMPS = YesPlease |
Brandon Casey | 7c74ff5 | 2009-07-10 13:31:19 -0500 | [diff] [blame] | 936 | NO_MKDTEMP = YesPlease |
Brandon Casey | 651aef3 | 2009-10-08 19:09:37 -0500 | [diff] [blame] | 937 | # When compiled with the MIPSpro 7.4.4m compiler, and without pthreads |
| 938 | # (i.e. NO_PTHREADS is set), and _with_ MMAP (i.e. NO_MMAP is not set), |
| 939 | # git dies with a segmentation fault when trying to access the first |
| 940 | # entry of a reflog. The conservative choice is made to always set |
| 941 | # NO_MMAP. If you suspect that your compiler is not affected by this |
| 942 | # issue, comment out the NO_MMAP statement. |
Brandon Casey | 7c74ff5 | 2009-07-10 13:31:19 -0500 | [diff] [blame] | 943 | NO_MMAP = YesPlease |
Brandon Casey | 7c74ff5 | 2009-07-10 13:31:19 -0500 | [diff] [blame] | 944 | SNPRINTF_RETURNS_BOGUS = YesPlease |
Johannes Schindelin | 289c4b3 | 2006-02-17 15:23:41 +0100 | [diff] [blame] | 945 | SHELL_PATH=/usr/gnu/bin/bash |
Brandon Casey | 7c74ff5 | 2009-07-10 13:31:19 -0500 | [diff] [blame] | 946 | NEEDS_LIBGEN = YesPlease |
Johannes Schindelin | 289c4b3 | 2006-02-17 15:23:41 +0100 | [diff] [blame] | 947 | endif |
Robert Schiele | 81cc66a | 2008-01-24 19:35:20 +0100 | [diff] [blame] | 948 | ifeq ($(uname_S),HP-UX) |
| 949 | NO_IPV6=YesPlease |
| 950 | NO_SETENV=YesPlease |
| 951 | NO_STRCASESTR=YesPlease |
| 952 | NO_MEMMEM = YesPlease |
David Aguilar | 0620b39 | 2009-05-31 01:35:50 -0700 | [diff] [blame] | 953 | NO_MKSTEMPS = YesPlease |
Robert Schiele | 81cc66a | 2008-01-24 19:35:20 +0100 | [diff] [blame] | 954 | NO_STRLCPY = YesPlease |
| 955 | NO_MKDTEMP = YesPlease |
| 956 | NO_UNSETENV = YesPlease |
| 957 | NO_HSTRERROR = YesPlease |
| 958 | NO_SYS_SELECT_H = YesPlease |
Miklos Vajna | 7d77016 | 2008-08-24 00:07:55 +0200 | [diff] [blame] | 959 | SNPRINTF_RETURNS_BOGUS = YesPlease |
Robert Schiele | 81cc66a | 2008-01-24 19:35:20 +0100 | [diff] [blame] | 960 | endif |
Ramsay Jones | d691d84 | 2009-11-07 20:08:01 +0000 | [diff] [blame] | 961 | ifeq ($(uname_S),Windows) |
Marius Storm-Olsen | f5c3178 | 2009-09-16 10:20:31 +0200 | [diff] [blame] | 962 | GIT_VERSION := $(GIT_VERSION).MSVC |
Marius Storm-Olsen | 164a5e3 | 2009-09-16 10:20:28 +0200 | [diff] [blame] | 963 | pathsep = ; |
| 964 | NO_PREAD = YesPlease |
Marius Storm-Olsen | c36e163 | 2009-10-21 19:04:51 +0200 | [diff] [blame] | 965 | NEEDS_CRYPTO_WITH_SSL = YesPlease |
Marius Storm-Olsen | 164a5e3 | 2009-09-16 10:20:28 +0200 | [diff] [blame] | 966 | NO_LIBGEN_H = YesPlease |
| 967 | NO_SYMLINK_HEAD = YesPlease |
| 968 | NO_IPV6 = YesPlease |
| 969 | NO_SETENV = YesPlease |
| 970 | NO_UNSETENV = YesPlease |
| 971 | NO_STRCASESTR = YesPlease |
| 972 | NO_STRLCPY = YesPlease |
| 973 | NO_MEMMEM = YesPlease |
| 974 | # NEEDS_LIBICONV = YesPlease |
| 975 | NO_ICONV = YesPlease |
| 976 | NO_C99_FORMAT = YesPlease |
| 977 | NO_STRTOUMAX = YesPlease |
| 978 | NO_STRTOULL = YesPlease |
| 979 | NO_MKDTEMP = YesPlease |
| 980 | NO_MKSTEMPS = YesPlease |
| 981 | SNPRINTF_RETURNS_BOGUS = YesPlease |
| 982 | NO_SVN_TESTS = YesPlease |
| 983 | NO_PERL_MAKEMAKER = YesPlease |
| 984 | RUNTIME_PREFIX = YesPlease |
| 985 | NO_POSIX_ONLY_PROGRAMS = YesPlease |
| 986 | NO_ST_BLOCKS_IN_STRUCT_STAT = YesPlease |
| 987 | NO_NSEC = YesPlease |
| 988 | USE_WIN32_MMAP = YesPlease |
| 989 | # USE_NED_ALLOCATOR = YesPlease |
| 990 | UNRELIABLE_FSTAT = UnfortunatelyYes |
| 991 | OBJECT_CREATION_USES_RENAMES = UnfortunatelyNeedsTo |
| 992 | NO_REGEX = YesPlease |
| 993 | NO_CURL = YesPlease |
Erik Faye-Lund | 5693224 | 2010-01-15 21:12:15 +0100 | [diff] [blame] | 994 | NO_PYTHON = YesPlease |
Johannes Sixt | 9bccfcd | 2009-10-22 20:26:29 +0200 | [diff] [blame] | 995 | BLK_SHA1 = YesPlease |
Marius Storm-Olsen | 164a5e3 | 2009-09-16 10:20:28 +0200 | [diff] [blame] | 996 | |
| 997 | CC = compat/vcbuild/scripts/clink.pl |
| 998 | AR = compat/vcbuild/scripts/lib.pl |
| 999 | CFLAGS = |
Ramsay Jones | f2d50d9 | 2009-10-08 16:21:44 +0100 | [diff] [blame] | 1000 | 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 |
Andrzej K. Haczewski | 44626dc | 2010-01-15 21:12:20 +0100 | [diff] [blame] | 1001 | COMPAT_OBJS = compat/msvc.o compat/fnmatch/fnmatch.o compat/winansi.o compat/win32/pthread.o |
| 1002 | 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\" |
Marius Storm-Olsen | 164a5e3 | 2009-09-16 10:20:28 +0200 | [diff] [blame] | 1003 | BASIC_LDFLAGS = -IGNORE:4217 -IGNORE:4049 -NOLOGO -SUBSYSTEM:CONSOLE -NODEFAULTLIB:MSVCRT.lib |
| 1004 | EXTLIBS = advapi32.lib shell32.lib wininet.lib ws2_32.lib |
Michael Lukashov | 767f8b3 | 2010-01-24 10:10:30 +0000 | [diff] [blame] | 1005 | PTHREAD_LIBS = |
Marius Storm-Olsen | 164a5e3 | 2009-09-16 10:20:28 +0200 | [diff] [blame] | 1006 | lib = |
| 1007 | ifndef DEBUG |
| 1008 | BASIC_CFLAGS += -GL -Os -MT |
| 1009 | BASIC_LDFLAGS += -LTCG |
| 1010 | AR += -LTCG |
| 1011 | else |
| 1012 | BASIC_CFLAGS += -Zi -MTd |
| 1013 | endif |
| 1014 | X = .exe |
Ramsay Jones | d691d84 | 2009-11-07 20:08:01 +0000 | [diff] [blame] | 1015 | endif |
Johannes Sixt | f4626df | 2007-12-01 21:24:59 +0100 | [diff] [blame] | 1016 | ifneq (,$(findstring MINGW,$(uname_S))) |
Johannes Schindelin | 352c811 | 2009-05-23 10:04:48 +0200 | [diff] [blame] | 1017 | pathsep = ; |
Johannes Sixt | f4626df | 2007-12-01 21:24:59 +0100 | [diff] [blame] | 1018 | NO_PREAD = YesPlease |
Erik Faye-Lund | 4192e1c | 2009-10-21 19:04:50 +0200 | [diff] [blame] | 1019 | NEEDS_CRYPTO_WITH_SSL = YesPlease |
David Aguilar | e1c0688 | 2009-05-31 01:35:51 -0700 | [diff] [blame] | 1020 | NO_LIBGEN_H = YesPlease |
Johannes Sixt | f4626df | 2007-12-01 21:24:59 +0100 | [diff] [blame] | 1021 | NO_SYMLINK_HEAD = YesPlease |
Johannes Sixt | f4626df | 2007-12-01 21:24:59 +0100 | [diff] [blame] | 1022 | NO_SETENV = YesPlease |
| 1023 | NO_UNSETENV = YesPlease |
| 1024 | NO_STRCASESTR = YesPlease |
| 1025 | NO_STRLCPY = YesPlease |
| 1026 | NO_MEMMEM = YesPlease |
| 1027 | NEEDS_LIBICONV = YesPlease |
| 1028 | OLD_ICONV = YesPlease |
| 1029 | NO_C99_FORMAT = YesPlease |
| 1030 | NO_STRTOUMAX = YesPlease |
| 1031 | NO_MKDTEMP = YesPlease |
David Aguilar | 0620b39 | 2009-05-31 01:35:50 -0700 | [diff] [blame] | 1032 | NO_MKSTEMPS = YesPlease |
Johannes Sixt | f4626df | 2007-12-01 21:24:59 +0100 | [diff] [blame] | 1033 | SNPRINTF_RETURNS_BOGUS = YesPlease |
| 1034 | NO_SVN_TESTS = YesPlease |
| 1035 | NO_PERL_MAKEMAKER = YesPlease |
Steffen Prohaska | 2565522 | 2009-01-18 13:00:15 +0100 | [diff] [blame] | 1036 | RUNTIME_PREFIX = YesPlease |
Johannes Sixt | f4626df | 2007-12-01 21:24:59 +0100 | [diff] [blame] | 1037 | NO_POSIX_ONLY_PROGRAMS = YesPlease |
Junio C Hamano | fdb2a2a | 2008-08-18 21:57:16 +0200 | [diff] [blame] | 1038 | NO_ST_BLOCKS_IN_STRUCT_STAT = YesPlease |
Kjetil Barvik | c06ff49 | 2009-03-04 18:47:40 +0100 | [diff] [blame] | 1039 | NO_NSEC = YesPlease |
Janos Laube | b130a72 | 2009-03-13 16:50:45 +0100 | [diff] [blame] | 1040 | USE_WIN32_MMAP = YesPlease |
Marius Storm-Olsen | f0ed822 | 2009-05-31 18:15:23 +0200 | [diff] [blame] | 1041 | USE_NED_ALLOCATOR = YesPlease |
Johannes Sixt | 34779c5 | 2009-04-20 10:17:00 +0200 | [diff] [blame] | 1042 | UNRELIABLE_FSTAT = UnfortunatelyYes |
Johannes Schindelin | 348df16 | 2009-04-28 00:32:25 +0200 | [diff] [blame] | 1043 | OBJECT_CREATION_USES_RENAMES = UnfortunatelyNeedsTo |
Jeff King | 02232ad | 2009-06-16 15:07:40 -0400 | [diff] [blame] | 1044 | NO_REGEX = YesPlease |
Erik Faye-Lund | 5693224 | 2010-01-15 21:12:15 +0100 | [diff] [blame] | 1045 | NO_PYTHON = YesPlease |
Johannes Sixt | 9bccfcd | 2009-10-22 20:26:29 +0200 | [diff] [blame] | 1046 | BLK_SHA1 = YesPlease |
Michael Lukashov | 767f8b3 | 2010-01-24 10:10:30 +0000 | [diff] [blame] | 1047 | COMPAT_CFLAGS += -D__USE_MINGW_ACCESS -DNOGDI -Icompat -Icompat/fnmatch -Icompat/win32 |
Johannes Sixt | 23326d1 | 2007-12-08 20:57:25 +0100 | [diff] [blame] | 1048 | COMPAT_CFLAGS += -DSTRIP_EXTENSION=\".exe\" |
Andrzej K. Haczewski | 44626dc | 2010-01-15 21:12:20 +0100 | [diff] [blame] | 1049 | COMPAT_OBJS += compat/mingw.o compat/fnmatch/fnmatch.o compat/winansi.o \ |
| 1050 | compat/win32/pthread.o |
Johannes Sixt | f4626df | 2007-12-01 21:24:59 +0100 | [diff] [blame] | 1051 | EXTLIBS += -lws2_32 |
Michael Lukashov | 767f8b3 | 2010-01-24 10:10:30 +0000 | [diff] [blame] | 1052 | PTHREAD_LIBS = |
Johannes Sixt | f4626df | 2007-12-01 21:24:59 +0100 | [diff] [blame] | 1053 | X = .exe |
Steffen Prohaska | 48c46f1 | 2009-05-31 18:15:25 +0200 | [diff] [blame] | 1054 | ifneq (,$(wildcard ../THIS_IS_MSYSGIT)) |
| 1055 | htmldir=doc/git/html/ |
| 1056 | prefix = |
| 1057 | INSTALL = /bin/install |
| 1058 | EXTLIBS += /mingw/lib/libz.a |
| 1059 | NO_R_TO_GCC_LINKER = YesPlease |
| 1060 | INTERNAL_QSORT = YesPlease |
Steffen Prohaska | 48c46f1 | 2009-05-31 18:15:25 +0200 | [diff] [blame] | 1061 | else |
| 1062 | NO_CURL = YesPlease |
Steffen Prohaska | 48c46f1 | 2009-05-31 18:15:25 +0200 | [diff] [blame] | 1063 | endif |
Johannes Sixt | f4626df | 2007-12-01 21:24:59 +0100 | [diff] [blame] | 1064 | endif |
Junio C Hamano | 597c9cc | 2005-09-07 12:22:56 -0700 | [diff] [blame] | 1065 | |
Jakub Narebski | 5566771 | 2006-07-03 01:56:48 +0200 | [diff] [blame] | 1066 | -include config.mak.autogen |
Johannes Schindelin | f2d6a25 | 2005-10-11 15:22:47 -0700 | [diff] [blame] | 1067 | -include config.mak |
Linus Torvalds | cef661f | 2005-04-21 12:33:22 -0700 | [diff] [blame] | 1068 | |
Jonathan Nieder | f2fabbf | 2010-01-26 09:57:15 -0600 | [diff] [blame] | 1069 | ifdef CHECK_HEADER_DEPENDENCIES |
| 1070 | USE_COMPUTED_HEADER_DEPENDENCIES = |
| 1071 | endif |
| 1072 | |
| 1073 | ifdef COMPUTE_HEADER_DEPENDENCIES |
| 1074 | USE_COMPUTED_HEADER_DEPENDENCIES = YesPlease |
| 1075 | endif |
| 1076 | |
Junio C Hamano | 0e0aea5 | 2009-06-05 18:36:15 -0500 | [diff] [blame] | 1077 | ifdef SANE_TOOL_PATH |
Junio C Hamano | 61dbb3c | 2009-06-08 09:41:49 -0700 | [diff] [blame] | 1078 | SANE_TOOL_PATH_SQ = $(subst ','\'',$(SANE_TOOL_PATH)) |
| 1079 | BROKEN_PATH_FIX = 's|^\# @@BROKEN_PATH_FIX@@$$|git_broken_path_fix $(SANE_TOOL_PATH_SQ)|' |
Junio C Hamano | 0e0aea5 | 2009-06-05 18:36:15 -0500 | [diff] [blame] | 1080 | PATH := $(SANE_TOOL_PATH):${PATH} |
| 1081 | else |
Junio C Hamano | 61dbb3c | 2009-06-08 09:41:49 -0700 | [diff] [blame] | 1082 | BROKEN_PATH_FIX = '/^\# @@BROKEN_PATH_FIX@@$$/d' |
Junio C Hamano | 0e0aea5 | 2009-06-05 18:36:15 -0500 | [diff] [blame] | 1083 | endif |
| 1084 | |
Brian Gernhardt | 59f8674 | 2006-12-12 12:01:47 -0500 | [diff] [blame] | 1085 | ifeq ($(uname_S),Darwin) |
| 1086 | ifndef NO_FINK |
| 1087 | ifeq ($(shell test -d /sw/lib && echo y),y) |
| 1088 | BASIC_CFLAGS += -I/sw/include |
| 1089 | BASIC_LDFLAGS += -L/sw/lib |
| 1090 | endif |
| 1091 | endif |
| 1092 | ifndef NO_DARWIN_PORTS |
| 1093 | ifeq ($(shell test -d /opt/local/lib && echo y),y) |
| 1094 | BASIC_CFLAGS += -I/opt/local/include |
| 1095 | BASIC_LDFLAGS += -L/opt/local/lib |
| 1096 | endif |
| 1097 | endif |
Ted Pavlic | f7d9d04 | 2009-01-26 14:03:59 -0500 | [diff] [blame] | 1098 | PTHREAD_LIBS = |
Brian Gernhardt | 59f8674 | 2006-12-12 12:01:47 -0500 | [diff] [blame] | 1099 | endif |
| 1100 | |
Junio C Hamano | f5b904d | 2008-08-16 21:56:24 -0700 | [diff] [blame] | 1101 | ifndef CC_LD_DYNPATH |
| 1102 | ifdef NO_R_TO_GCC_LINKER |
| 1103 | # Some gcc does not accept and pass -R to the linker to specify |
| 1104 | # the runtime dynamic library path. |
| 1105 | CC_LD_DYNPATH = -Wl,-rpath, |
| 1106 | else |
| 1107 | CC_LD_DYNPATH = -R |
| 1108 | endif |
Junio C Hamano | bbfc63d | 2006-12-27 14:17:35 -0800 | [diff] [blame] | 1109 | endif |
| 1110 | |
David Aguilar | e1c0688 | 2009-05-31 01:35:51 -0700 | [diff] [blame] | 1111 | ifdef NO_LIBGEN_H |
| 1112 | COMPAT_CFLAGS += -DNO_LIBGEN_H |
| 1113 | COMPAT_OBJS += compat/basename.o |
| 1114 | endif |
| 1115 | |
Daniel Barkalow | 30ae764 | 2007-09-10 23:02:45 -0400 | [diff] [blame] | 1116 | ifdef NO_CURL |
| 1117 | BASIC_CFLAGS += -DNO_CURL |
Johannes Sixt | 4256f36 | 2010-01-19 16:39:12 +0100 | [diff] [blame] | 1118 | REMOTE_CURL_PRIMARY = |
| 1119 | REMOTE_CURL_ALIASES = |
| 1120 | REMOTE_CURL_NAMES = |
Daniel Barkalow | 30ae764 | 2007-09-10 23:02:45 -0400 | [diff] [blame] | 1121 | else |
Junio C Hamano | 229a7ed | 2005-09-23 10:41:40 -0700 | [diff] [blame] | 1122 | ifdef CURLDIR |
Robert Schiele | 10861be | 2007-08-01 06:30:35 +0200 | [diff] [blame] | 1123 | # Try "-Wl,-rpath=$(CURLDIR)/$(lib)" in such a case. |
Petr Baudis | 8d7f586 | 2006-06-25 03:47:03 +0200 | [diff] [blame] | 1124 | BASIC_CFLAGS += -I$(CURLDIR)/include |
Robert Schiele | 10861be | 2007-08-01 06:30:35 +0200 | [diff] [blame] | 1125 | CURL_LIBCURL = -L$(CURLDIR)/$(lib) $(CC_LD_DYNPATH)$(CURLDIR)/$(lib) -lcurl |
Junio C Hamano | 229a7ed | 2005-09-23 10:41:40 -0700 | [diff] [blame] | 1126 | else |
| 1127 | CURL_LIBCURL = -lcurl |
| 1128 | endif |
Johannes Sixt | 4256f36 | 2010-01-19 16:39:12 +0100 | [diff] [blame] | 1129 | REMOTE_CURL_PRIMARY = git-remote-http$X |
| 1130 | REMOTE_CURL_ALIASES = git-remote-https$X git-remote-ftp$X git-remote-ftps$X |
| 1131 | REMOTE_CURL_NAMES = $(REMOTE_CURL_PRIMARY) $(REMOTE_CURL_ALIASES) |
Jonathan Nieder | 1b22c99 | 2010-01-26 09:54:23 -0600 | [diff] [blame] | 1132 | PROGRAM_OBJS += http-fetch.o |
| 1133 | PROGRAMS += $(REMOTE_CURL_NAMES) |
Nick Hengeveld | 0890098 | 2005-11-18 17:08:36 -0800 | [diff] [blame] | 1134 | curl_check := $(shell (echo 070908; curl-config --vernum) | sort -r | sed -ne 2p) |
| 1135 | ifeq "$(curl_check)" "070908" |
| 1136 | ifndef NO_EXPAT |
Jonathan Nieder | 1b22c99 | 2010-01-26 09:54:23 -0600 | [diff] [blame] | 1137 | PROGRAM_OBJS += http-push.o |
Nick Hengeveld | 0890098 | 2005-11-18 17:08:36 -0800 | [diff] [blame] | 1138 | endif |
Nick Hengeveld | 58e60dd | 2005-11-02 11:19:24 -0800 | [diff] [blame] | 1139 | endif |
Johannes Schindelin | 459a21b | 2006-04-05 16:22:40 +0200 | [diff] [blame] | 1140 | ifndef NO_EXPAT |
Serge van den Boom | 85b4518 | 2009-01-28 21:43:57 +0100 | [diff] [blame] | 1141 | ifdef EXPATDIR |
| 1142 | BASIC_CFLAGS += -I$(EXPATDIR)/include |
| 1143 | EXPAT_LIBEXPAT = -L$(EXPATDIR)/$(lib) $(CC_LD_DYNPATH)$(EXPATDIR)/$(lib) -lexpat |
| 1144 | else |
| 1145 | EXPAT_LIBEXPAT = -lexpat |
| 1146 | endif |
Johannes Schindelin | 459a21b | 2006-04-05 16:22:40 +0200 | [diff] [blame] | 1147 | endif |
Junio C Hamano | 229a7ed | 2005-09-23 10:41:40 -0700 | [diff] [blame] | 1148 | endif |
| 1149 | |
Robert Schiele | bef19da | 2007-07-29 20:35:45 +0200 | [diff] [blame] | 1150 | ifdef ZLIB_PATH |
| 1151 | BASIC_CFLAGS += -I$(ZLIB_PATH)/include |
Robert Schiele | 10861be | 2007-08-01 06:30:35 +0200 | [diff] [blame] | 1152 | EXTLIBS += -L$(ZLIB_PATH)/$(lib) $(CC_LD_DYNPATH)$(ZLIB_PATH)/$(lib) |
Robert Schiele | bef19da | 2007-07-29 20:35:45 +0200 | [diff] [blame] | 1153 | endif |
| 1154 | EXTLIBS += -lz |
| 1155 | |
Johannes Sixt | 58eda02 | 2007-12-01 11:10:54 +0100 | [diff] [blame] | 1156 | ifndef NO_POSIX_ONLY_PROGRAMS |
Jonathan Nieder | 1b22c99 | 2010-01-26 09:54:23 -0600 | [diff] [blame] | 1157 | PROGRAM_OBJS += daemon.o |
Johannes Sixt | 58eda02 | 2007-12-01 11:10:54 +0100 | [diff] [blame] | 1158 | endif |
Petr Baudis | dd53c7a | 2005-07-29 17:50:51 +0200 | [diff] [blame] | 1159 | ifndef NO_OPENSSL |
Junio C Hamano | 215a7ad | 2005-09-07 17:26:23 -0700 | [diff] [blame] | 1160 | OPENSSL_LIBSSL = -lssl |
Junio C Hamano | 455a7f3 | 2005-09-30 13:31:16 -0700 | [diff] [blame] | 1161 | ifdef OPENSSLDIR |
Petr Baudis | 8d7f586 | 2006-06-25 03:47:03 +0200 | [diff] [blame] | 1162 | BASIC_CFLAGS += -I$(OPENSSLDIR)/include |
Robert Schiele | 10861be | 2007-08-01 06:30:35 +0200 | [diff] [blame] | 1163 | OPENSSL_LINK = -L$(OPENSSLDIR)/$(lib) $(CC_LD_DYNPATH)$(OPENSSLDIR)/$(lib) |
Junio C Hamano | 455a7f3 | 2005-09-30 13:31:16 -0700 | [diff] [blame] | 1164 | else |
| 1165 | OPENSSL_LINK = |
| 1166 | endif |
Brian Gernhardt | 0460dba | 2009-09-08 09:54:38 -0400 | [diff] [blame] | 1167 | ifdef NEEDS_CRYPTO_WITH_SSL |
| 1168 | OPENSSL_LINK += -lcrypto |
| 1169 | endif |
Petr Baudis | dd53c7a | 2005-07-29 17:50:51 +0200 | [diff] [blame] | 1170 | else |
Petr Baudis | 8d7f586 | 2006-06-25 03:47:03 +0200 | [diff] [blame] | 1171 | BASIC_CFLAGS += -DNO_OPENSSL |
Nicolas Pitre | 30ae47b | 2009-08-17 20:09:56 -0400 | [diff] [blame] | 1172 | BLK_SHA1 = 1 |
Junio C Hamano | 215a7ad | 2005-09-07 17:26:23 -0700 | [diff] [blame] | 1173 | OPENSSL_LIBSSL = |
Petr Baudis | dd53c7a | 2005-07-29 17:50:51 +0200 | [diff] [blame] | 1174 | endif |
Junio C Hamano | 597c9cc | 2005-09-07 12:22:56 -0700 | [diff] [blame] | 1175 | ifdef NEEDS_SSL_WITH_CRYPTO |
Junio C Hamano | 455a7f3 | 2005-09-30 13:31:16 -0700 | [diff] [blame] | 1176 | LIB_4_CRYPTO = $(OPENSSL_LINK) -lcrypto -lssl |
Junio C Hamano | 597c9cc | 2005-09-07 12:22:56 -0700 | [diff] [blame] | 1177 | else |
Junio C Hamano | 455a7f3 | 2005-09-30 13:31:16 -0700 | [diff] [blame] | 1178 | LIB_4_CRYPTO = $(OPENSSL_LINK) -lcrypto |
Junio C Hamano | 597c9cc | 2005-09-07 12:22:56 -0700 | [diff] [blame] | 1179 | endif |
| 1180 | ifdef NEEDS_LIBICONV |
Junio C Hamano | 455a7f3 | 2005-09-30 13:31:16 -0700 | [diff] [blame] | 1181 | ifdef ICONVDIR |
Petr Baudis | 8d7f586 | 2006-06-25 03:47:03 +0200 | [diff] [blame] | 1182 | BASIC_CFLAGS += -I$(ICONVDIR)/include |
Robert Schiele | 10861be | 2007-08-01 06:30:35 +0200 | [diff] [blame] | 1183 | ICONV_LINK = -L$(ICONVDIR)/$(lib) $(CC_LD_DYNPATH)$(ICONVDIR)/$(lib) |
Junio C Hamano | 455a7f3 | 2005-09-30 13:31:16 -0700 | [diff] [blame] | 1184 | else |
| 1185 | ICONV_LINK = |
| 1186 | endif |
Petr Baudis | d595a47 | 2006-06-24 18:35:12 -0700 | [diff] [blame] | 1187 | EXTLIBS += $(ICONV_LINK) -liconv |
Junio C Hamano | 597c9cc | 2005-09-07 12:22:56 -0700 | [diff] [blame] | 1188 | endif |
Brandon Casey | ecc395c | 2009-07-10 12:10:45 -0500 | [diff] [blame] | 1189 | ifdef NEEDS_LIBGEN |
| 1190 | EXTLIBS += -lgen |
| 1191 | endif |
Patrick Mauritz | f0ebff0 | 2005-09-06 01:24:03 +0200 | [diff] [blame] | 1192 | ifdef NEEDS_SOCKET |
Petr Baudis | d595a47 | 2006-06-24 18:35:12 -0700 | [diff] [blame] | 1193 | EXTLIBS += -lsocket |
Patrick Mauritz | f0ebff0 | 2005-09-06 01:24:03 +0200 | [diff] [blame] | 1194 | endif |
Junio C Hamano | 5a90d4a | 2005-09-11 22:25:49 -0700 | [diff] [blame] | 1195 | ifdef NEEDS_NSL |
Petr Baudis | d595a47 | 2006-06-24 18:35:12 -0700 | [diff] [blame] | 1196 | EXTLIBS += -lnsl |
Junio C Hamano | 5a90d4a | 2005-09-11 22:25:49 -0700 | [diff] [blame] | 1197 | endif |
Brandon Casey | 70cf991 | 2009-06-05 18:36:10 -0500 | [diff] [blame] | 1198 | ifdef NEEDS_RESOLV |
| 1199 | EXTLIBS += -lresolv |
| 1200 | endif |
Junio C Hamano | 63be37b | 2006-01-19 17:13:57 -0800 | [diff] [blame] | 1201 | ifdef NO_D_TYPE_IN_DIRENT |
Petr Baudis | 8d7f586 | 2006-06-25 03:47:03 +0200 | [diff] [blame] | 1202 | BASIC_CFLAGS += -DNO_D_TYPE_IN_DIRENT |
Junio C Hamano | 63be37b | 2006-01-19 17:13:57 -0800 | [diff] [blame] | 1203 | endif |
Junio C Hamano | 35a730f | 2006-01-19 17:13:51 -0800 | [diff] [blame] | 1204 | ifdef NO_D_INO_IN_DIRENT |
Petr Baudis | 8d7f586 | 2006-06-25 03:47:03 +0200 | [diff] [blame] | 1205 | BASIC_CFLAGS += -DNO_D_INO_IN_DIRENT |
Junio C Hamano | 35a730f | 2006-01-19 17:13:51 -0800 | [diff] [blame] | 1206 | endif |
Junio C Hamano | fdb2a2a | 2008-08-18 21:57:16 +0200 | [diff] [blame] | 1207 | ifdef NO_ST_BLOCKS_IN_STRUCT_STAT |
| 1208 | BASIC_CFLAGS += -DNO_ST_BLOCKS_IN_STRUCT_STAT |
| 1209 | endif |
Brian Gernhardt | d7371a2 | 2009-03-08 17:22:51 -0400 | [diff] [blame] | 1210 | ifdef USE_NSEC |
| 1211 | BASIC_CFLAGS += -DUSE_NSEC |
| 1212 | endif |
Brian Gernhardt | c567383 | 2009-03-08 16:04:28 -0400 | [diff] [blame] | 1213 | ifdef USE_ST_TIMESPEC |
| 1214 | BASIC_CFLAGS += -DUSE_ST_TIMESPEC |
| 1215 | endif |
Kjetil Barvik | c06ff49 | 2009-03-04 18:47:40 +0100 | [diff] [blame] | 1216 | ifdef NO_NSEC |
| 1217 | BASIC_CFLAGS += -DNO_NSEC |
| 1218 | endif |
Ramsay Allan Jones | 579d1fb | 2006-07-30 16:38:28 +0100 | [diff] [blame] | 1219 | ifdef NO_C99_FORMAT |
Junio C Hamano | 8188e73 | 2007-02-05 16:53:12 -0800 | [diff] [blame] | 1220 | BASIC_CFLAGS += -DNO_C99_FORMAT |
Ramsay Allan Jones | 579d1fb | 2006-07-30 16:38:28 +0100 | [diff] [blame] | 1221 | endif |
Michal Rokos | c4582f9 | 2008-03-05 16:46:13 +0100 | [diff] [blame] | 1222 | ifdef SNPRINTF_RETURNS_BOGUS |
| 1223 | COMPAT_CFLAGS += -DSNPRINTF_RETURNS_BOGUS |
| 1224 | COMPAT_OBJS += compat/snprintf.o |
| 1225 | endif |
Brandon Casey | cba2252 | 2008-02-08 20:32:47 -0600 | [diff] [blame] | 1226 | ifdef FREAD_READS_DIRECTORIES |
| 1227 | COMPAT_CFLAGS += -DFREAD_READS_DIRECTORIES |
| 1228 | COMPAT_OBJS += compat/fopen.o |
| 1229 | endif |
Junio C Hamano | 9f0bb90 | 2006-05-02 00:40:24 -0700 | [diff] [blame] | 1230 | ifdef NO_SYMLINK_HEAD |
Petr Baudis | 8d7f586 | 2006-06-25 03:47:03 +0200 | [diff] [blame] | 1231 | BASIC_CFLAGS += -DNO_SYMLINK_HEAD |
Junio C Hamano | 9f0bb90 | 2006-05-02 00:40:24 -0700 | [diff] [blame] | 1232 | endif |
Linus Torvalds | ef34af2 | 2005-09-18 18:30:50 -0700 | [diff] [blame] | 1233 | ifdef NO_STRCASESTR |
Junio C Hamano | 4050c0d | 2005-12-05 11:54:29 -0800 | [diff] [blame] | 1234 | COMPAT_CFLAGS += -DNO_STRCASESTR |
Jason Riedy | e40b61f | 2005-12-02 15:08:28 -0800 | [diff] [blame] | 1235 | COMPAT_OBJS += compat/strcasestr.o |
| 1236 | endif |
Peter Eriksen | 817151e | 2006-06-24 16:01:25 +0200 | [diff] [blame] | 1237 | ifdef NO_STRLCPY |
| 1238 | COMPAT_CFLAGS += -DNO_STRLCPY |
| 1239 | COMPAT_OBJS += compat/strlcpy.o |
| 1240 | endif |
Jason Riedy | bc6b4f5 | 2007-02-19 16:22:56 -0800 | [diff] [blame] | 1241 | ifdef NO_STRTOUMAX |
| 1242 | COMPAT_CFLAGS += -DNO_STRTOUMAX |
| 1243 | COMPAT_OBJS += compat/strtoumax.o |
| 1244 | endif |
| 1245 | ifdef NO_STRTOULL |
| 1246 | COMPAT_CFLAGS += -DNO_STRTOULL |
| 1247 | endif |
Jason Riedy | e40b61f | 2005-12-02 15:08:28 -0800 | [diff] [blame] | 1248 | ifdef NO_SETENV |
Junio C Hamano | 4050c0d | 2005-12-05 11:54:29 -0800 | [diff] [blame] | 1249 | COMPAT_CFLAGS += -DNO_SETENV |
Jason Riedy | e40b61f | 2005-12-02 15:08:28 -0800 | [diff] [blame] | 1250 | COMPAT_OBJS += compat/setenv.o |
Linus Torvalds | ef34af2 | 2005-09-18 18:30:50 -0700 | [diff] [blame] | 1251 | endif |
Shawn O. Pearce | ca5bb5d | 2007-10-20 16:03:49 -0400 | [diff] [blame] | 1252 | ifdef NO_MKDTEMP |
| 1253 | COMPAT_CFLAGS += -DNO_MKDTEMP |
| 1254 | COMPAT_OBJS += compat/mkdtemp.o |
| 1255 | endif |
David Aguilar | 0620b39 | 2009-05-31 01:35:50 -0700 | [diff] [blame] | 1256 | ifdef NO_MKSTEMPS |
| 1257 | COMPAT_CFLAGS += -DNO_MKSTEMPS |
David Aguilar | 0620b39 | 2009-05-31 01:35:50 -0700 | [diff] [blame] | 1258 | endif |
Johannes Schindelin | 104ff34 | 2006-08-29 12:51:14 +0200 | [diff] [blame] | 1259 | ifdef NO_UNSETENV |
Jason Riedy | 731043f | 2006-01-25 12:38:36 -0800 | [diff] [blame] | 1260 | COMPAT_CFLAGS += -DNO_UNSETENV |
| 1261 | COMPAT_OBJS += compat/unsetenv.o |
| 1262 | endif |
Robert Schiele | 2600973 | 2008-01-24 19:34:46 +0100 | [diff] [blame] | 1263 | ifdef NO_SYS_SELECT_H |
| 1264 | BASIC_CFLAGS += -DNO_SYS_SELECT_H |
| 1265 | endif |
Johannes Schindelin | 730d48a | 2005-10-08 15:54:36 -0700 | [diff] [blame] | 1266 | ifdef NO_MMAP |
Junio C Hamano | 4050c0d | 2005-12-05 11:54:29 -0800 | [diff] [blame] | 1267 | COMPAT_CFLAGS += -DNO_MMAP |
Jason Riedy | e40b61f | 2005-12-02 15:08:28 -0800 | [diff] [blame] | 1268 | COMPAT_OBJS += compat/mmap.o |
Janos Laube | b130a72 | 2009-03-13 16:50:45 +0100 | [diff] [blame] | 1269 | else |
| 1270 | ifdef USE_WIN32_MMAP |
| 1271 | COMPAT_CFLAGS += -DUSE_WIN32_MMAP |
| 1272 | COMPAT_OBJS += compat/win32mmap.o |
| 1273 | endif |
Johannes Schindelin | 730d48a | 2005-10-08 15:54:36 -0700 | [diff] [blame] | 1274 | endif |
Johannes Schindelin | 348df16 | 2009-04-28 00:32:25 +0200 | [diff] [blame] | 1275 | ifdef OBJECT_CREATION_USES_RENAMES |
| 1276 | COMPAT_CFLAGS += -DOBJECT_CREATION_MODE=1 |
Johannes Schindelin | be66a6c | 2009-04-25 11:57:14 +0200 | [diff] [blame] | 1277 | endif |
Stefan-W. Hahn | 6900679 | 2007-01-09 22:04:12 +0100 | [diff] [blame] | 1278 | ifdef NO_PREAD |
| 1279 | COMPAT_CFLAGS += -DNO_PREAD |
| 1280 | COMPAT_OBJS += compat/pread.o |
| 1281 | endif |
Shawn O. Pearce | 1510fea | 2006-12-14 06:15:57 -0500 | [diff] [blame] | 1282 | ifdef NO_FAST_WORKING_DIRECTORY |
| 1283 | BASIC_CFLAGS += -DNO_FAST_WORKING_DIRECTORY |
| 1284 | endif |
Shawn O. Pearce | c869753 | 2006-12-30 23:53:55 -0500 | [diff] [blame] | 1285 | ifdef NO_TRUSTABLE_FILEMODE |
| 1286 | BASIC_CFLAGS += -DNO_TRUSTABLE_FILEMODE |
| 1287 | endif |
hpa | 49744d6 | 2005-09-28 16:52:21 -0700 | [diff] [blame] | 1288 | ifdef NO_IPV6 |
Petr Baudis | 8d7f586 | 2006-06-25 03:47:03 +0200 | [diff] [blame] | 1289 | BASIC_CFLAGS += -DNO_IPV6 |
Junio C Hamano | bdc37f5 | 2006-01-19 17:13:32 -0800 | [diff] [blame] | 1290 | endif |
David M. Syzdek | 0bc3e78 | 2008-10-26 03:52:37 -0800 | [diff] [blame] | 1291 | ifdef NO_UINTMAX_T |
| 1292 | BASIC_CFLAGS += -Duintmax_t=uint32_t |
| 1293 | endif |
Junio C Hamano | bdc37f5 | 2006-01-19 17:13:32 -0800 | [diff] [blame] | 1294 | ifdef NO_SOCKADDR_STORAGE |
| 1295 | ifdef NO_IPV6 |
Petr Baudis | 8d7f586 | 2006-06-25 03:47:03 +0200 | [diff] [blame] | 1296 | BASIC_CFLAGS += -Dsockaddr_storage=sockaddr_in |
Junio C Hamano | bdc37f5 | 2006-01-19 17:13:32 -0800 | [diff] [blame] | 1297 | else |
Petr Baudis | 8d7f586 | 2006-06-25 03:47:03 +0200 | [diff] [blame] | 1298 | BASIC_CFLAGS += -Dsockaddr_storage=sockaddr_in6 |
Junio C Hamano | bdc37f5 | 2006-01-19 17:13:32 -0800 | [diff] [blame] | 1299 | endif |
hpa | 49744d6 | 2005-09-28 16:52:21 -0700 | [diff] [blame] | 1300 | endif |
Yakov Lerner | 6ba68ab | 2006-05-22 00:37:00 +0300 | [diff] [blame] | 1301 | ifdef NO_INET_NTOP |
| 1302 | LIB_OBJS += compat/inet_ntop.o |
| 1303 | endif |
Jon Loeliger | dd46762 | 2006-09-26 09:47:43 -0500 | [diff] [blame] | 1304 | ifdef NO_INET_PTON |
| 1305 | LIB_OBJS += compat/inet_pton.o |
| 1306 | endif |
Linus Torvalds | cef661f | 2005-04-21 12:33:22 -0700 | [diff] [blame] | 1307 | |
Fernando J. Pereda | b6e56ec | 2006-02-16 09:38:01 +0100 | [diff] [blame] | 1308 | ifdef NO_ICONV |
Petr Baudis | 8d7f586 | 2006-06-25 03:47:03 +0200 | [diff] [blame] | 1309 | BASIC_CFLAGS += -DNO_ICONV |
Fernando J. Pereda | b6e56ec | 2006-02-16 09:38:01 +0100 | [diff] [blame] | 1310 | endif |
| 1311 | |
Ramsay Jones | fd547a9 | 2007-03-03 18:29:03 +0000 | [diff] [blame] | 1312 | ifdef OLD_ICONV |
| 1313 | BASIC_CFLAGS += -DOLD_ICONV |
| 1314 | endif |
| 1315 | |
David Symonds | 609a228 | 2007-11-07 14:24:28 +1100 | [diff] [blame] | 1316 | ifdef NO_DEFLATE_BOUND |
| 1317 | BASIC_CFLAGS += -DNO_DEFLATE_BOUND |
| 1318 | endif |
| 1319 | |
Linus Torvalds | d7c208a | 2009-08-05 16:13:20 -0700 | [diff] [blame] | 1320 | ifdef BLK_SHA1 |
| 1321 | SHA1_HEADER = "block-sha1/sha1.h" |
| 1322 | LIB_OBJS += block-sha1/sha1.o |
Jonathan Nieder | 21528ab | 2010-01-26 09:44:47 -0600 | [diff] [blame] | 1323 | LIB_H += block-sha1/sha1.h |
Linus Torvalds | d7c208a | 2009-08-05 16:13:20 -0700 | [diff] [blame] | 1324 | else |
Nicolas Pitre | 7c6ef2f | 2005-09-20 12:27:13 -0400 | [diff] [blame] | 1325 | ifdef PPC_SHA1 |
| 1326 | SHA1_HEADER = "ppc/sha1.h" |
| 1327 | LIB_OBJS += ppc/sha1.o ppc/sha1ppc.o |
Jonathan Nieder | 21528ab | 2010-01-26 09:44:47 -0600 | [diff] [blame] | 1328 | LIB_H += ppc/sha1.h |
Nicolas Pitre | 7c6ef2f | 2005-09-20 12:27:13 -0400 | [diff] [blame] | 1329 | else |
Nicolas Pitre | 7c6ef2f | 2005-09-20 12:27:13 -0400 | [diff] [blame] | 1330 | SHA1_HEADER = <openssl/sha.h> |
Petr Baudis | d595a47 | 2006-06-24 18:35:12 -0700 | [diff] [blame] | 1331 | EXTLIBS += $(LIB_4_CRYPTO) |
Nicolas Pitre | 7c6ef2f | 2005-09-20 12:27:13 -0400 | [diff] [blame] | 1332 | endif |
| 1333 | endif |
Alex Riesen | f848718 | 2006-12-04 10:50:04 +0100 | [diff] [blame] | 1334 | ifdef NO_PERL_MAKEMAKER |
| 1335 | export NO_PERL_MAKEMAKER |
| 1336 | endif |
Alex Riesen | fa0c87c | 2007-06-13 20:54:32 +0200 | [diff] [blame] | 1337 | ifdef NO_HSTRERROR |
| 1338 | COMPAT_CFLAGS += -DNO_HSTRERROR |
| 1339 | COMPAT_OBJS += compat/hstrerror.o |
| 1340 | endif |
René Scharfe | b21b9f1 | 2007-09-07 00:32:54 +0200 | [diff] [blame] | 1341 | ifdef NO_MEMMEM |
| 1342 | COMPAT_CFLAGS += -DNO_MEMMEM |
| 1343 | COMPAT_OBJS += compat/memmem.o |
| 1344 | endif |
Brian Downing | 43fe901 | 2008-02-05 15:10:44 -0600 | [diff] [blame] | 1345 | ifdef INTERNAL_QSORT |
| 1346 | COMPAT_CFLAGS += -DINTERNAL_QSORT |
| 1347 | COMPAT_OBJS += compat/qsort.o |
| 1348 | endif |
Steffen Prohaska | 35fb0e86 | 2009-01-18 13:00:14 +0100 | [diff] [blame] | 1349 | ifdef RUNTIME_PREFIX |
| 1350 | COMPAT_CFLAGS += -DRUNTIME_PREFIX |
| 1351 | endif |
Alex Riesen | b777434 | 2007-03-07 00:44:49 +0100 | [diff] [blame] | 1352 | |
Junio C Hamano | 46059cc | 2008-11-15 04:08:14 -0800 | [diff] [blame] | 1353 | ifdef NO_PTHREADS |
Junio C Hamano | 46059cc | 2008-11-15 04:08:14 -0800 | [diff] [blame] | 1354 | BASIC_CFLAGS += -DNO_PTHREADS |
| 1355 | else |
Gary V. Vaughan | 48793cf | 2010-05-14 09:31:34 +0000 | [diff] [blame] | 1356 | BASIC_CFLAGS += $(PTHREAD_CFLAGS) |
Junio C Hamano | 46059cc | 2008-11-15 04:08:14 -0800 | [diff] [blame] | 1357 | EXTLIBS += $(PTHREAD_LIBS) |
Andreas Ericsson | 833e3df | 2008-02-22 20:11:56 -0600 | [diff] [blame] | 1358 | LIB_OBJS += thread-utils.o |
Nicolas Pitre | 8ecce68 | 2007-09-06 02:13:11 -0400 | [diff] [blame] | 1359 | endif |
Dan McGee | 7eb151d | 2010-01-29 19:22:19 -0600 | [diff] [blame] | 1360 | |
Alex Riesen | 81a24b5 | 2008-03-05 00:15:39 +0100 | [diff] [blame] | 1361 | ifdef DIR_HAS_BSD_GROUP_SEMANTICS |
| 1362 | COMPAT_CFLAGS += -DDIR_HAS_BSD_GROUP_SEMANTICS |
| 1363 | endif |
Johannes Sixt | 34779c5 | 2009-04-20 10:17:00 +0200 | [diff] [blame] | 1364 | ifdef UNRELIABLE_FSTAT |
| 1365 | BASIC_CFLAGS += -DUNRELIABLE_FSTAT |
| 1366 | endif |
Jeff King | 02232ad | 2009-06-16 15:07:40 -0400 | [diff] [blame] | 1367 | ifdef NO_REGEX |
| 1368 | COMPAT_CFLAGS += -Icompat/regex |
| 1369 | COMPAT_OBJS += compat/regex/regex.o |
| 1370 | endif |
Nicolas Pitre | 8ecce68 | 2007-09-06 02:13:11 -0400 | [diff] [blame] | 1371 | |
Marius Storm-Olsen | f0ed822 | 2009-05-31 18:15:23 +0200 | [diff] [blame] | 1372 | ifdef USE_NED_ALLOCATOR |
| 1373 | COMPAT_CFLAGS += -DUSE_NED_ALLOCATOR -DOVERRIDE_STRDUP -DNDEBUG -DREPLACE_SYSTEM_ALLOCATOR -Icompat/nedmalloc |
| 1374 | COMPAT_OBJS += compat/nedmalloc/nedmalloc.o |
| 1375 | endif |
| 1376 | |
Eygene Ryabinkin | 81b63c7 | 2007-03-28 04:12:07 -0700 | [diff] [blame] | 1377 | ifeq ($(TCLTK_PATH),) |
| 1378 | NO_TCLTK=NoThanks |
| 1379 | endif |
| 1380 | |
Jeff King | 499c293 | 2009-04-03 15:32:20 -0400 | [diff] [blame] | 1381 | ifeq ($(PERL_PATH),) |
| 1382 | NO_PERL=NoThanks |
| 1383 | endif |
| 1384 | |
Johan Herland | d4e1b47 | 2009-11-18 02:42:31 +0100 | [diff] [blame] | 1385 | ifeq ($(PYTHON_PATH),) |
| 1386 | NO_PYTHON=NoThanks |
| 1387 | endif |
| 1388 | |
Fernando J. Pereda | 3b486cd | 2007-04-04 22:42:33 +0200 | [diff] [blame] | 1389 | QUIET_SUBDIR0 = +$(MAKE) -C # space to separate -C and subdir |
Alex Riesen | b777434 | 2007-03-07 00:44:49 +0100 | [diff] [blame] | 1390 | QUIET_SUBDIR1 = |
| 1391 | |
Alex Riesen | a6f3709 | 2007-03-07 00:05:34 +0100 | [diff] [blame] | 1392 | ifneq ($(findstring $(MAKEFLAGS),w),w) |
| 1393 | PRINT_DIR = --no-print-directory |
| 1394 | else # "make -w" |
| 1395 | NO_SUBDIR = : |
| 1396 | endif |
| 1397 | |
Alex Riesen | b777434 | 2007-03-07 00:44:49 +0100 | [diff] [blame] | 1398 | ifneq ($(findstring $(MAKEFLAGS),s),s) |
Shawn O. Pearce | 2314c94 | 2007-03-06 02:09:14 -0500 | [diff] [blame] | 1399 | ifndef V |
Alex Riesen | 31d0399 | 2007-03-06 23:37:18 +0100 | [diff] [blame] | 1400 | QUIET_CC = @echo ' ' CC $@; |
Shawn O. Pearce | 74f2b2a | 2007-03-06 01:35:01 -0500 | [diff] [blame] | 1401 | QUIET_AR = @echo ' ' AR $@; |
| 1402 | QUIET_LINK = @echo ' ' LINK $@; |
| 1403 | QUIET_BUILT_IN = @echo ' ' BUILTIN $@; |
| 1404 | QUIET_GEN = @echo ' ' GEN $@; |
Junio C Hamano | 611c7f6 | 2009-08-06 22:08:09 -0700 | [diff] [blame] | 1405 | QUIET_LNCP = @echo ' ' LN/CP $@; |
Fernando J. Pereda | 3b486cd | 2007-04-04 22:42:33 +0200 | [diff] [blame] | 1406 | QUIET_SUBDIR0 = +@subdir= |
Alex Riesen | a6f3709 | 2007-03-07 00:05:34 +0100 | [diff] [blame] | 1407 | QUIET_SUBDIR1 = ;$(NO_SUBDIR) echo ' ' SUBDIR $$subdir; \ |
| 1408 | $(MAKE) $(PRINT_DIR) -C $$subdir |
Shawn O. Pearce | 2314c94 | 2007-03-06 02:09:14 -0500 | [diff] [blame] | 1409 | export V |
Alex Riesen | 31d0399 | 2007-03-06 23:37:18 +0100 | [diff] [blame] | 1410 | export QUIET_GEN |
Alex Riesen | b777434 | 2007-03-07 00:44:49 +0100 | [diff] [blame] | 1411 | export QUIET_BUILT_IN |
| 1412 | endif |
Shawn O. Pearce | 74f2b2a | 2007-03-06 01:35:01 -0500 | [diff] [blame] | 1413 | endif |
Nicolas Pitre | 7c6ef2f | 2005-09-20 12:27:13 -0400 | [diff] [blame] | 1414 | |
Junio C Hamano | 4c7100a | 2007-06-14 22:20:16 -0700 | [diff] [blame] | 1415 | ifdef ASCIIDOC8 |
| 1416 | export ASCIIDOC8 |
| 1417 | endif |
| 1418 | |
Pavel Roskin | addf88e | 2006-07-09 03:44:30 -0400 | [diff] [blame] | 1419 | # Shell quote (do not use $(call) to accommodate ancient setups); |
Johannes Schindelin | 39c015c | 2006-02-18 12:40:22 +0100 | [diff] [blame] | 1420 | |
| 1421 | SHA1_HEADER_SQ = $(subst ','\'',$(SHA1_HEADER)) |
Johannes Schindelin | 32043c9 | 2007-02-14 12:48:14 +0100 | [diff] [blame] | 1422 | ETC_GITCONFIG_SQ = $(subst ','\'',$(ETC_GITCONFIG)) |
Johannes Schindelin | 39c015c | 2006-02-18 12:40:22 +0100 | [diff] [blame] | 1423 | |
| 1424 | DESTDIR_SQ = $(subst ','\'',$(DESTDIR)) |
| 1425 | bindir_SQ = $(subst ','\'',$(bindir)) |
Steffen Prohaska | 026fa0d | 2009-01-18 13:00:09 +0100 | [diff] [blame] | 1426 | bindir_relative_SQ = $(subst ','\'',$(bindir_relative)) |
Sergei Organov | 8e566f2 | 2007-12-06 21:33:01 +0300 | [diff] [blame] | 1427 | mandir_SQ = $(subst ','\'',$(mandir)) |
Junio C Hamano | a149a1a | 2007-12-10 01:35:29 -0800 | [diff] [blame] | 1428 | infodir_SQ = $(subst ','\'',$(infodir)) |
Johannes Schindelin | 39c015c | 2006-02-18 12:40:22 +0100 | [diff] [blame] | 1429 | gitexecdir_SQ = $(subst ','\'',$(gitexecdir)) |
| 1430 | template_dir_SQ = $(subst ','\'',$(template_dir)) |
Christian Couder | 5d6491c | 2007-12-02 06:07:55 +0100 | [diff] [blame] | 1431 | htmldir_SQ = $(subst ','\'',$(htmldir)) |
Yakov Lerner | ca3bcab | 2006-06-15 01:36:00 +0300 | [diff] [blame] | 1432 | prefix_SQ = $(subst ','\'',$(prefix)) |
Johannes Schindelin | 39c015c | 2006-02-18 12:40:22 +0100 | [diff] [blame] | 1433 | |
| 1434 | SHELL_PATH_SQ = $(subst ','\'',$(SHELL_PATH)) |
| 1435 | PERL_PATH_SQ = $(subst ','\'',$(PERL_PATH)) |
Johan Herland | d4e1b47 | 2009-11-18 02:42:31 +0100 | [diff] [blame] | 1436 | PYTHON_PATH_SQ = $(subst ','\'',$(PYTHON_PATH)) |
Eygene Ryabinkin | 81b63c7 | 2007-03-28 04:12:07 -0700 | [diff] [blame] | 1437 | TCLTK_PATH_SQ = $(subst ','\'',$(TCLTK_PATH)) |
Johannes Schindelin | 39c015c | 2006-02-18 12:40:22 +0100 | [diff] [blame] | 1438 | |
Petr Baudis | d595a47 | 2006-06-24 18:35:12 -0700 | [diff] [blame] | 1439 | LIBS = $(GITLIBS) $(EXTLIBS) |
| 1440 | |
Johannes Schindelin | 32043c9 | 2007-02-14 12:48:14 +0100 | [diff] [blame] | 1441 | BASIC_CFLAGS += -DSHA1_HEADER='$(SHA1_HEADER_SQ)' \ |
Johannes Sixt | 506b17b | 2007-11-13 21:05:05 +0100 | [diff] [blame] | 1442 | $(COMPAT_CFLAGS) |
Jason Riedy | e40b61f | 2005-12-02 15:08:28 -0800 | [diff] [blame] | 1443 | LIB_OBJS += $(COMPAT_OBJS) |
Petr Baudis | 8d7f586 | 2006-06-25 03:47:03 +0200 | [diff] [blame] | 1444 | |
Jonathan Nieder | 8f4b576 | 2009-10-30 20:44:41 -0500 | [diff] [blame] | 1445 | # Quote for C |
| 1446 | |
| 1447 | ifdef DEFAULT_EDITOR |
| 1448 | DEFAULT_EDITOR_CQ = "$(subst ",\",$(subst \,\\,$(DEFAULT_EDITOR)))" |
| 1449 | DEFAULT_EDITOR_CQ_SQ = $(subst ','\'',$(DEFAULT_EDITOR_CQ)) |
| 1450 | |
| 1451 | BASIC_CFLAGS += -DDEFAULT_EDITOR='$(DEFAULT_EDITOR_CQ_SQ)' |
| 1452 | endif |
| 1453 | |
Junio C Hamano | a3d023d | 2009-10-30 20:45:34 -0500 | [diff] [blame] | 1454 | ifdef DEFAULT_PAGER |
| 1455 | DEFAULT_PAGER_CQ = "$(subst ",\",$(subst \,\\,$(DEFAULT_PAGER)))" |
| 1456 | DEFAULT_PAGER_CQ_SQ = $(subst ','\'',$(DEFAULT_PAGER_CQ)) |
| 1457 | |
| 1458 | BASIC_CFLAGS += -DDEFAULT_PAGER='$(DEFAULT_PAGER_CQ_SQ)' |
| 1459 | endif |
| 1460 | |
Petr Baudis | 8d7f586 | 2006-06-25 03:47:03 +0200 | [diff] [blame] | 1461 | ALL_CFLAGS += $(BASIC_CFLAGS) |
| 1462 | ALL_LDFLAGS += $(BASIC_LDFLAGS) |
| 1463 | |
Gary V. Vaughan | d1b1a91 | 2010-05-14 09:31:36 +0000 | [diff] [blame^] | 1464 | export DIFF TAR INSTALL DESTDIR SHELL_PATH |
Petr Baudis | d595a47 | 2006-06-24 18:35:12 -0700 | [diff] [blame] | 1465 | |
| 1466 | |
Petr Baudis | 28818ff | 2005-07-29 17:50:24 +0200 | [diff] [blame] | 1467 | ### Build rules |
Linus Torvalds | 8996702 | 2005-04-30 13:19:56 -0700 | [diff] [blame] | 1468 | |
Brandon Casey | c94c8e5 | 2008-08-07 14:03:42 -0500 | [diff] [blame] | 1469 | SHELL = $(SHELL_PATH) |
| 1470 | |
Jonathan Nieder | 46bac90 | 2010-01-31 11:46:53 -0800 | [diff] [blame] | 1471 | all:: shell_compatibility_test $(ALL_PROGRAMS) $(SCRIPT_LIB) $(BUILT_INS) $(OTHER_PROGRAMS) GIT-BUILD-OPTIONS |
Junio C Hamano | 6fc301b | 2007-01-10 12:24:54 -0800 | [diff] [blame] | 1472 | ifneq (,$X) |
Sebastian Schuberth | ade2ca0 | 2009-10-27 12:23:33 +0100 | [diff] [blame] | 1473 | $(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';) |
Junio C Hamano | 6fc301b | 2007-01-10 12:24:54 -0800 | [diff] [blame] | 1474 | endif |
Petr Baudis | 28818ff | 2005-07-29 17:50:24 +0200 | [diff] [blame] | 1475 | |
Junio C Hamano | 6fc301b | 2007-01-10 12:24:54 -0800 | [diff] [blame] | 1476 | all:: |
Eygene Ryabinkin | 3cfaf11 | 2007-03-28 04:00:23 -0700 | [diff] [blame] | 1477 | ifndef NO_TCLTK |
Junio C Hamano | e84a063 | 2008-07-28 00:02:48 -0700 | [diff] [blame] | 1478 | $(QUIET_SUBDIR0)git-gui $(QUIET_SUBDIR1) gitexecdir='$(gitexec_instdir_SQ)' all |
Junio C Hamano | 62ba514 | 2007-11-17 10:51:16 -0800 | [diff] [blame] | 1479 | $(QUIET_SUBDIR0)gitk-git $(QUIET_SUBDIR1) all |
Eygene Ryabinkin | 3cfaf11 | 2007-03-28 04:00:23 -0700 | [diff] [blame] | 1480 | endif |
Jeff King | 499c293 | 2009-04-03 15:32:20 -0400 | [diff] [blame] | 1481 | ifndef NO_PERL |
Shawn O. Pearce | 74f2b2a | 2007-03-06 01:35:01 -0500 | [diff] [blame] | 1482 | $(QUIET_SUBDIR0)perl $(QUIET_SUBDIR1) PERL_PATH='$(PERL_PATH_SQ)' prefix='$(prefix_SQ)' all |
Jeff King | 499c293 | 2009-04-03 15:32:20 -0400 | [diff] [blame] | 1483 | endif |
Sverre Rabbelier | 2fe40b6 | 2009-11-18 02:42:32 +0100 | [diff] [blame] | 1484 | ifndef NO_PYTHON |
| 1485 | $(QUIET_SUBDIR0)git_remote_helpers $(QUIET_SUBDIR1) PYTHON_PATH='$(PYTHON_PATH_SQ)' prefix='$(prefix_SQ)' all |
| 1486 | endif |
Ben Walton | 502be95 | 2010-03-20 10:48:08 -0400 | [diff] [blame] | 1487 | $(QUIET_SUBDIR0)templates $(QUIET_SUBDIR1) SHELL_PATH='$(SHELL_PATH_SQ)' PERL_PATH='$(PERL_PATH_SQ)' |
Nicolas Pitre | a310d43 | 2005-05-19 10:27:14 -0400 | [diff] [blame] | 1488 | |
Brandon Casey | 6dc4627 | 2008-08-07 14:06:26 -0500 | [diff] [blame] | 1489 | please_set_SHELL_PATH_to_a_more_modern_shell: |
| 1490 | @$$(:) |
| 1491 | |
| 1492 | shell_compatibility_test: please_set_SHELL_PATH_to_a_more_modern_shell |
| 1493 | |
Junio C Hamano | 4dc0002 | 2006-01-12 21:42:25 -0800 | [diff] [blame] | 1494 | strip: $(PROGRAMS) git$X |
| 1495 | $(STRIP) $(STRIP_OPTS) $(PROGRAMS) git$X |
| 1496 | |
Jonathan Nieder | 373a5ed | 2010-01-06 02:05:04 -0600 | [diff] [blame] | 1497 | git.o: common-cmds.h |
Jonathan Nieder | a673cfe | 2010-03-19 22:20:12 -0500 | [diff] [blame] | 1498 | git.s git.o: EXTRA_CPPFLAGS = -DGIT_VERSION='"$(GIT_VERSION)"' \ |
Jonathan Nieder | 373a5ed | 2010-01-06 02:05:04 -0600 | [diff] [blame] | 1499 | '-DGIT_HTML_PATH="$(htmldir_SQ)"' |
Junio C Hamano | 334d28a | 2007-06-13 01:28:21 -0700 | [diff] [blame] | 1500 | |
| 1501 | git$X: git.o $(BUILTIN_OBJS) $(GITLIBS) |
Matt McCutchen | 54dadbd | 2007-07-09 21:30:39 -0400 | [diff] [blame] | 1502 | $(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ git.o \ |
Linus Torvalds | 70827b1 | 2006-04-21 10:27:34 -0700 | [diff] [blame] | 1503 | $(BUILTIN_OBJS) $(ALL_LDFLAGS) $(LIBS) |
Junio C Hamano | 6a2e50f | 2005-09-07 21:26:52 -0700 | [diff] [blame] | 1504 | |
Linus Torvalds | 81b50f3 | 2010-02-22 08:42:18 -0800 | [diff] [blame] | 1505 | builtin/help.o: common-cmds.h |
Jonathan Nieder | a673cfe | 2010-03-19 22:20:12 -0500 | [diff] [blame] | 1506 | builtin/help.s builtin/help.o: EXTRA_CPPFLAGS = \ |
Jonathan Nieder | 373a5ed | 2010-01-06 02:05:04 -0600 | [diff] [blame] | 1507 | '-DGIT_HTML_PATH="$(htmldir_SQ)"' \ |
| 1508 | '-DGIT_MAN_PATH="$(mandir_SQ)"' \ |
| 1509 | '-DGIT_INFO_PATH="$(infodir_SQ)"' |
Junio C Hamano | 08df617 | 2006-04-21 21:56:13 -0700 | [diff] [blame] | 1510 | |
Junio C Hamano | 9173080 | 2006-04-10 17:37:58 -0700 | [diff] [blame] | 1511 | $(BUILT_INS): git$X |
Andreas Färber | 3e073dc | 2008-08-25 17:33:03 +0200 | [diff] [blame] | 1512 | $(QUIET_BUILT_IN)$(RM) $@ && \ |
| 1513 | ln git$X $@ 2>/dev/null || \ |
| 1514 | ln -s git$X $@ 2>/dev/null || \ |
| 1515 | cp git$X $@ |
Junio C Hamano | 9173080 | 2006-04-10 17:37:58 -0700 | [diff] [blame] | 1516 | |
Junio C Hamano | 79d3066 | 2007-12-01 23:39:19 -0800 | [diff] [blame] | 1517 | common-cmds.h: ./generate-cmdlist.sh command-list.txt |
Junio C Hamano | 48dd1da | 2007-06-13 02:00:01 -0700 | [diff] [blame] | 1518 | |
Junio C Hamano | 766b084 | 2007-04-05 15:03:48 -0700 | [diff] [blame] | 1519 | common-cmds.h: $(wildcard Documentation/git-*.txt) |
Shawn O. Pearce | 74f2b2a | 2007-03-06 01:35:01 -0500 | [diff] [blame] | 1520 | $(QUIET_GEN)./generate-cmdlist.sh > $@+ && mv $@+ $@ |
Fredrik Kuivinen | a87cd02 | 2006-03-09 17:24:19 +0100 | [diff] [blame] | 1521 | |
Jonathan Nieder | 46bac90 | 2010-01-31 11:46:53 -0800 | [diff] [blame] | 1522 | define cmd_munge_script |
| 1523 | $(RM) $@ $@+ && \ |
| 1524 | sed -e '1s|#!.*/sh|#!$(SHELL_PATH_SQ)|' \ |
| 1525 | -e 's|@SHELL_PATH@|$(SHELL_PATH_SQ)|' \ |
| 1526 | -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' \ |
| 1527 | -e 's/@@NO_CURL@@/$(NO_CURL)/g' \ |
| 1528 | -e $(BROKEN_PATH_FIX) \ |
| 1529 | $@.sh >$@+ |
| 1530 | endef |
| 1531 | |
Andreas Ericsson | d6ebd25 | 2005-11-22 00:44:15 +0100 | [diff] [blame] | 1532 | $(patsubst %.sh,%,$(SCRIPT_SH)) : % : %.sh |
Jonathan Nieder | 46bac90 | 2010-01-31 11:46:53 -0800 | [diff] [blame] | 1533 | $(QUIET_GEN)$(cmd_munge_script) && \ |
Shawn O. Pearce | 74f2b2a | 2007-03-06 01:35:01 -0500 | [diff] [blame] | 1534 | chmod +x $@+ && \ |
Jim Meyering | fc36f6a | 2006-05-25 18:52:01 +0200 | [diff] [blame] | 1535 | mv $@+ $@ |
Junio C Hamano | bc6146d | 2005-09-08 18:50:33 -0700 | [diff] [blame] | 1536 | |
Jonathan Nieder | 46bac90 | 2010-01-31 11:46:53 -0800 | [diff] [blame] | 1537 | $(SCRIPT_LIB) : % : %.sh |
| 1538 | $(QUIET_GEN)$(cmd_munge_script) && \ |
| 1539 | mv $@+ $@ |
| 1540 | |
Jeff King | 499c293 | 2009-04-03 15:32:20 -0400 | [diff] [blame] | 1541 | ifndef NO_PERL |
Alex Riesen | f848718 | 2006-12-04 10:50:04 +0100 | [diff] [blame] | 1542 | $(patsubst %.perl,%,$(SCRIPT_PERL)): perl/perl.mak |
| 1543 | |
Alex Riesen | d1a2057 | 2007-10-25 22:17:24 +0200 | [diff] [blame] | 1544 | perl/perl.mak: GIT-CFLAGS perl/Makefile perl/Makefile.PL |
Alex Riesen | 31d0399 | 2007-03-06 23:37:18 +0100 | [diff] [blame] | 1545 | $(QUIET_SUBDIR0)perl $(QUIET_SUBDIR1) PERL_PATH='$(PERL_PATH_SQ)' prefix='$(prefix_SQ)' $(@F) |
Alex Riesen | f848718 | 2006-12-04 10:50:04 +0100 | [diff] [blame] | 1546 | |
Junio C Hamano | f6276fe | 2006-06-24 19:41:03 -0700 | [diff] [blame] | 1547 | $(patsubst %.perl,%,$(SCRIPT_PERL)): % : %.perl |
Emil Medve | 4cb08df | 2007-07-14 12:51:44 -0500 | [diff] [blame] | 1548 | $(QUIET_GEN)$(RM) $@ $@+ && \ |
Jim Meyering | e883932 | 2007-09-25 08:42:16 +0200 | [diff] [blame] | 1549 | INSTLIBDIR=`MAKEFLAGS= $(MAKE) -C perl -s --no-print-directory instlibdir` && \ |
Junio C Hamano | 998c4da | 2006-07-07 13:04:35 -0700 | [diff] [blame] | 1550 | sed -e '1{' \ |
| 1551 | -e ' s|#!.*perl|#!$(PERL_PATH_SQ)|' \ |
| 1552 | -e ' h' \ |
Johannes Schindelin | 352c811 | 2009-05-23 10:04:48 +0200 | [diff] [blame] | 1553 | -e ' s=.*=use lib (split(/$(pathsep)/, $$ENV{GITPERLLIB} || "@@INSTLIBDIR@@"));=' \ |
Junio C Hamano | 998c4da | 2006-07-07 13:04:35 -0700 | [diff] [blame] | 1554 | -e ' H' \ |
| 1555 | -e ' x' \ |
| 1556 | -e '}' \ |
Junio C Hamano | f6276fe | 2006-06-24 19:41:03 -0700 | [diff] [blame] | 1557 | -e 's|@@INSTLIBDIR@@|'"$$INSTLIBDIR"'|g' \ |
Junio C Hamano | 3ff8cbe | 2005-10-04 12:41:35 -0700 | [diff] [blame] | 1558 | -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' \ |
Shawn O. Pearce | 74f2b2a | 2007-03-06 01:35:01 -0500 | [diff] [blame] | 1559 | $@.perl >$@+ && \ |
| 1560 | chmod +x $@+ && \ |
Jim Meyering | fc36f6a | 2006-05-25 18:52:01 +0200 | [diff] [blame] | 1561 | mv $@+ $@ |
Junio C Hamano | bc6146d | 2005-09-08 18:50:33 -0700 | [diff] [blame] | 1562 | |
John 'Warthog9' Hawley | 62331ef | 2010-01-30 23:30:40 +0100 | [diff] [blame] | 1563 | |
| 1564 | .PHONY: gitweb |
| 1565 | gitweb: |
| 1566 | $(QUIET_SUBDIR0)gitweb $(QUIET_SUBDIR1) all |
| 1567 | |
Jakub Narebski | 63267de | 2009-09-01 13:39:20 +0200 | [diff] [blame] | 1568 | ifdef JSMIN |
Mark Rada | 0e6ce21 | 2010-04-02 20:35:05 -0400 | [diff] [blame] | 1569 | GITWEB_PROGRAMS += gitweb/gitweb.min.js |
Mark Rada | 09b89d1 | 2010-04-02 20:40:33 -0400 | [diff] [blame] | 1570 | GITWEB_JS = gitweb/gitweb.min.js |
Jakub Narebski | 63267de | 2009-09-01 13:39:20 +0200 | [diff] [blame] | 1571 | else |
Mark Rada | 09b89d1 | 2010-04-02 20:40:33 -0400 | [diff] [blame] | 1572 | GITWEB_JS = gitweb/gitweb.js |
Jakub Narebski | 63267de | 2009-09-01 13:39:20 +0200 | [diff] [blame] | 1573 | endif |
Mark Rada | 0e6ce21 | 2010-04-02 20:35:05 -0400 | [diff] [blame] | 1574 | ifdef CSSMIN |
| 1575 | GITWEB_PROGRAMS += gitweb/gitweb.min.css |
Mark Rada | 09b89d1 | 2010-04-02 20:40:33 -0400 | [diff] [blame] | 1576 | GITWEB_CSS = gitweb/gitweb.min.css |
| 1577 | else |
| 1578 | GITWEB_CSS = gitweb/gitweb.css |
Mark Rada | 0e6ce21 | 2010-04-02 20:35:05 -0400 | [diff] [blame] | 1579 | endif |
| 1580 | OTHER_PROGRAMS += gitweb/gitweb.cgi $(GITWEB_PROGRAMS) |
| 1581 | gitweb/gitweb.cgi: gitweb/gitweb.perl $(GITWEB_PROGRAMS) |
John 'Warthog9' Hawley | 62331ef | 2010-01-30 23:30:40 +0100 | [diff] [blame] | 1582 | $(QUIET_SUBDIR0)gitweb $(QUIET_SUBDIR1) $(patsubst gitweb/%,%,$@) |
| 1583 | |
| 1584 | ifdef JSMIN |
| 1585 | gitweb/gitweb.min.js: gitweb/gitweb.js |
| 1586 | $(QUIET_SUBDIR0)gitweb $(QUIET_SUBDIR1) $(patsubst gitweb/%,%,$@) |
| 1587 | endif # JSMIN |
Mark Rada | 0e6ce21 | 2010-04-02 20:35:05 -0400 | [diff] [blame] | 1588 | ifdef CSSMIN |
| 1589 | gitweb/gitweb.min.css: gitweb/gitweb.css |
| 1590 | $(QUIET_SUBDIR0)gitweb $(QUIET_SUBDIR1) $(patsubst gitweb/%,%,$@) |
| 1591 | endif # CSSMIN |
John 'Warthog9' Hawley | 62331ef | 2010-01-30 23:30:40 +0100 | [diff] [blame] | 1592 | |
Martin Waitz | 5d043a3 | 2006-08-01 21:34:08 +0200 | [diff] [blame] | 1593 | |
Jakub Narebski | 4af819d | 2009-09-01 13:39:17 +0200 | [diff] [blame] | 1594 | git-instaweb: git-instaweb.sh gitweb/gitweb.cgi gitweb/gitweb.css gitweb/gitweb.js |
Emil Medve | 4cb08df | 2007-07-14 12:51:44 -0500 | [diff] [blame] | 1595 | $(QUIET_GEN)$(RM) $@ $@+ && \ |
Eric Wong | a51d37c | 2006-07-01 15:14:14 -0700 | [diff] [blame] | 1596 | sed -e '1s|#!.*/sh|#!$(SHELL_PATH_SQ)|' \ |
| 1597 | -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' \ |
| 1598 | -e 's/@@NO_CURL@@/$(NO_CURL)/g' \ |
Michal Rokos | 6e959ab | 2006-07-08 17:27:10 +0200 | [diff] [blame] | 1599 | -e '/@@GITWEB_CGI@@/r gitweb/gitweb.cgi' \ |
Johannes Schindelin | 0700228 | 2006-07-02 11:31:30 +0200 | [diff] [blame] | 1600 | -e '/@@GITWEB_CGI@@/d' \ |
Mark Rada | 09b89d1 | 2010-04-02 20:40:33 -0400 | [diff] [blame] | 1601 | -e '/@@GITWEB_CSS@@/r $(GITWEB_CSS)' \ |
Johannes Schindelin | 0700228 | 2006-07-02 11:31:30 +0200 | [diff] [blame] | 1602 | -e '/@@GITWEB_CSS@@/d' \ |
Mark Rada | 09b89d1 | 2010-04-02 20:40:33 -0400 | [diff] [blame] | 1603 | -e '/@@GITWEB_JS@@/r $(GITWEB_JS)' \ |
Jakub Narebski | 4af819d | 2009-09-01 13:39:17 +0200 | [diff] [blame] | 1604 | -e '/@@GITWEB_JS@@/d' \ |
Charles Bailey | c569969 | 2007-12-19 12:25:27 +0000 | [diff] [blame] | 1605 | -e 's|@@PERL@@|$(PERL_PATH_SQ)|g' \ |
Mark Rada | 09b89d1 | 2010-04-02 20:40:33 -0400 | [diff] [blame] | 1606 | -e 's|@@GITWEB_CSS_NAME@@|$(GITWEB_CSS)|' \ |
| 1607 | -e 's|@@GITWEB_JS_NAME@@|$(GITWEB_JS)|' \ |
Shawn O. Pearce | 74f2b2a | 2007-03-06 01:35:01 -0500 | [diff] [blame] | 1608 | $@.sh > $@+ && \ |
| 1609 | chmod +x $@+ && \ |
Eric Wong | a51d37c | 2006-07-01 15:14:14 -0700 | [diff] [blame] | 1610 | mv $@+ $@ |
Jeff King | 499c293 | 2009-04-03 15:32:20 -0400 | [diff] [blame] | 1611 | else # NO_PERL |
| 1612 | $(patsubst %.perl,%,$(SCRIPT_PERL)) git-instaweb: % : unimplemented.sh |
| 1613 | $(QUIET_GEN)$(RM) $@ $@+ && \ |
| 1614 | sed -e '1s|#!.*/sh|#!$(SHELL_PATH_SQ)|' \ |
| 1615 | -e 's|@@REASON@@|NO_PERL=$(NO_PERL)|g' \ |
| 1616 | unimplemented.sh >$@+ && \ |
| 1617 | chmod +x $@+ && \ |
| 1618 | mv $@+ $@ |
| 1619 | endif # NO_PERL |
Eric Wong | a51d37c | 2006-07-01 15:14:14 -0700 | [diff] [blame] | 1620 | |
Sverre Rabbelier | 2fe40b6 | 2009-11-18 02:42:32 +0100 | [diff] [blame] | 1621 | ifndef NO_PYTHON |
| 1622 | $(patsubst %.py,%,$(SCRIPT_PYTHON)): GIT-CFLAGS |
| 1623 | $(patsubst %.py,%,$(SCRIPT_PYTHON)): % : %.py |
| 1624 | $(QUIET_GEN)$(RM) $@ $@+ && \ |
| 1625 | INSTLIBDIR=`MAKEFLAGS= $(MAKE) -C git_remote_helpers -s \ |
| 1626 | --no-print-directory prefix='$(prefix_SQ)' DESTDIR='$(DESTDIR_SQ)' \ |
| 1627 | instlibdir` && \ |
| 1628 | sed -e '1{' \ |
| 1629 | -e ' s|#!.*python|#!$(PYTHON_PATH_SQ)|' \ |
| 1630 | -e '}' \ |
| 1631 | -e 's|^import sys.*|&; \\\ |
| 1632 | import os; \\\ |
David Aguilar | 0ae0840 | 2010-03-27 17:45:12 -0700 | [diff] [blame] | 1633 | sys.path.insert(0, os.getenv("GITPYTHONLIB",\ |
| 1634 | "@@INSTLIBDIR@@"));|' \ |
Sverre Rabbelier | 2fe40b6 | 2009-11-18 02:42:32 +0100 | [diff] [blame] | 1635 | -e 's|@@INSTLIBDIR@@|'"$$INSTLIBDIR"'|g' \ |
| 1636 | $@.py >$@+ && \ |
| 1637 | chmod +x $@+ && \ |
| 1638 | mv $@+ $@ |
| 1639 | else # NO_PYTHON |
| 1640 | $(patsubst %.py,%,$(SCRIPT_PYTHON)): % : unimplemented.sh |
| 1641 | $(QUIET_GEN)$(RM) $@ $@+ && \ |
| 1642 | sed -e '1s|#!.*/sh|#!$(SHELL_PATH_SQ)|' \ |
| 1643 | -e 's|@@REASON@@|NO_PYTHON=$(NO_PYTHON)|g' \ |
| 1644 | unimplemented.sh >$@+ && \ |
| 1645 | chmod +x $@+ && \ |
| 1646 | mv $@+ $@ |
| 1647 | endif # NO_PYTHON |
| 1648 | |
Jakub Narebski | 3900145 | 2006-08-08 18:35:23 +0200 | [diff] [blame] | 1649 | configure: configure.ac |
Emil Medve | 4cb08df | 2007-07-14 12:51:44 -0500 | [diff] [blame] | 1650 | $(QUIET_GEN)$(RM) $@ $<+ && \ |
Jakub Narebski | 3900145 | 2006-08-08 18:35:23 +0200 | [diff] [blame] | 1651 | sed -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' \ |
Shawn O. Pearce | 74f2b2a | 2007-03-06 01:35:01 -0500 | [diff] [blame] | 1652 | $< > $<+ && \ |
| 1653 | autoconf -o $@ $<+ && \ |
Emil Medve | 4cb08df | 2007-07-14 12:51:44 -0500 | [diff] [blame] | 1654 | $(RM) $<+ |
Jakub Narebski | 3900145 | 2006-08-08 18:35:23 +0200 | [diff] [blame] | 1655 | |
Junio C Hamano | 9b88fce | 2005-12-27 14:40:17 -0800 | [diff] [blame] | 1656 | # These can record GIT_VERSION |
Matt McCutchen | 54dadbd | 2007-07-09 21:30:39 -0400 | [diff] [blame] | 1657 | git.o git.spec \ |
Junio C Hamano | 9b88fce | 2005-12-27 14:40:17 -0800 | [diff] [blame] | 1658 | $(patsubst %.sh,%,$(SCRIPT_SH)) \ |
| 1659 | $(patsubst %.perl,%,$(SCRIPT_PERL)) \ |
Junio C Hamano | 9b88fce | 2005-12-27 14:40:17 -0800 | [diff] [blame] | 1660 | : GIT-VERSION-FILE |
Johannes Schindelin | e99fcf9 | 2005-12-22 20:38:23 +0100 | [diff] [blame] | 1661 | |
Jonathan Nieder | 5b8805e | 2010-02-28 03:11:55 -0600 | [diff] [blame] | 1662 | TEST_OBJS := $(patsubst test-%$X,test-%.o,$(TEST_PROGRAMS)) |
Jonathan Nieder | 1b22c99 | 2010-01-26 09:54:23 -0600 | [diff] [blame] | 1663 | GIT_OBJS := $(LIB_OBJS) $(BUILTIN_OBJS) $(PROGRAM_OBJS) $(TEST_OBJS) \ |
| 1664 | git.o http.o http-walker.o remote-curl.o |
Jonathan Nieder | beeb456 | 2010-01-26 09:49:33 -0600 | [diff] [blame] | 1665 | XDIFF_OBJS = xdiff/xdiffi.o xdiff/xprepare.o xdiff/xutils.o xdiff/xemit.o \ |
| 1666 | xdiff/xmerge.o xdiff/xpatience.o |
Jonathan Nieder | c373991 | 2010-01-26 09:52:11 -0600 | [diff] [blame] | 1667 | OBJECTS := $(GIT_OBJS) $(XDIFF_OBJS) |
| 1668 | |
Jonathan Nieder | ec5e0bb | 2010-01-31 15:23:53 -0600 | [diff] [blame] | 1669 | dep_files := $(foreach f,$(OBJECTS),$(dir $f).depend/$(notdir $f).d) |
Jonathan Nieder | 010acc1 | 2010-01-31 15:37:25 -0600 | [diff] [blame] | 1670 | dep_dirs := $(addsuffix .depend,$(sort $(dir $(OBJECTS)))) |
Jonathan Nieder | beeb456 | 2010-01-26 09:49:33 -0600 | [diff] [blame] | 1671 | |
Jonathan Nieder | dfea575 | 2010-01-26 09:52:49 -0600 | [diff] [blame] | 1672 | ifdef COMPUTE_HEADER_DEPENDENCIES |
Jonathan Nieder | dfea575 | 2010-01-26 09:52:49 -0600 | [diff] [blame] | 1673 | $(dep_dirs): |
| 1674 | mkdir -p $@ |
| 1675 | |
| 1676 | missing_dep_dirs := $(filter-out $(wildcard $(dep_dirs)),$(dep_dirs)) |
Jonathan Nieder | ec5e0bb | 2010-01-31 15:23:53 -0600 | [diff] [blame] | 1677 | dep_file = $(dir $@).depend/$(notdir $@).d |
Jonathan Nieder | f2fabbf | 2010-01-26 09:57:15 -0600 | [diff] [blame] | 1678 | dep_args = -MF $(dep_file) -MMD -MP |
| 1679 | ifdef CHECK_HEADER_DEPENDENCIES |
| 1680 | $(error cannot compute header dependencies outside a normal build. \ |
| 1681 | Please unset CHECK_HEADER_DEPENDENCIES and try again) |
| 1682 | endif |
| 1683 | endif |
| 1684 | |
| 1685 | ifndef COMPUTE_HEADER_DEPENDENCIES |
| 1686 | ifndef CHECK_HEADER_DEPENDENCIES |
Jonathan Nieder | dfea575 | 2010-01-26 09:52:49 -0600 | [diff] [blame] | 1687 | dep_dirs = |
| 1688 | missing_dep_dirs = |
Jonathan Nieder | f2fabbf | 2010-01-26 09:57:15 -0600 | [diff] [blame] | 1689 | dep_args = |
Jonathan Nieder | dfea575 | 2010-01-26 09:52:49 -0600 | [diff] [blame] | 1690 | endif |
Jonathan Nieder | f2fabbf | 2010-01-26 09:57:15 -0600 | [diff] [blame] | 1691 | endif |
| 1692 | |
| 1693 | ifdef CHECK_HEADER_DEPENDENCIES |
| 1694 | ifndef PRINT_HEADER_DEPENDENCIES |
| 1695 | missing_deps = $(filter-out $(notdir $^), \ |
| 1696 | $(notdir $(shell $(MAKE) -s $@ \ |
| 1697 | CHECK_HEADER_DEPENDENCIES=YesPlease \ |
| 1698 | USE_COMPUTED_HEADER_DEPENDENCIES=YesPlease \ |
| 1699 | PRINT_HEADER_DEPENDENCIES=YesPlease))) |
| 1700 | endif |
| 1701 | endif |
| 1702 | |
| 1703 | ASM_SRC := $(wildcard $(OBJECTS:o=S)) |
| 1704 | ASM_OBJ := $(ASM_SRC:S=o) |
| 1705 | C_OBJ := $(filter-out $(ASM_OBJ),$(OBJECTS)) |
Jonathan Nieder | dfea575 | 2010-01-26 09:52:49 -0600 | [diff] [blame] | 1706 | |
Jonathan Nieder | 3024888 | 2010-01-26 09:51:24 -0600 | [diff] [blame] | 1707 | .SUFFIXES: |
| 1708 | |
Jonathan Nieder | f2fabbf | 2010-01-26 09:57:15 -0600 | [diff] [blame] | 1709 | ifdef PRINT_HEADER_DEPENDENCIES |
| 1710 | $(C_OBJ): %.o: %.c FORCE |
| 1711 | echo $^ |
| 1712 | $(ASM_OBJ): %.o: %.S FORCE |
| 1713 | echo $^ |
Jonathan Nieder | dfea575 | 2010-01-26 09:52:49 -0600 | [diff] [blame] | 1714 | |
Jonathan Nieder | f2fabbf | 2010-01-26 09:57:15 -0600 | [diff] [blame] | 1715 | ifndef CHECK_HEADER_DEPENDENCIES |
| 1716 | $(error cannot print header dependencies during a normal build. \ |
| 1717 | Please set CHECK_HEADER_DEPENDENCIES and try again) |
| 1718 | endif |
Jonathan Nieder | dfea575 | 2010-01-26 09:52:49 -0600 | [diff] [blame] | 1719 | endif |
| 1720 | |
Jonathan Nieder | f2fabbf | 2010-01-26 09:57:15 -0600 | [diff] [blame] | 1721 | ifndef PRINT_HEADER_DEPENDENCIES |
| 1722 | ifdef CHECK_HEADER_DEPENDENCIES |
| 1723 | $(C_OBJ): %.o: %.c $(dep_files) FORCE |
| 1724 | @set -e; echo CHECK $@; \ |
| 1725 | missing_deps="$(missing_deps)"; \ |
| 1726 | if test "$$missing_deps"; \ |
| 1727 | then \ |
| 1728 | echo missing dependencies: $$missing_deps; \ |
| 1729 | false; \ |
| 1730 | fi |
| 1731 | $(ASM_OBJ): %.o: %.S $(dep_files) FORCE |
| 1732 | @set -e; echo CHECK $@; \ |
| 1733 | missing_deps="$(missing_deps)"; \ |
| 1734 | if test "$$missing_deps"; \ |
| 1735 | then \ |
| 1736 | echo missing dependencies: $$missing_deps; \ |
| 1737 | false; \ |
| 1738 | fi |
| 1739 | endif |
| 1740 | endif |
Jonathan Nieder | dfea575 | 2010-01-26 09:52:49 -0600 | [diff] [blame] | 1741 | |
Jonathan Nieder | f2fabbf | 2010-01-26 09:57:15 -0600 | [diff] [blame] | 1742 | ifndef CHECK_HEADER_DEPENDENCIES |
| 1743 | $(C_OBJ): %.o: %.c GIT-CFLAGS $(missing_dep_dirs) |
Jonathan Nieder | a673cfe | 2010-03-19 22:20:12 -0500 | [diff] [blame] | 1744 | $(QUIET_CC)$(CC) -o $*.o -c $(dep_args) $(ALL_CFLAGS) $(EXTRA_CPPFLAGS) $< |
Jonathan Nieder | f2fabbf | 2010-01-26 09:57:15 -0600 | [diff] [blame] | 1745 | $(ASM_OBJ): %.o: %.S GIT-CFLAGS $(missing_dep_dirs) |
Jonathan Nieder | a673cfe | 2010-03-19 22:20:12 -0500 | [diff] [blame] | 1746 | $(QUIET_CC)$(CC) -o $*.o -c $(dep_args) $(ALL_CFLAGS) $(EXTRA_CPPFLAGS) $< |
Jonathan Nieder | f2fabbf | 2010-01-26 09:57:15 -0600 | [diff] [blame] | 1747 | endif |
| 1748 | |
Jonathan Nieder | 13fca9f | 2010-01-06 02:06:58 -0600 | [diff] [blame] | 1749 | %.s: %.c GIT-CFLAGS FORCE |
Jonathan Nieder | a673cfe | 2010-03-19 22:20:12 -0500 | [diff] [blame] | 1750 | $(QUIET_CC)$(CC) -S $(ALL_CFLAGS) $(EXTRA_CPPFLAGS) $< |
Jonathan Nieder | f2fabbf | 2010-01-26 09:57:15 -0600 | [diff] [blame] | 1751 | |
| 1752 | ifdef USE_COMPUTED_HEADER_DEPENDENCIES |
| 1753 | # Take advantage of gcc's on-the-fly dependency generation |
| 1754 | # See <http://gcc.gnu.org/gcc-3.0/features.html>. |
| 1755 | dep_files_present := $(wildcard $(dep_files)) |
| 1756 | ifneq ($(dep_files_present),) |
| 1757 | include $(dep_files_present) |
| 1758 | endif |
| 1759 | else |
Jonathan Nieder | dfea575 | 2010-01-26 09:52:49 -0600 | [diff] [blame] | 1760 | # Dependencies on header files, for platforms that do not support |
| 1761 | # the gcc -MMD option. |
| 1762 | # |
| 1763 | # Dependencies on automatically generated headers such as common-cmds.h |
| 1764 | # should _not_ be included here, since they are necessary even when |
| 1765 | # building an object for the first time. |
| 1766 | # |
| 1767 | # XXX. Please check occasionally that these include all dependencies |
| 1768 | # gcc detects! |
Pavel Roskin | b05701c | 2005-08-06 01:36:15 -0400 | [diff] [blame] | 1769 | |
Jonathan Nieder | beeb456 | 2010-01-26 09:49:33 -0600 | [diff] [blame] | 1770 | $(GIT_OBJS): $(LIB_H) |
Junio C Hamano | 2e0e8b6 | 2010-03-10 15:25:18 -0800 | [diff] [blame] | 1771 | builtin/branch.o builtin/checkout.o builtin/clone.o builtin/reset.o branch.o transport.o: branch.h |
| 1772 | builtin/bundle.o bundle.o transport.o: bundle.h |
| 1773 | builtin/bisect--helper.o builtin/rev-list.o bisect.o: bisect.h |
| 1774 | builtin/clone.o builtin/fetch-pack.o transport.o: fetch-pack.h |
| 1775 | builtin/grep.o: thread-utils.h |
| 1776 | builtin/send-pack.o transport.o: send-pack.h |
| 1777 | builtin/log.o builtin/shortlog.o: shortlog.h |
| 1778 | builtin/prune.o builtin/reflog.o reachable.o: reachable.h |
| 1779 | builtin/commit.o builtin/revert.o wt-status.o: wt-status.h |
| 1780 | builtin/tar-tree.o archive-tar.o: tar.h |
| 1781 | builtin/pack-objects.o: thread-utils.h |
Jonathan Nieder | beeb456 | 2010-01-26 09:49:33 -0600 | [diff] [blame] | 1782 | http-fetch.o http-walker.o remote-curl.o transport.o walker.o: walker.h |
| 1783 | http.o http-walker.o http-push.o remote-curl.o: http.h |
| 1784 | |
Jonathan Nieder | beeb456 | 2010-01-26 09:49:33 -0600 | [diff] [blame] | 1785 | xdiff-interface.o $(XDIFF_OBJS): \ |
| 1786 | xdiff/xinclude.h xdiff/xmacros.h xdiff/xdiff.h xdiff/xtypes.h \ |
| 1787 | xdiff/xutils.h xdiff/xprepare.h xdiff/xdiffi.h xdiff/xemit.h |
Jonathan Nieder | dfea575 | 2010-01-26 09:52:49 -0600 | [diff] [blame] | 1788 | endif |
Junio C Hamano | 7a59013 | 2005-08-06 13:10:43 -0700 | [diff] [blame] | 1789 | |
Jonathan Nieder | a673cfe | 2010-03-19 22:20:12 -0500 | [diff] [blame] | 1790 | exec_cmd.s exec_cmd.o: EXTRA_CPPFLAGS = \ |
Jonathan Nieder | 373a5ed | 2010-01-06 02:05:04 -0600 | [diff] [blame] | 1791 | '-DGIT_EXEC_PATH="$(gitexecdir_SQ)"' \ |
| 1792 | '-DBINDIR="$(bindir_relative_SQ)"' \ |
| 1793 | '-DPREFIX="$(prefix_SQ)"' |
Steffen Prohaska | 026fa0d | 2009-01-18 13:00:09 +0100 | [diff] [blame] | 1794 | |
Jonathan Nieder | a673cfe | 2010-03-19 22:20:12 -0500 | [diff] [blame] | 1795 | builtin/init-db.s builtin/init-db.o: EXTRA_CPPFLAGS = \ |
Jonathan Nieder | 373a5ed | 2010-01-06 02:05:04 -0600 | [diff] [blame] | 1796 | -DDEFAULT_GIT_TEMPLATE_DIR='"$(template_dir_SQ)"' |
Michal Ostrowski | 77cb17e | 2006-01-10 21:12:17 -0500 | [diff] [blame] | 1797 | |
Jonathan Nieder | a673cfe | 2010-03-19 22:20:12 -0500 | [diff] [blame] | 1798 | config.s config.o: EXTRA_CPPFLAGS = -DETC_GITCONFIG='"$(ETC_GITCONFIG_SQ)"' |
Johannes Sixt | 506b17b | 2007-11-13 21:05:05 +0100 | [diff] [blame] | 1799 | |
Jonathan Nieder | a673cfe | 2010-03-19 22:20:12 -0500 | [diff] [blame] | 1800 | http.s http.o: EXTRA_CPPFLAGS = -DGIT_USER_AGENT='"git/$(GIT_VERSION)"' |
Nick Hengeveld | 20fc9bc | 2006-04-04 10:11:29 -0700 | [diff] [blame] | 1801 | |
Nick Hengeveld | 8d9fbe5 | 2006-04-04 05:33:18 -0700 | [diff] [blame] | 1802 | ifdef NO_EXPAT |
Jonathan Nieder | a673cfe | 2010-03-19 22:20:12 -0500 | [diff] [blame] | 1803 | http-walker.s http-walker.o: EXTRA_CPPFLAGS = -DNO_EXPAT |
Nick Hengeveld | 8d9fbe5 | 2006-04-04 05:33:18 -0700 | [diff] [blame] | 1804 | endif |
| 1805 | |
Junio C Hamano | 8eef8e0 | 2006-03-31 16:23:46 -0800 | [diff] [blame] | 1806 | git-%$X: %.o $(GITLIBS) |
Shawn O. Pearce | 74f2b2a | 2007-03-06 01:35:01 -0500 | [diff] [blame] | 1807 | $(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) $(LIBS) |
Daniel Barkalow | 6eb7ed5 | 2005-04-23 18:47:23 -0700 | [diff] [blame] | 1808 | |
Robert Shearman | 684ec6c | 2008-07-09 22:29:00 +0100 | [diff] [blame] | 1809 | git-imap-send$X: imap-send.o $(GITLIBS) |
| 1810 | $(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) \ |
| 1811 | $(LIBS) $(OPENSSL_LINK) $(OPENSSL_LIBSSL) |
Mike McCormack | f2561fd | 2006-03-10 14:32:50 +0900 | [diff] [blame] | 1812 | |
Mike Ralphson | ae209bd | 2009-08-06 14:14:45 +0100 | [diff] [blame] | 1813 | git-http-fetch$X: revision.o http.o http-walker.o http-fetch.o $(GITLIBS) |
Linus Torvalds | 1088261 | 2009-08-05 01:01:59 -0400 | [diff] [blame] | 1814 | $(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) \ |
Jeff King | 17fd9f5 | 2009-08-07 00:21:33 -0400 | [diff] [blame] | 1815 | $(LIBS) $(CURL_LIBCURL) |
Junio C Hamano | 8fced61 | 2006-07-03 00:53:13 -0700 | [diff] [blame] | 1816 | git-http-push$X: revision.o http.o http-push.o $(GITLIBS) |
Shawn O. Pearce | 74f2b2a | 2007-03-06 01:35:01 -0500 | [diff] [blame] | 1817 | $(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) \ |
Johannes Schindelin | 39c015c | 2006-02-18 12:40:22 +0100 | [diff] [blame] | 1818 | $(LIBS) $(CURL_LIBCURL) $(EXPAT_LIBEXPAT) |
| 1819 | |
Ilari Liusvaara | 28ca0c9 | 2009-12-09 17:26:34 +0200 | [diff] [blame] | 1820 | $(REMOTE_CURL_ALIASES): $(REMOTE_CURL_PRIMARY) |
| 1821 | $(QUIET_LNCP)$(RM) $@ && \ |
| 1822 | ln $< $@ 2>/dev/null || \ |
| 1823 | ln -s $< $@ 2>/dev/null || \ |
| 1824 | cp $< $@ |
| 1825 | |
| 1826 | $(REMOTE_CURL_PRIMARY): remote-curl.o http.o http-walker.o $(GITLIBS) |
Daniel Barkalow | a2d725b | 2009-08-05 01:01:56 -0400 | [diff] [blame] | 1827 | $(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) \ |
| 1828 | $(LIBS) $(CURL_LIBCURL) $(EXPAT_LIBEXPAT) |
| 1829 | |
Petr Baudis | 28818ff | 2005-07-29 17:50:24 +0200 | [diff] [blame] | 1830 | $(LIB_FILE): $(LIB_OBJS) |
Emil Medve | 4cb08df | 2007-07-14 12:51:44 -0500 | [diff] [blame] | 1831 | $(QUIET_AR)$(RM) $@ && $(AR) rcs $@ $(LIB_OBJS) |
Petr Baudis | 28818ff | 2005-07-29 17:50:24 +0200 | [diff] [blame] | 1832 | |
Linus Torvalds | 3443546 | 2006-03-24 20:13:22 -0800 | [diff] [blame] | 1833 | $(XDIFF_LIB): $(XDIFF_OBJS) |
Emil Medve | 4cb08df | 2007-07-14 12:51:44 -0500 | [diff] [blame] | 1834 | $(QUIET_AR)$(RM) $@ && $(AR) rcs $@ $(XDIFF_OBJS) |
Linus Torvalds | 3443546 | 2006-03-24 20:13:22 -0800 | [diff] [blame] | 1835 | |
| 1836 | |
Petr Baudis | 28818ff | 2005-07-29 17:50:24 +0200 | [diff] [blame] | 1837 | doc: |
| 1838 | $(MAKE) -C Documentation all |
| 1839 | |
Michael J Gruber | 414851a | 2008-09-10 10:19:34 +0200 | [diff] [blame] | 1840 | man: |
| 1841 | $(MAKE) -C Documentation man |
| 1842 | |
| 1843 | html: |
| 1844 | $(MAKE) -C Documentation html |
| 1845 | |
David Kastrup | 4739809 | 2007-08-06 12:22:57 +0200 | [diff] [blame] | 1846 | info: |
| 1847 | $(MAKE) -C Documentation info |
| 1848 | |
Miklos Vajna | a325a1a | 2008-12-10 23:44:50 +0100 | [diff] [blame] | 1849 | pdf: |
| 1850 | $(MAKE) -C Documentation pdf |
| 1851 | |
Fredrik Kuivinen | f81e7c6 | 2006-03-18 11:07:12 +0100 | [diff] [blame] | 1852 | TAGS: |
Emil Medve | 4cb08df | 2007-07-14 12:51:44 -0500 | [diff] [blame] | 1853 | $(RM) TAGS |
David Kastrup | 89b2f19 | 2007-07-29 15:23:28 -0700 | [diff] [blame] | 1854 | $(FIND) . -name '*.[hcS]' -print | xargs etags -a |
Fredrik Kuivinen | f81e7c6 | 2006-03-18 11:07:12 +0100 | [diff] [blame] | 1855 | |
| 1856 | tags: |
Emil Medve | 4cb08df | 2007-07-14 12:51:44 -0500 | [diff] [blame] | 1857 | $(RM) tags |
David Kastrup | 89b2f19 | 2007-07-29 15:23:28 -0700 | [diff] [blame] | 1858 | $(FIND) . -name '*.[hcS]' -print | xargs ctags -a |
Petr Baudis | 28818ff | 2005-07-29 17:50:24 +0200 | [diff] [blame] | 1859 | |
Kristof Provost | a2a9150 | 2007-10-06 16:24:42 +0200 | [diff] [blame] | 1860 | cscope: |
| 1861 | $(RM) cscope* |
| 1862 | $(FIND) . -name '*.[hcS]' -print | xargs cscope -b |
| 1863 | |
Yakov Lerner | ca3bcab | 2006-06-15 01:36:00 +0300 | [diff] [blame] | 1864 | ### Detect prefix changes |
Junio C Hamano | 7cdbff1 | 2006-11-20 00:49:31 -0800 | [diff] [blame] | 1865 | TRACK_CFLAGS = $(subst ','\'',$(ALL_CFLAGS)):\ |
Yakov Lerner | ca3bcab | 2006-06-15 01:36:00 +0300 | [diff] [blame] | 1866 | $(bindir_SQ):$(gitexecdir_SQ):$(template_dir_SQ):$(prefix_SQ) |
| 1867 | |
Jonathan Nieder | 13fca9f | 2010-01-06 02:06:58 -0600 | [diff] [blame] | 1868 | GIT-CFLAGS: FORCE |
Yakov Lerner | ca3bcab | 2006-06-15 01:36:00 +0300 | [diff] [blame] | 1869 | @FLAGS='$(TRACK_CFLAGS)'; \ |
| 1870 | if test x"$$FLAGS" != x"`cat GIT-CFLAGS 2>/dev/null`" ; then \ |
| 1871 | echo 1>&2 " * new build flags or prefix"; \ |
| 1872 | echo "$$FLAGS" >GIT-CFLAGS; \ |
| 1873 | fi |
| 1874 | |
Junio C Hamano | bfce508 | 2008-07-25 12:35:10 -0700 | [diff] [blame] | 1875 | # We need to apply sq twice, once to protect from the shell |
| 1876 | # that runs GIT-BUILD-OPTIONS, and then again to protect it |
| 1877 | # and the first level quoting from the shell that runs "echo". |
Jonathan Nieder | 13fca9f | 2010-01-06 02:06:58 -0600 | [diff] [blame] | 1878 | GIT-BUILD-OPTIONS: FORCE |
Junio C Hamano | bfce508 | 2008-07-25 12:35:10 -0700 | [diff] [blame] | 1879 | @echo SHELL_PATH=\''$(subst ','\'',$(SHELL_PATH_SQ))'\' >$@ |
Philippe Bruhat (BooK) | be38ca3 | 2009-11-17 09:42:39 +0100 | [diff] [blame] | 1880 | @echo PERL_PATH=\''$(subst ','\'',$(PERL_PATH_SQ))'\' >>$@ |
Gary V. Vaughan | d1b1a91 | 2010-05-14 09:31:36 +0000 | [diff] [blame^] | 1881 | @echo DIFF=\''$(subst ','\'',$(subst ','\'',$(DIFF)))'\' >>$@ |
Junio C Hamano | bfce508 | 2008-07-25 12:35:10 -0700 | [diff] [blame] | 1882 | @echo TAR=\''$(subst ','\'',$(subst ','\'',$(TAR)))'\' >>$@ |
Jeff King | 119c8ee | 2009-02-25 03:32:09 -0500 | [diff] [blame] | 1883 | @echo NO_CURL=\''$(subst ','\'',$(subst ','\'',$(NO_CURL)))'\' >>$@ |
Jeff King | 1b19ccd | 2009-04-03 15:33:59 -0400 | [diff] [blame] | 1884 | @echo NO_PERL=\''$(subst ','\'',$(subst ','\'',$(NO_PERL)))'\' >>$@ |
Jeff King | ac10a85 | 2009-12-07 00:32:50 -0500 | [diff] [blame] | 1885 | @echo NO_PYTHON=\''$(subst ','\'',$(subst ','\'',$(NO_PYTHON)))'\' >>$@ |
Jeff King | 7cf7f54 | 2008-02-24 14:40:45 -0500 | [diff] [blame] | 1886 | |
Eygene Ryabinkin | 6bdb18a | 2007-03-28 04:22:02 -0700 | [diff] [blame] | 1887 | ### Detect Tck/Tk interpreter path changes |
| 1888 | ifndef NO_TCLTK |
| 1889 | TRACK_VARS = $(subst ','\'',-DTCLTK_PATH='$(TCLTK_PATH_SQ)') |
| 1890 | |
Jonathan Nieder | 13fca9f | 2010-01-06 02:06:58 -0600 | [diff] [blame] | 1891 | GIT-GUI-VARS: FORCE |
Eygene Ryabinkin | 6bdb18a | 2007-03-28 04:22:02 -0700 | [diff] [blame] | 1892 | @VARS='$(TRACK_VARS)'; \ |
| 1893 | if test x"$$VARS" != x"`cat $@ 2>/dev/null`" ; then \ |
| 1894 | echo 1>&2 " * new Tcl/Tk interpreter location"; \ |
| 1895 | echo "$$VARS" >$@; \ |
| 1896 | fi |
Eygene Ryabinkin | 6bdb18a | 2007-03-28 04:22:02 -0700 | [diff] [blame] | 1897 | endif |
| 1898 | |
Matthew Ogilvie | ea92519 | 2009-12-02 22:14:05 -0700 | [diff] [blame] | 1899 | test_bindir_programs := $(patsubst %,bin-wrappers/%,$(BINDIR_PROGRAMS_NEED_X) $(BINDIR_PROGRAMS_NO_X) $(TEST_PROGRAMS_NEED_X)) |
| 1900 | |
| 1901 | all:: $(TEST_PROGRAMS) $(test_bindir_programs) |
| 1902 | |
| 1903 | bin-wrappers/%: wrap-for-bin.sh |
| 1904 | @mkdir -p bin-wrappers |
| 1905 | $(QUIET_GEN)sed -e '1s|#!.*/sh|#!$(SHELL_PATH_SQ)|' \ |
| 1906 | -e 's|@@BUILD_DIR@@|$(shell pwd)|' \ |
| 1907 | -e 's|@@PROG@@|$(@F)|' < $< > $@ && \ |
| 1908 | chmod +x $@ |
Junio C Hamano | 96651ef | 2007-04-28 15:32:49 -0700 | [diff] [blame] | 1909 | |
Johannes Schindelin | abb7c7b | 2006-02-18 13:01:18 +0100 | [diff] [blame] | 1910 | # GNU make supports exporting all variables by "export" without parameters. |
| 1911 | # However, the environment gets quite big, and some programs have problems |
| 1912 | # with that. |
| 1913 | |
Johannes Schindelin | 140245b | 2006-07-07 13:26:31 +0200 | [diff] [blame] | 1914 | export NO_SVN_TESTS |
Johannes Schindelin | abb7c7b | 2006-02-18 13:01:18 +0100 | [diff] [blame] | 1915 | |
Jonathan Nieder | 225f78c | 2010-01-26 10:08:44 -0600 | [diff] [blame] | 1916 | ### Testing rules |
| 1917 | |
Junio C Hamano | 96651ef | 2007-04-28 15:32:49 -0700 | [diff] [blame] | 1918 | test: all |
Petr Baudis | 28818ff | 2005-07-29 17:50:24 +0200 | [diff] [blame] | 1919 | $(MAKE) -C t/ all |
| 1920 | |
René Scharfe | b4285c7 | 2009-01-17 16:50:13 +0100 | [diff] [blame] | 1921 | test-ctype$X: ctype.o |
| 1922 | |
Julian Phillips | 5c5ba73 | 2007-05-31 00:18:24 +0100 | [diff] [blame] | 1923 | test-date$X: date.o ctype.o |
Petr Baudis | 28818ff | 2005-07-29 17:50:24 +0200 | [diff] [blame] | 1924 | |
Julian Phillips | 5c5ba73 | 2007-05-31 00:18:24 +0100 | [diff] [blame] | 1925 | test-delta$X: diff-delta.o patch-delta.o |
Petr Baudis | 28818ff | 2005-07-29 17:50:24 +0200 | [diff] [blame] | 1926 | |
Alex Riesen | 481424e | 2007-11-14 00:16:36 +0100 | [diff] [blame] | 1927 | test-parse-options$X: parse-options.o |
| 1928 | |
Jonathan Nieder | daa99a9 | 2010-01-26 09:45:54 -0600 | [diff] [blame] | 1929 | .PRECIOUS: $(TEST_OBJS) |
Junio C Hamano | fa8fe28 | 2007-08-30 19:14:31 -0700 | [diff] [blame] | 1930 | |
Julian Phillips | 5c5ba73 | 2007-05-31 00:18:24 +0100 | [diff] [blame] | 1931 | test-%$X: test-%.o $(GITLIBS) |
| 1932 | $(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) $(LIBS) |
Nicolas Pitre | 2dca1af | 2007-04-11 13:59:51 -0400 | [diff] [blame] | 1933 | |
Junio C Hamano | b65bc21 | 2006-06-24 00:59:49 -0700 | [diff] [blame] | 1934 | check-sha1:: test-sha1$X |
| 1935 | ./test-sha1.sh |
| 1936 | |
René Scharfe | 7c4c9f4 | 2007-01-04 19:33:48 +0100 | [diff] [blame] | 1937 | check: common-cmds.h |
Junio C Hamano | 912f998 | 2008-11-11 13:12:17 -0800 | [diff] [blame] | 1938 | if sparse; \ |
| 1939 | then \ |
| 1940 | for i in *.c; \ |
| 1941 | do \ |
| 1942 | sparse $(ALL_CFLAGS) $(SPARSE_FLAGS) $$i || exit; \ |
| 1943 | done; \ |
| 1944 | else \ |
| 1945 | echo 2>&1 "Did you mean 'make test'?"; \ |
| 1946 | exit 1; \ |
| 1947 | fi |
Petr Baudis | 28818ff | 2005-07-29 17:50:24 +0200 | [diff] [blame] | 1948 | |
Linus Torvalds | 36e5e70 | 2007-06-30 11:49:17 -0700 | [diff] [blame] | 1949 | remove-dashes: |
Miklos Vajna | b4f02d3 | 2008-07-11 02:12:06 +0200 | [diff] [blame] | 1950 | ./fixup-builtins $(BUILT_INS) $(PROGRAMS) $(SCRIPTS) |
Petr Baudis | 28818ff | 2005-07-29 17:50:24 +0200 | [diff] [blame] | 1951 | |
| 1952 | ### Installation rules |
| 1953 | |
Junio C Hamano | 0c0ead7 | 2009-02-05 00:04:17 -0800 | [diff] [blame] | 1954 | ifneq ($(filter /%,$(firstword $(template_dir))),) |
Johannes Sixt | 0b50b86 | 2008-01-01 22:15:21 +0100 | [diff] [blame] | 1955 | template_instdir = $(template_dir) |
Steffen Prohaska | 026fa0d | 2009-01-18 13:00:09 +0100 | [diff] [blame] | 1956 | else |
| 1957 | template_instdir = $(prefix)/$(template_dir) |
Johannes Sixt | 0b50b86 | 2008-01-01 22:15:21 +0100 | [diff] [blame] | 1958 | endif |
| 1959 | export template_instdir |
| 1960 | |
Junio C Hamano | 0c0ead7 | 2009-02-05 00:04:17 -0800 | [diff] [blame] | 1961 | ifneq ($(filter /%,$(firstword $(gitexecdir))),) |
Johannes Sixt | 49fa65a | 2008-07-23 21:12:18 +0200 | [diff] [blame] | 1962 | gitexec_instdir = $(gitexecdir) |
Steffen Prohaska | 026fa0d | 2009-01-18 13:00:09 +0100 | [diff] [blame] | 1963 | else |
| 1964 | gitexec_instdir = $(prefix)/$(gitexecdir) |
Johannes Sixt | 49fa65a | 2008-07-23 21:12:18 +0200 | [diff] [blame] | 1965 | endif |
| 1966 | gitexec_instdir_SQ = $(subst ','\'',$(gitexec_instdir)) |
| 1967 | export gitexec_instdir |
| 1968 | |
Matthew Ogilvie | ea92519 | 2009-12-02 22:14:05 -0700 | [diff] [blame] | 1969 | install_bindir_programs := $(patsubst %,%$X,$(BINDIR_PROGRAMS_NEED_X)) $(BINDIR_PROGRAMS_NO_X) |
| 1970 | |
Andreas Ericsson | d6ebd25 | 2005-11-22 00:44:15 +0100 | [diff] [blame] | 1971 | install: all |
Robert Schiele | 4165076 | 2007-12-01 18:05:40 +0100 | [diff] [blame] | 1972 | $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(bindir_SQ)' |
Johannes Sixt | 49fa65a | 2008-07-23 21:12:18 +0200 | [diff] [blame] | 1973 | $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(gitexec_instdir_SQ)' |
| 1974 | $(INSTALL) $(ALL_PROGRAMS) '$(DESTDIR_SQ)$(gitexec_instdir_SQ)' |
Jonathan Nieder | 46bac90 | 2010-01-31 11:46:53 -0800 | [diff] [blame] | 1975 | $(INSTALL) -m 644 $(SCRIPT_LIB) '$(DESTDIR_SQ)$(gitexec_instdir_SQ)' |
Matthew Ogilvie | ea92519 | 2009-12-02 22:14:05 -0700 | [diff] [blame] | 1976 | $(INSTALL) $(install_bindir_programs) '$(DESTDIR_SQ)$(bindir_SQ)' |
Ramsay Allan Jones | 7ffe709 | 2006-07-29 17:25:03 +0100 | [diff] [blame] | 1977 | $(MAKE) -C templates DESTDIR='$(DESTDIR_SQ)' install |
Junio C Hamano | 5be3b17 | 2009-04-22 22:42:28 -0700 | [diff] [blame] | 1978 | ifndef NO_PERL |
Gerrit Pape | 28072a5 | 2007-12-10 09:31:02 +0000 | [diff] [blame] | 1979 | $(MAKE) -C perl prefix='$(prefix_SQ)' DESTDIR='$(DESTDIR_SQ)' install |
Junio C Hamano | 5be3b17 | 2009-04-22 22:42:28 -0700 | [diff] [blame] | 1980 | endif |
Sverre Rabbelier | 2fe40b6 | 2009-11-18 02:42:32 +0100 | [diff] [blame] | 1981 | ifndef NO_PYTHON |
| 1982 | $(MAKE) -C git_remote_helpers prefix='$(prefix_SQ)' DESTDIR='$(DESTDIR_SQ)' install |
| 1983 | endif |
Eygene Ryabinkin | 3cfaf11 | 2007-03-28 04:00:23 -0700 | [diff] [blame] | 1984 | ifndef NO_TCLTK |
Junio C Hamano | 62ba514 | 2007-11-17 10:51:16 -0800 | [diff] [blame] | 1985 | $(MAKE) -C gitk-git install |
Johannes Sixt | 49fa65a | 2008-07-23 21:12:18 +0200 | [diff] [blame] | 1986 | $(MAKE) -C git-gui gitexecdir='$(gitexec_instdir_SQ)' install |
Eygene Ryabinkin | 3cfaf11 | 2007-03-28 04:00:23 -0700 | [diff] [blame] | 1987 | endif |
Junio C Hamano | 6fc301b | 2007-01-10 12:24:54 -0800 | [diff] [blame] | 1988 | ifneq (,$X) |
Eric Blake | d4b1902 | 2009-04-28 06:28:31 -0600 | [diff] [blame] | 1989 | $(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';) |
Junio C Hamano | 6fc301b | 2007-01-10 12:24:54 -0800 | [diff] [blame] | 1990 | endif |
Ilari Liusvaara | 28ca0c9 | 2009-12-09 17:26:34 +0200 | [diff] [blame] | 1991 | |
Johannes Sixt | 46beb55 | 2008-07-21 21:19:51 +0200 | [diff] [blame] | 1992 | bindir=$$(cd '$(DESTDIR_SQ)$(bindir_SQ)' && pwd) && \ |
Johannes Sixt | 49fa65a | 2008-07-23 21:12:18 +0200 | [diff] [blame] | 1993 | execdir=$$(cd '$(DESTDIR_SQ)$(gitexec_instdir_SQ)' && pwd) && \ |
Junio C Hamano | 6edd149 | 2009-07-10 20:17:33 -0700 | [diff] [blame] | 1994 | { test "$$bindir/" = "$$execdir/" || \ |
| 1995 | { $(RM) "$$execdir/git$X" && \ |
Johannes Schindelin | 3426e34 | 2009-05-11 13:02:18 +0200 | [diff] [blame] | 1996 | test -z "$(NO_CROSS_DIRECTORY_HARDLINKS)" && \ |
Jeff King | 4ecbc17 | 2009-07-09 02:37:35 -0400 | [diff] [blame] | 1997 | ln "$$bindir/git$X" "$$execdir/git$X" 2>/dev/null || \ |
Junio C Hamano | 6edd149 | 2009-07-10 20:17:33 -0700 | [diff] [blame] | 1998 | cp "$$bindir/git$X" "$$execdir/git$X"; } ; } && \ |
Jeff King | 4ecbc17 | 2009-07-09 02:37:35 -0400 | [diff] [blame] | 1999 | { for p in $(BUILT_INS); do \ |
Brandon Casey | b56c79c | 2009-01-19 19:44:03 -0600 | [diff] [blame] | 2000 | $(RM) "$$execdir/$$p" && \ |
Jeff King | 4ecbc17 | 2009-07-09 02:37:35 -0400 | [diff] [blame] | 2001 | ln "$$execdir/git$X" "$$execdir/$$p" 2>/dev/null || \ |
| 2002 | ln -s "git$X" "$$execdir/$$p" 2>/dev/null || \ |
| 2003 | cp "$$execdir/git$X" "$$execdir/$$p" || exit; \ |
Mark Drago | fe4a9c3 | 2009-04-26 22:36:48 -0400 | [diff] [blame] | 2004 | done; } && \ |
Ilari Liusvaara | 28ca0c9 | 2009-12-09 17:26:34 +0200 | [diff] [blame] | 2005 | { for p in $(REMOTE_CURL_ALIASES); do \ |
| 2006 | $(RM) "$$execdir/$$p" && \ |
| 2007 | ln "$$execdir/git-remote-http$X" "$$execdir/$$p" 2>/dev/null || \ |
| 2008 | ln -s "git-remote-http$X" "$$execdir/$$p" 2>/dev/null || \ |
| 2009 | cp "$$execdir/git-remote-http$X" "$$execdir/$$p" || exit; \ |
| 2010 | done; } && \ |
Johannes Sixt | 7b4b59a | 2008-07-21 21:19:58 +0200 | [diff] [blame] | 2011 | ./check_bindir "z$$bindir" "z$$execdir" "$$bindir/git-add$X" |
Petr Baudis | 28818ff | 2005-07-29 17:50:24 +0200 | [diff] [blame] | 2012 | |
| 2013 | install-doc: |
| 2014 | $(MAKE) -C Documentation install |
| 2015 | |
Markus Heidelberg | b1a46b7 | 2008-11-02 18:53:03 +0100 | [diff] [blame] | 2016 | install-man: |
| 2017 | $(MAKE) -C Documentation install-man |
| 2018 | |
Teemu Likonen | ae081f3 | 2008-06-10 11:34:25 +0300 | [diff] [blame] | 2019 | install-html: |
| 2020 | $(MAKE) -C Documentation install-html |
| 2021 | |
David Kastrup | 4739809 | 2007-08-06 12:22:57 +0200 | [diff] [blame] | 2022 | install-info: |
| 2023 | $(MAKE) -C Documentation install-info |
| 2024 | |
Miklos Vajna | a325a1a | 2008-12-10 23:44:50 +0100 | [diff] [blame] | 2025 | install-pdf: |
| 2026 | $(MAKE) -C Documentation install-pdf |
| 2027 | |
Eric Wong | 6538d1e | 2006-12-23 08:26:09 -0800 | [diff] [blame] | 2028 | quick-install-doc: |
| 2029 | $(MAKE) -C Documentation quick-install |
Petr Baudis | 28818ff | 2005-07-29 17:50:24 +0200 | [diff] [blame] | 2030 | |
Markus Heidelberg | b1a46b7 | 2008-11-02 18:53:03 +0100 | [diff] [blame] | 2031 | quick-install-man: |
| 2032 | $(MAKE) -C Documentation quick-install-man |
| 2033 | |
Michael J Gruber | 6fe570d | 2008-09-09 22:44:17 +0200 | [diff] [blame] | 2034 | quick-install-html: |
| 2035 | $(MAKE) -C Documentation quick-install-html |
| 2036 | |
Petr Baudis | 28818ff | 2005-07-29 17:50:24 +0200 | [diff] [blame] | 2037 | |
| 2038 | |
| 2039 | ### Maintainer's dist rules |
| 2040 | |
Junio C Hamano | 9b88fce | 2005-12-27 14:40:17 -0800 | [diff] [blame] | 2041 | git.spec: git.spec.in |
Jim Meyering | fc36f6a | 2006-05-25 18:52:01 +0200 | [diff] [blame] | 2042 | sed -e 's/@@VERSION@@/$(GIT_VERSION)/g' < $< > $@+ |
| 2043 | mv $@+ $@ |
Chris Wright | a9db297 | 2005-07-07 13:09:50 -0700 | [diff] [blame] | 2044 | |
Junio C Hamano | 27dedf0 | 2005-11-16 21:32:44 -0800 | [diff] [blame] | 2045 | GIT_TARNAME=git-$(GIT_VERSION) |
Shawn O. Pearce | 6c0f869 | 2008-02-24 00:38:04 -0500 | [diff] [blame] | 2046 | dist: git.spec git-archive$(X) configure |
Junio C Hamano | 9ccb64c | 2006-10-05 02:26:12 -0700 | [diff] [blame] | 2047 | ./git-archive --format=tar \ |
| 2048 | --prefix=$(GIT_TARNAME)/ HEAD^{tree} > $(GIT_TARNAME).tar |
Chris Wright | a9db297 | 2005-07-07 13:09:50 -0700 | [diff] [blame] | 2049 | @mkdir -p $(GIT_TARNAME) |
Matthias Lederhofer | f58494b | 2007-06-18 23:30:36 +0200 | [diff] [blame] | 2050 | @cp git.spec configure $(GIT_TARNAME) |
H. Peter Anvin | 181129d | 2006-01-09 18:07:01 -0800 | [diff] [blame] | 2051 | @echo $(GIT_VERSION) > $(GIT_TARNAME)/version |
Shawn O. Pearce | d647c2e | 2007-02-12 18:20:34 -0500 | [diff] [blame] | 2052 | @$(MAKE) -C git-gui TARDIR=../$(GIT_TARNAME)/git-gui dist-version |
H. Peter Anvin | 181129d | 2006-01-09 18:07:01 -0800 | [diff] [blame] | 2053 | $(TAR) rf $(GIT_TARNAME).tar \ |
Shawn O. Pearce | d647c2e | 2007-02-12 18:20:34 -0500 | [diff] [blame] | 2054 | $(GIT_TARNAME)/git.spec \ |
Matthias Lederhofer | f58494b | 2007-06-18 23:30:36 +0200 | [diff] [blame] | 2055 | $(GIT_TARNAME)/configure \ |
Shawn O. Pearce | d647c2e | 2007-02-12 18:20:34 -0500 | [diff] [blame] | 2056 | $(GIT_TARNAME)/version \ |
Shawn O. Pearce | 115f0fe | 2007-03-12 13:40:31 -0400 | [diff] [blame] | 2057 | $(GIT_TARNAME)/git-gui/version |
Emil Medve | 4cb08df | 2007-07-14 12:51:44 -0500 | [diff] [blame] | 2058 | @$(RM) -r $(GIT_TARNAME) |
Eric W. Biederman | 9dce3c0 | 2005-07-14 19:20:50 -0600 | [diff] [blame] | 2059 | gzip -f -9 $(GIT_TARNAME).tar |
Chris Wright | a9db297 | 2005-07-07 13:09:50 -0700 | [diff] [blame] | 2060 | |
| 2061 | rpm: dist |
Todd Zullinger | a96e9c2 | 2009-11-11 16:59:52 -0500 | [diff] [blame] | 2062 | $(RPMBUILD) \ |
| 2063 | --define "_source_filedigest_algorithm md5" \ |
| 2064 | --define "_binary_filedigest_algorithm md5" \ |
| 2065 | -ta $(GIT_TARNAME).tar.gz |
Chris Wright | a9db297 | 2005-07-07 13:09:50 -0700 | [diff] [blame] | 2066 | |
Tilman Sauerbeck | 52db049 | 2006-05-18 12:57:04 +0200 | [diff] [blame] | 2067 | htmldocs = git-htmldocs-$(GIT_VERSION) |
| 2068 | manpages = git-manpages-$(GIT_VERSION) |
| 2069 | dist-doc: |
Emil Medve | 4cb08df | 2007-07-14 12:51:44 -0500 | [diff] [blame] | 2070 | $(RM) -r .doc-tmp-dir |
Tilman Sauerbeck | 52db049 | 2006-05-18 12:57:04 +0200 | [diff] [blame] | 2071 | mkdir .doc-tmp-dir |
| 2072 | $(MAKE) -C Documentation WEBDOC_DEST=../.doc-tmp-dir install-webdoc |
| 2073 | cd .doc-tmp-dir && $(TAR) cf ../$(htmldocs).tar . |
| 2074 | gzip -n -9 -f $(htmldocs).tar |
| 2075 | : |
Emil Medve | 4cb08df | 2007-07-14 12:51:44 -0500 | [diff] [blame] | 2076 | $(RM) -r .doc-tmp-dir |
Junio C Hamano | 4392da4 | 2007-04-19 20:47:04 -0700 | [diff] [blame] | 2077 | mkdir -p .doc-tmp-dir/man1 .doc-tmp-dir/man5 .doc-tmp-dir/man7 |
Martin Waitz | c536032 | 2006-05-25 14:37:46 +0200 | [diff] [blame] | 2078 | $(MAKE) -C Documentation DESTDIR=./ \ |
Jakub Narebski | 7b8cf0c | 2006-06-29 23:26:54 +0200 | [diff] [blame] | 2079 | man1dir=../.doc-tmp-dir/man1 \ |
Junio C Hamano | 4392da4 | 2007-04-19 20:47:04 -0700 | [diff] [blame] | 2080 | man5dir=../.doc-tmp-dir/man5 \ |
Jakub Narebski | 7b8cf0c | 2006-06-29 23:26:54 +0200 | [diff] [blame] | 2081 | man7dir=../.doc-tmp-dir/man7 \ |
Tilman Sauerbeck | 52db049 | 2006-05-18 12:57:04 +0200 | [diff] [blame] | 2082 | install |
| 2083 | cd .doc-tmp-dir && $(TAR) cf ../$(manpages).tar . |
| 2084 | gzip -n -9 -f $(manpages).tar |
Emil Medve | 4cb08df | 2007-07-14 12:51:44 -0500 | [diff] [blame] | 2085 | $(RM) -r .doc-tmp-dir |
Tilman Sauerbeck | 52db049 | 2006-05-18 12:57:04 +0200 | [diff] [blame] | 2086 | |
Petr Baudis | 28818ff | 2005-07-29 17:50:24 +0200 | [diff] [blame] | 2087 | ### Cleaning rules |
Eric W. Biederman | 87a81c8 | 2005-07-14 19:21:57 -0600 | [diff] [blame] | 2088 | |
Mathias Megyei | 922aa80 | 2007-10-04 23:49:19 +0200 | [diff] [blame] | 2089 | distclean: clean |
| 2090 | $(RM) configure |
| 2091 | |
Linus Torvalds | e83c516 | 2005-04-07 15:13:13 -0700 | [diff] [blame] | 2092 | clean: |
Jonathan Nieder | 7fc9d15 | 2009-11-28 05:41:28 -0600 | [diff] [blame] | 2093 | $(RM) *.o block-sha1/*.o ppc/*.o compat/*.o compat/*/*.o xdiff/*.o \ |
Linus Torvalds | 81b50f3 | 2010-02-22 08:42:18 -0800 | [diff] [blame] | 2094 | builtin/*.o $(LIB_FILE) $(XDIFF_LIB) |
Jonathan Nieder | 46bac90 | 2010-01-31 11:46:53 -0800 | [diff] [blame] | 2095 | $(RM) $(ALL_PROGRAMS) $(SCRIPT_LIB) $(BUILT_INS) git$X |
Emil Medve | 4cb08df | 2007-07-14 12:51:44 -0500 | [diff] [blame] | 2096 | $(RM) $(TEST_PROGRAMS) |
Matthew Ogilvie | ea92519 | 2009-12-02 22:14:05 -0700 | [diff] [blame] | 2097 | $(RM) -r bin-wrappers |
Jonathan Nieder | dfea575 | 2010-01-26 09:52:49 -0600 | [diff] [blame] | 2098 | $(RM) -r $(dep_dirs) |
Kristof Provost | a2a9150 | 2007-10-06 16:24:42 +0200 | [diff] [blame] | 2099 | $(RM) *.spec *.pyc *.pyo */*.pyc */*.pyo common-cmds.h TAGS tags cscope* |
Emil Medve | 4cb08df | 2007-07-14 12:51:44 -0500 | [diff] [blame] | 2100 | $(RM) -r autom4te.cache |
Mathias Megyei | 922aa80 | 2007-10-04 23:49:19 +0200 | [diff] [blame] | 2101 | $(RM) config.log config.mak.autogen config.mak.append config.status config.cache |
Emil Medve | 4cb08df | 2007-07-14 12:51:44 -0500 | [diff] [blame] | 2102 | $(RM) -r $(GIT_TARNAME) .doc-tmp-dir |
| 2103 | $(RM) $(GIT_TARNAME).tar.gz git-core_$(GIT_VERSION)-*.tar.gz |
| 2104 | $(RM) $(htmldocs).tar.gz $(manpages).tar.gz |
Thomas Glanzmann | ca67f00 | 2005-05-22 20:27:28 +0200 | [diff] [blame] | 2105 | $(MAKE) -C Documentation/ clean |
Jeff King | 499c293 | 2009-04-03 15:32:20 -0400 | [diff] [blame] | 2106 | ifndef NO_PERL |
Mark Rada | 8830bf4 | 2010-04-02 20:33:55 -0400 | [diff] [blame] | 2107 | $(RM) gitweb/gitweb.cgi gitweb/gitweb.min.* |
Alex Riesen | f848718 | 2006-12-04 10:50:04 +0100 | [diff] [blame] | 2108 | $(MAKE) -C perl clean |
Jeff King | 499c293 | 2009-04-03 15:32:20 -0400 | [diff] [blame] | 2109 | endif |
Sverre Rabbelier | 2fe40b6 | 2009-11-18 02:42:32 +0100 | [diff] [blame] | 2110 | ifndef NO_PYTHON |
| 2111 | $(MAKE) -C git_remote_helpers clean |
| 2112 | endif |
Petr Baudis | b1edc53 | 2006-06-24 04:34:29 +0200 | [diff] [blame] | 2113 | $(MAKE) -C templates/ clean |
Junio C Hamano | 4b7581f | 2005-08-02 17:24:11 -0700 | [diff] [blame] | 2114 | $(MAKE) -C t/ clean |
Eygene Ryabinkin | 3cfaf11 | 2007-03-28 04:00:23 -0700 | [diff] [blame] | 2115 | ifndef NO_TCLTK |
Junio C Hamano | 62ba514 | 2007-11-17 10:51:16 -0800 | [diff] [blame] | 2116 | $(MAKE) -C gitk-git clean |
Eygene Ryabinkin | 3cfaf11 | 2007-03-28 04:00:23 -0700 | [diff] [blame] | 2117 | $(MAKE) -C git-gui clean |
| 2118 | endif |
Jeff King | 7cf7f54 | 2008-02-24 14:40:45 -0500 | [diff] [blame] | 2119 | $(RM) GIT-VERSION-FILE GIT-CFLAGS GIT-GUI-VARS GIT-BUILD-OPTIONS |
Junio C Hamano | 9b88fce | 2005-12-27 14:40:17 -0800 | [diff] [blame] | 2120 | |
Junio C Hamano | 4dc0002 | 2006-01-12 21:42:25 -0800 | [diff] [blame] | 2121 | .PHONY: all install clean strip |
Brandon Casey | 6dc4627 | 2008-08-07 14:06:26 -0500 | [diff] [blame] | 2122 | .PHONY: shell_compatibility_test please_set_SHELL_PATH_to_a_more_modern_shell |
Jonathan Nieder | 13fca9f | 2010-01-06 02:06:58 -0600 | [diff] [blame] | 2123 | .PHONY: FORCE TAGS tags cscope |
Junio C Hamano | d89056c | 2005-12-19 17:59:58 -0800 | [diff] [blame] | 2124 | |
Junio C Hamano | 8c989ec | 2006-04-13 00:17:19 -0700 | [diff] [blame] | 2125 | ### Check documentation |
| 2126 | # |
| 2127 | check-docs:: |
Jonathan Nieder | 46bac90 | 2010-01-31 11:46:53 -0800 | [diff] [blame] | 2128 | @(for v in $(ALL_PROGRAMS) $(SCRIPT_LIB) $(BUILT_INS) git gitk; \ |
Junio C Hamano | 8c989ec | 2006-04-13 00:17:19 -0700 | [diff] [blame] | 2129 | do \ |
| 2130 | case "$$v" in \ |
Junio C Hamano | 8c989ec | 2006-04-13 00:17:19 -0700 | [diff] [blame] | 2131 | git-merge-octopus | git-merge-ours | git-merge-recursive | \ |
Miklos Vajna | 51add76 | 2008-07-05 16:43:51 +0200 | [diff] [blame] | 2132 | git-merge-resolve | git-merge-subtree | \ |
Junio C Hamano | 5c66d0d | 2008-01-17 22:52:40 -0800 | [diff] [blame] | 2133 | git-fsck-objects | git-init-db | \ |
Junio C Hamano | c88cd03 | 2010-03-10 15:31:34 -0800 | [diff] [blame] | 2134 | git-remote-* | git-stage | \ |
Junio C Hamano | 5b4617c | 2007-12-14 22:02:57 -0800 | [diff] [blame] | 2135 | git-?*--?* ) continue ;; \ |
Junio C Hamano | 8c989ec | 2006-04-13 00:17:19 -0700 | [diff] [blame] | 2136 | esac ; \ |
| 2137 | test -f "Documentation/$$v.txt" || \ |
| 2138 | echo "no doc: $$v"; \ |
Junio C Hamano | 79d3066 | 2007-12-01 23:39:19 -0800 | [diff] [blame] | 2139 | sed -e '/^#/d' command-list.txt | \ |
Junio C Hamano | 4b02c52 | 2007-02-13 22:45:22 -0800 | [diff] [blame] | 2140 | grep -q "^$$v[ ]" || \ |
Junio C Hamano | 8c989ec | 2006-04-13 00:17:19 -0700 | [diff] [blame] | 2141 | case "$$v" in \ |
| 2142 | git) ;; \ |
| 2143 | *) echo "no link: $$v";; \ |
| 2144 | esac ; \ |
Junio C Hamano | 3f7ce64 | 2007-11-08 18:38:27 -0800 | [diff] [blame] | 2145 | done; \ |
| 2146 | ( \ |
Junio C Hamano | 79d3066 | 2007-12-01 23:39:19 -0800 | [diff] [blame] | 2147 | sed -e '/^#/d' \ |
Junio C Hamano | 3f7ce64 | 2007-11-08 18:38:27 -0800 | [diff] [blame] | 2148 | -e 's/[ ].*//' \ |
Junio C Hamano | 79d3066 | 2007-12-01 23:39:19 -0800 | [diff] [blame] | 2149 | -e 's/^/listed /' command-list.txt; \ |
Junio C Hamano | 3f7ce64 | 2007-11-08 18:38:27 -0800 | [diff] [blame] | 2150 | ls -1 Documentation/git*txt | \ |
| 2151 | sed -e 's|Documentation/|documented |' \ |
| 2152 | -e 's/\.txt//'; \ |
| 2153 | ) | while read how cmd; \ |
| 2154 | do \ |
| 2155 | case "$$how,$$cmd" in \ |
| 2156 | *,git-citool | \ |
| 2157 | *,git-gui | \ |
Christian Couder | 0f6f195 | 2007-12-04 06:44:29 +0100 | [diff] [blame] | 2158 | *,git-help | \ |
Junio C Hamano | 3f7ce64 | 2007-11-08 18:38:27 -0800 | [diff] [blame] | 2159 | documented,gitattributes | \ |
| 2160 | documented,gitignore | \ |
| 2161 | documented,gitmodules | \ |
Pierre Habouzit | 2f7ee08 | 2007-12-13 11:20:01 +0100 | [diff] [blame] | 2162 | documented,gitcli | \ |
Junio C Hamano | 3f7ce64 | 2007-11-08 18:38:27 -0800 | [diff] [blame] | 2163 | documented,git-tools | \ |
Junio C Hamano | d0594be | 2008-06-15 13:43:32 -0700 | [diff] [blame] | 2164 | documented,gitcore-tutorial | \ |
| 2165 | documented,gitcvs-migration | \ |
| 2166 | documented,gitdiffcore | \ |
| 2167 | documented,gitglossary | \ |
| 2168 | documented,githooks | \ |
| 2169 | documented,gitrepository-layout | \ |
| 2170 | documented,gittutorial | \ |
| 2171 | documented,gittutorial-2 | \ |
Jonathan Nieder | 46bac90 | 2010-01-31 11:46:53 -0800 | [diff] [blame] | 2172 | documented,git-bisect-lk2009 | \ |
Junio C Hamano | c88cd03 | 2010-03-10 15:31:34 -0800 | [diff] [blame] | 2173 | documented,git-remote-helpers | \ |
Jonathan Nieder | 46bac90 | 2010-01-31 11:46:53 -0800 | [diff] [blame] | 2174 | documented,gitworkflows | \ |
Junio C Hamano | 3f7ce64 | 2007-11-08 18:38:27 -0800 | [diff] [blame] | 2175 | sentinel,not,matching,is,ok ) continue ;; \ |
| 2176 | esac; \ |
Jonathan Nieder | 46bac90 | 2010-01-31 11:46:53 -0800 | [diff] [blame] | 2177 | case " $(ALL_PROGRAMS) $(SCRIPT_LIB) $(BUILT_INS) git gitk " in \ |
Junio C Hamano | 3f7ce64 | 2007-11-08 18:38:27 -0800 | [diff] [blame] | 2178 | *" $$cmd "*) ;; \ |
| 2179 | *) echo "removed but $$how: $$cmd" ;; \ |
| 2180 | esac; \ |
| 2181 | done ) | sort |
Junio C Hamano | c74390e | 2006-11-05 11:26:21 -0800 | [diff] [blame] | 2182 | |
| 2183 | ### Make sure built-ins do not have dups and listed in git.c |
| 2184 | # |
| 2185 | check-builtins:: |
| 2186 | ./check-builtins.sh |
Junio C Hamano | 11c57e6 | 2008-01-14 15:10:38 -0800 | [diff] [blame] | 2187 | |
Thomas Rast | 901c369 | 2009-02-19 12:13:35 +0100 | [diff] [blame] | 2188 | ### Test suite coverage testing |
| 2189 | # |
| 2190 | .PHONY: coverage coverage-clean coverage-build coverage-report |
| 2191 | |
| 2192 | coverage: |
| 2193 | $(MAKE) coverage-build |
| 2194 | $(MAKE) coverage-report |
| 2195 | |
| 2196 | coverage-clean: |
| 2197 | rm -f *.gcda *.gcno |
| 2198 | |
| 2199 | COVERAGE_CFLAGS = $(CFLAGS) -O0 -ftest-coverage -fprofile-arcs |
| 2200 | COVERAGE_LDFLAGS = $(CFLAGS) -O0 -lgcov |
| 2201 | |
| 2202 | coverage-build: coverage-clean |
| 2203 | $(MAKE) CFLAGS="$(COVERAGE_CFLAGS)" LDFLAGS="$(COVERAGE_LDFLAGS)" all |
| 2204 | $(MAKE) CFLAGS="$(COVERAGE_CFLAGS)" LDFLAGS="$(COVERAGE_LDFLAGS)" \ |
| 2205 | -j1 test |
| 2206 | |
| 2207 | coverage-report: |
| 2208 | gcov -b *.c |
| 2209 | grep '^function.*called 0 ' *.c.gcov \ |
| 2210 | | sed -e 's/\([^:]*\)\.gcov: *function \([^ ]*\) called.*/\1: \2/' \ |
| 2211 | | tee coverage-untested-functions |