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 | # |
Gary V. Vaughan | e88a135 | 2010-05-14 09:31:42 +0000 | [diff] [blame] | 11 | # Define SOCKLEN_T to a suitable type (such as 'size_t') if your |
| 12 | # system headers do not define a socklen_t type. |
| 13 | # |
Gary V. Vaughan | f9f33cd | 2010-05-14 09:31:43 +0000 | [diff] [blame] | 14 | # Define INLINE to a suitable substitute (such as '__inline' or '') if git |
| 15 | # fails to compile with errors about undefined inline functions or similar. |
| 16 | # |
Michal Rokos | c4582f9 | 2008-03-05 16:46:13 +0100 | [diff] [blame] | 17 | # Define SNPRINTF_RETURNS_BOGUS if your are on a system which snprintf() |
| 18 | # or vsnprintf() return -1 instead of number of characters which would |
| 19 | # have been written to the final string if enough space had been available. |
| 20 | # |
Brandon Casey | cba2252 | 2008-02-08 20:32:47 -0600 | [diff] [blame] | 21 | # Define FREAD_READS_DIRECTORIES if your are on a system which succeeds |
| 22 | # when attempting to read from an fopen'ed directory. |
| 23 | # |
Linus Torvalds | 765ac8e | 2006-02-28 15:07:20 -0800 | [diff] [blame] | 24 | # Define NO_OPENSSL environment variable if you do not have OpenSSL. |
Nicolas Pitre | 30ae47b | 2009-08-17 20:09:56 -0400 | [diff] [blame] | 25 | # This also implies BLK_SHA1. |
Petr Baudis | 5bdac8b | 2005-07-29 17:48:26 +0200 | [diff] [blame] | 26 | # |
Michał Kiedrowicz | 63e7e9d | 2011-05-09 23:52:05 +0200 | [diff] [blame] | 27 | # Define USE_LIBPCRE if you have and want to use libpcre. git-grep will be |
| 28 | # able to use Perl-compatible regular expressions. |
| 29 | # |
| 30 | # Define LIBPCREDIR=/foo/bar if your libpcre header and library files are in |
| 31 | # /foo/bar/include and /foo/bar/lib directories. |
| 32 | # |
Tay Ray Chuan | d24d905 | 2011-08-03 20:07:57 +0800 | [diff] [blame] | 33 | # Define NO_CURL if you do not have libcurl installed. git-http-fetch and |
Nick Hengeveld | 58e60dd | 2005-11-02 11:19:24 -0800 | [diff] [blame] | 34 | # git-http-push are not built, and you cannot use http:// and https:// |
Tay Ray Chuan | d24d905 | 2011-08-03 20:07:57 +0800 | [diff] [blame] | 35 | # transports (neither smart nor dumb). |
Johannes Schindelin | b2c0bd6 | 2005-07-31 02:14:23 +0200 | [diff] [blame] | 36 | # |
Patrick Mauritz | 6d9bbc5 | 2005-09-19 16:11:19 +0200 | [diff] [blame] | 37 | # Define CURLDIR=/foo/bar if your curl header and library files are in |
| 38 | # /foo/bar/include and /foo/bar/lib directories. |
| 39 | # |
Nick Hengeveld | 58e60dd | 2005-11-02 11:19:24 -0800 | [diff] [blame] | 40 | # Define NO_EXPAT if you do not have expat installed. git-http-push is |
Tay Ray Chuan | d24d905 | 2011-08-03 20:07:57 +0800 | [diff] [blame] | 41 | # not built, and you cannot push using http:// and https:// transports (dumb). |
Nick Hengeveld | 58e60dd | 2005-11-02 11:19:24 -0800 | [diff] [blame] | 42 | # |
Serge van den Boom | 85b4518 | 2009-01-28 21:43:57 +0100 | [diff] [blame] | 43 | # Define EXPATDIR=/foo/bar if your expat header and library files are in |
| 44 | # /foo/bar/include and /foo/bar/lib directories. |
| 45 | # |
Matt Kraai | 081fd8d | 2013-02-11 14:03:45 -0800 | [diff] [blame] | 46 | # Define EXPAT_NEEDS_XMLPARSE_H if you have an old version of expat (e.g., |
| 47 | # 1.1 or 1.2) that provides xmlparse.h instead of expat.h. |
| 48 | # |
Ævar Arnfjörð Bjarmason | 5e9637c | 2011-11-18 00:14:42 +0100 | [diff] [blame] | 49 | # Define NO_GETTEXT if you don't want Git output to be translated. |
| 50 | # A translated Git requires GNU libintl or another gettext implementation, |
| 51 | # plus libintl-perl at runtime. |
| 52 | # |
Alex Riesen | ad17ea7 | 2012-01-23 14:04:29 -0800 | [diff] [blame] | 53 | # Define USE_GETTEXT_SCHEME and set it to 'fallthrough', if you don't trust |
| 54 | # the installed gettext translation of the shell scripts output. |
| 55 | # |
Ævar Arnfjörð Bjarmason | 5e9637c | 2011-11-18 00:14:42 +0100 | [diff] [blame] | 56 | # Define HAVE_LIBCHARSET_H if you haven't set NO_GETTEXT and you can't |
| 57 | # trust the langinfo.h's nl_langinfo(CODESET) function to return the |
| 58 | # current character set. GNU and Solaris have a nl_langinfo(CODESET), |
| 59 | # FreeBSD can use either, but MinGW and some others need to use |
| 60 | # libcharset.h's locale_charset() instead. |
| 61 | # |
Дилян Палаузов | b522528 | 2012-02-12 17:23:36 +0100 | [diff] [blame] | 62 | # Define CHARSET_LIB to you need to link with library other than -liconv to |
| 63 | # use locale_charset() function. On some platforms this needs to set to |
| 64 | # -lcharset |
| 65 | # |
Ævar Arnfjörð Bjarmason | 5e9637c | 2011-11-18 00:14:42 +0100 | [diff] [blame] | 66 | # Define LIBC_CONTAINS_LIBINTL if your gettext implementation doesn't |
| 67 | # need -lintl when linking. |
| 68 | # |
| 69 | # Define NO_MSGFMT_EXTENDED_OPTIONS if your implementation of msgfmt |
| 70 | # doesn't support GNU extensions like --check and --statistics |
| 71 | # |
Chris Webb | cb6a22c | 2010-04-13 10:07:13 +0100 | [diff] [blame] | 72 | # Define HAVE_PATHS_H if you have paths.h and want to use the default PATH |
| 73 | # it specifies. |
| 74 | # |
Junio C Hamano | 35a730f | 2006-01-19 17:13:51 -0800 | [diff] [blame] | 75 | # Define NO_D_INO_IN_DIRENT if you don't have d_ino in your struct dirent. |
| 76 | # |
Junio C Hamano | 63be37b | 2006-01-19 17:13:57 -0800 | [diff] [blame] | 77 | # 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] | 78 | # 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] | 79 | # |
David Michael | b3e103d | 2012-12-14 14:57:01 -0500 | [diff] [blame] | 80 | # Define HAVE_STRINGS_H if you have strings.h and need it for strcasecmp. |
| 81 | # |
Linus Torvalds | ef34af2 | 2005-09-18 18:30:50 -0700 | [diff] [blame] | 82 | # Define NO_STRCASESTR if you don't have strcasestr. |
| 83 | # |
René Scharfe | b21b9f1 | 2007-09-07 00:32:54 +0200 | [diff] [blame] | 84 | # Define NO_MEMMEM if you don't have memmem. |
| 85 | # |
Matt Kraai | 40036be | 2012-12-18 14:03:55 -0800 | [diff] [blame] | 86 | # Define NO_GETPAGESIZE if you don't have getpagesize. |
| 87 | # |
Peter Eriksen | 817151e | 2006-06-24 16:01:25 +0200 | [diff] [blame] | 88 | # Define NO_STRLCPY if you don't have strlcpy. |
| 89 | # |
Nick Alcock | e3eed7f | 2011-11-02 15:46:22 +0000 | [diff] [blame] | 90 | # Define NO_STRTOUMAX if you don't have both strtoimax and strtoumax in the |
| 91 | # C library. If your compiler also does not support long long or does not have |
Jason Riedy | bc6b4f5 | 2007-02-19 16:22:56 -0800 | [diff] [blame] | 92 | # strtoull, define NO_STRTOULL. |
| 93 | # |
Jason Riedy | e40b61f | 2005-12-02 15:08:28 -0800 | [diff] [blame] | 94 | # Define NO_SETENV if you don't have setenv in the C library. |
| 95 | # |
Jakub Narebski | bfa8fcc | 2008-01-18 02:03:51 +0100 | [diff] [blame] | 96 | # Define NO_UNSETENV if you don't have unsetenv in the C library. |
| 97 | # |
Shawn O. Pearce | ca5bb5d | 2007-10-20 16:03:49 -0400 | [diff] [blame] | 98 | # Define NO_MKDTEMP if you don't have mkdtemp in the C library. |
| 99 | # |
Joachim Schmitz | dc9f462 | 2012-09-08 19:01:31 +0200 | [diff] [blame] | 100 | # Define MKDIR_WO_TRAILING_SLASH if your mkdir() can't deal with trailing slash. |
| 101 | # |
David Aguilar | 0620b39 | 2009-05-31 01:35:50 -0700 | [diff] [blame] | 102 | # Define NO_MKSTEMPS if you don't have mkstemps in the C library. |
| 103 | # |
Jonathan Nieder | 78457bc | 2010-08-13 18:59:40 -0500 | [diff] [blame] | 104 | # Define NO_STRTOK_R if you don't have strtok_r in the C library. |
| 105 | # |
Ævar Arnfjörð Bjarmason | f3f3d93 | 2010-10-03 09:56:39 +0000 | [diff] [blame] | 106 | # Define NO_FNMATCH if you don't have fnmatch in the C library. |
| 107 | # |
Ævar Arnfjörð Bjarmason | 4de066b | 2010-10-04 02:48:11 +0000 | [diff] [blame] | 108 | # Define NO_FNMATCH_CASEFOLD if your fnmatch function doesn't have the |
| 109 | # FNM_CASEFOLD GNU extension. |
| 110 | # |
Nguyễn Thái Ngọc Duy | cebcab1 | 2013-01-01 09:44:11 +0700 | [diff] [blame] | 111 | # Define USE_WILDMATCH if you want to use Git's wildmatch |
| 112 | # implementation as fnmatch |
| 113 | # |
Rafael Gieschke | 590e081 | 2011-05-19 13:37:55 +0200 | [diff] [blame] | 114 | # Define NO_GECOS_IN_PWENT if you don't have pw_gecos in struct passwd |
| 115 | # in the C library. |
| 116 | # |
David Aguilar | e1c0688 | 2009-05-31 01:35:51 -0700 | [diff] [blame] | 117 | # Define NO_LIBGEN_H if you don't have libgen.h. |
| 118 | # |
Brandon Casey | ecc395c | 2009-07-10 12:10:45 -0500 | [diff] [blame] | 119 | # Define NEEDS_LIBGEN if your libgen needs -lgen when linking |
| 120 | # |
Robert Schiele | 2600973 | 2008-01-24 19:34:46 +0100 | [diff] [blame] | 121 | # Define NO_SYS_SELECT_H if you don't have sys/select.h. |
| 122 | # |
Junio C Hamano | 9f0bb90 | 2006-05-02 00:40:24 -0700 | [diff] [blame] | 123 | # Define NO_SYMLINK_HEAD if you never want .git/HEAD to be a symbolic link. |
| 124 | # Enable it on Windows. By default, symrefs are still used. |
Pavel Roskin | 2fabd21 | 2005-11-15 00:59:50 -0500 | [diff] [blame] | 125 | # |
Pavel Roskin | 0285358 | 2006-07-09 02:44:58 -0700 | [diff] [blame] | 126 | # 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] | 127 | # tests. These tests take up a significant amount of the total test time |
| 128 | # but are not needed unless you plan to talk to SVN repos. |
| 129 | # |
Shawn Pearce | 8eb38ca | 2006-07-24 00:28:28 -0400 | [diff] [blame] | 130 | # Define NO_FINK if you are building on Darwin/Mac OS X, have Fink |
| 131 | # installed in /sw, but don't want GIT to link against any libraries |
| 132 | # installed there. If defined you may specify your own (or Fink's) |
| 133 | # include directories and library directories by defining CFLAGS |
| 134 | # and LDFLAGS appropriately. |
| 135 | # |
| 136 | # Define NO_DARWIN_PORTS if you are building on Darwin/Mac OS X, |
| 137 | # have DarwinPorts installed in /opt/local, but don't want GIT to |
| 138 | # link against any libraries installed there. If defined you may |
| 139 | # specify your own (or DarwinPort's) include directories and |
| 140 | # library directories by defining CFLAGS and LDFLAGS appropriately. |
| 141 | # |
Jonathan Nieder | f200197 | 2012-07-23 01:29:14 -0500 | [diff] [blame] | 142 | # Define BLK_SHA1 environment variable to make use of the bundled |
| 143 | # optimized C SHA1 routine. |
Linus Torvalds | d7c208a | 2009-08-05 16:13:20 -0700 | [diff] [blame] | 144 | # |
Petr Baudis | 5bdac8b | 2005-07-29 17:48:26 +0200 | [diff] [blame] | 145 | # Define PPC_SHA1 environment variable when running make to make use of |
| 146 | # a bundled SHA1 routine optimized for PowerPC. |
Junio C Hamano | 597c9cc | 2005-09-07 12:22:56 -0700 | [diff] [blame] | 147 | # |
Brian Gernhardt | 0460dba | 2009-09-08 09:54:38 -0400 | [diff] [blame] | 148 | # Define NEEDS_CRYPTO_WITH_SSL if you need -lcrypto when using -lssl (Darwin). |
| 149 | # |
| 150 | # 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] | 151 | # |
Thomas Cort | bc5f813 | 2011-07-19 18:55:47 -0400 | [diff] [blame] | 152 | # Define NEEDS_SSL_WITH_CURL if you need -lssl with -lcurl (Minix). |
| 153 | # |
| 154 | # Define NEEDS_IDN_WITH_CURL if you need -lidn when using -lcurl (Minix). |
| 155 | # |
Junio C Hamano | 597c9cc | 2005-09-07 12:22:56 -0700 | [diff] [blame] | 156 | # Define NEEDS_LIBICONV if linking with libc is not enough (Darwin). |
Patrick Mauritz | f0ebff0 | 2005-09-06 01:24:03 +0200 | [diff] [blame] | 157 | # |
Joachim Schmitz | 6c10990 | 2012-09-19 12:03:30 +0200 | [diff] [blame] | 158 | # Define NEEDS_LIBINTL_BEFORE_LIBICONV if you need libintl before libiconv. |
| 159 | # |
| 160 | # Define NO_INTPTR_T if you don't have intptr_t nor uintptr_t. |
| 161 | # |
| 162 | # Define NO_UINTMAX_T if you don't have uintmax_t. |
| 163 | # |
Patrick Mauritz | f0ebff0 | 2005-09-06 01:24:03 +0200 | [diff] [blame] | 164 | # Define NEEDS_SOCKET if linking with libc is not enough (SunOS, |
| 165 | # Patrick Mauritz). |
| 166 | # |
Brandon Casey | 70cf991 | 2009-06-05 18:36:10 -0500 | [diff] [blame] | 167 | # Define NEEDS_RESOLV if linking with -lnsl and/or -lsocket is not enough. |
| 168 | # Notably on Solaris hstrerror resides in libresolv and on Solaris 7 |
| 169 | # inet_ntop and inet_pton additionally reside there. |
| 170 | # |
Johannes Schindelin | 730d48a | 2005-10-08 15:54:36 -0700 | [diff] [blame] | 171 | # Define NO_MMAP if you want to avoid mmap. |
| 172 | # |
Joachim Schmitz | 6d45eb1 | 2012-09-17 23:16:39 +0200 | [diff] [blame] | 173 | # Define NO_SYS_POLL_H if you don't have sys/poll.h. |
| 174 | # |
| 175 | # Define NO_POLL if you do not have or don't want to use poll(). |
| 176 | # This also implies NO_SYS_POLL_H. |
| 177 | # |
Junio C Hamano | b2d05e0 | 2012-12-18 09:35:33 -0800 | [diff] [blame] | 178 | # Define NEEDS_SYS_PARAM_H if you need to include sys/param.h to compile, |
| 179 | # *PLEASE* REPORT to git@vger.kernel.org if your platform needs this; |
| 180 | # we want to know more about the issue. |
David Michael | 6ede720 | 2012-12-14 14:56:58 -0500 | [diff] [blame] | 181 | # |
Junio C Hamano | 46059cc | 2008-11-15 04:08:14 -0800 | [diff] [blame] | 182 | # Define NO_PTHREADS if you do not have or do not want to use Pthreads. |
| 183 | # |
Stefan-W. Hahn | 6900679 | 2007-01-09 22:04:12 +0100 | [diff] [blame] | 184 | # 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] | 185 | # cygwin1.dll before v1.5.22). |
Stefan-W. Hahn | 6900679 | 2007-01-09 22:04:12 +0100 | [diff] [blame] | 186 | # |
Joachim Schmitz | 7f9e848 | 2012-09-08 18:54:34 +0200 | [diff] [blame] | 187 | # Define NO_SETITIMER if you don't have setitimer() |
| 188 | # |
| 189 | # Define NO_STRUCT_ITIMERVAL if you don't have struct itimerval |
| 190 | # This also implies NO_SETITIMER |
| 191 | # |
Junio C Hamano | c0f8654 | 2012-06-26 19:19:32 +0100 | [diff] [blame] | 192 | # Define NO_THREAD_SAFE_PREAD if your pread() implementation is not |
| 193 | # thread-safe. (e.g. compat/pread.c or cygwin) |
| 194 | # |
Shawn O. Pearce | 1510fea | 2006-12-14 06:15:57 -0500 | [diff] [blame] | 195 | # Define NO_FAST_WORKING_DIRECTORY if accessing objects in pack files is |
| 196 | # generally faster on your platform than accessing the working directory. |
| 197 | # |
Shawn O. Pearce | c869753 | 2006-12-30 23:53:55 -0500 | [diff] [blame] | 198 | # Define NO_TRUSTABLE_FILEMODE if your filesystem may claim to support |
| 199 | # the executable mode bit, but doesn't really do so. |
| 200 | # |
hpa | 49744d6 | 2005-09-28 16:52:21 -0700 | [diff] [blame] | 201 | # Define NO_IPV6 if you lack IPv6 support and getaddrinfo(). |
| 202 | # |
Johannes Sixt | 6320358 | 2011-12-12 22:12:56 +0100 | [diff] [blame] | 203 | # Define NO_UNIX_SOCKETS if your system does not offer unix sockets. |
| 204 | # |
Junio C Hamano | bdc37f5 | 2006-01-19 17:13:32 -0800 | [diff] [blame] | 205 | # Define NO_SOCKADDR_STORAGE if your platform does not have struct |
| 206 | # sockaddr_storage. |
| 207 | # |
Fernando J. Pereda | b6e56ec | 2006-02-16 09:38:01 +0100 | [diff] [blame] | 208 | # Define NO_ICONV if your libc does not properly support iconv. |
| 209 | # |
Ramsay Jones | fd547a9 | 2007-03-03 18:29:03 +0000 | [diff] [blame] | 210 | # Define OLD_ICONV if your library has an old iconv(), where the second |
| 211 | # (input buffer pointer) parameter is declared with type (const char **). |
| 212 | # |
David Symonds | 609a228 | 2007-11-07 14:24:28 +1100 | [diff] [blame] | 213 | # Define NO_DEFLATE_BOUND if your zlib does not have deflateBound. |
| 214 | # |
Matt Kraai | 2064887 | 2007-06-30 10:05:03 -0700 | [diff] [blame] | 215 | # Define NO_R_TO_GCC_LINKER if your gcc does not like "-R/path/lib" |
| 216 | # that tells runtime paths to dynamic libraries; |
| 217 | # "-Wl,-rpath=/path/lib" is used instead. |
Junio C Hamano | bbfc63d | 2006-12-27 14:17:35 -0800 | [diff] [blame] | 218 | # |
Junio C Hamano | 6520c84 | 2011-06-18 18:07:03 -0700 | [diff] [blame] | 219 | # Define NO_NORETURN if using buggy versions of gcc 4.6+ and profile feedback, |
| 220 | # as the compiler can crash (http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49299) |
| 221 | # |
Petr Baudis | 5bdac8b | 2005-07-29 17:48:26 +0200 | [diff] [blame] | 222 | # Define USE_NSEC below if you want git to care about sub-second file mtimes |
| 223 | # and ctimes. Note that you need recent glibc (at least 2.2.4) for this, and |
| 224 | # it will BREAK YOUR LOCAL DIFFS! show-diff and anything using it will likely |
| 225 | # randomly break unless your underlying filesystem supports those sub-second |
| 226 | # times (my ext3 doesn't). |
Junio C Hamano | f6af75d | 2006-06-23 17:57:48 -0700 | [diff] [blame] | 227 | # |
Brian Gernhardt | c567383 | 2009-03-08 16:04:28 -0400 | [diff] [blame] | 228 | # Define USE_ST_TIMESPEC if your "struct stat" uses "st_ctimespec" instead of |
| 229 | # "st_ctim" |
| 230 | # |
Kjetil Barvik | c06ff49 | 2009-03-04 18:47:40 +0100 | [diff] [blame] | 231 | # Define NO_NSEC if your "struct stat" does not have "st_ctim.tv_nsec" |
| 232 | # available. This automatically turns USE_NSEC off. |
| 233 | # |
Petr Baudis | 5bdac8b | 2005-07-29 17:48:26 +0200 | [diff] [blame] | 234 | # 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] | 235 | # change being considered an inode change from the update-index perspective. |
Alex Riesen | f848718 | 2006-12-04 10:50:04 +0100 | [diff] [blame] | 236 | # |
Junio C Hamano | fdb2a2a | 2008-08-18 21:57:16 +0200 | [diff] [blame] | 237 | # Define NO_ST_BLOCKS_IN_STRUCT_STAT if your platform does not have st_blocks |
| 238 | # field that counts the on-disk footprint in 512-byte blocks. |
| 239 | # |
Jonathan Nieder | 162213d | 2009-10-09 05:15:29 -0500 | [diff] [blame] | 240 | # Define DOCBOOK_XSL_172 if you want to format man pages with DocBook XSL v1.72 |
| 241 | # (not v1.73 or v1.71). |
| 242 | # |
Jeff King | 79c461d | 2010-11-19 12:54:24 -0500 | [diff] [blame] | 243 | # Define ASCIIDOC_ROFF if your DocBook XSL does not escape raw roff directives |
| 244 | # (versions 1.68.1 through v1.72). |
Jonas Fonseca | 7f55cf4 | 2007-11-14 10:38:46 +0100 | [diff] [blame] | 245 | # |
Thomas Rast | 204d363 | 2009-10-22 10:19:06 +0200 | [diff] [blame] | 246 | # Define GNU_ROFF if your target system uses GNU groff. This forces |
| 247 | # apostrophes to be ASCII so that cut&pasting examples to the shell |
| 248 | # will work. |
| 249 | # |
Junio C Hamano | cdbada7 | 2013-01-13 22:48:07 -0800 | [diff] [blame] | 250 | # Define PERL_PATH to the path of your Perl binary (usually /usr/bin/perl). |
| 251 | # |
Alex Riesen | f848718 | 2006-12-04 10:50:04 +0100 | [diff] [blame] | 252 | # Define NO_PERL_MAKEMAKER if you cannot use Makefiles generated by perl's |
| 253 | # MakeMaker (e.g. using ActiveState under Cygwin). |
| 254 | # |
Jeff King | 499c293 | 2009-04-03 15:32:20 -0400 | [diff] [blame] | 255 | # Define NO_PERL if you do not want Perl scripts or libraries at all. |
| 256 | # |
Junio C Hamano | cdbada7 | 2013-01-13 22:48:07 -0800 | [diff] [blame] | 257 | # Define PYTHON_PATH to the path of your Python binary (often /usr/bin/python |
| 258 | # but /usr/bin/python2.7 on some platforms). |
| 259 | # |
Johan Herland | d4e1b47 | 2009-11-18 02:42:31 +0100 | [diff] [blame] | 260 | # Define NO_PYTHON if you do not want Python scripts or libraries at all. |
| 261 | # |
Eygene Ryabinkin | 3cfaf11 | 2007-03-28 04:00:23 -0700 | [diff] [blame] | 262 | # Define NO_TCLTK if you do not want Tcl/Tk GUI. |
| 263 | # |
Shawn O. Pearce | 5f5dbd7 | 2007-05-07 23:36:31 -0400 | [diff] [blame] | 264 | # The TCL_PATH variable governs the location of the Tcl interpreter |
| 265 | # used to optimize git-gui for your system. Only used if NO_TCLTK |
| 266 | # is not set. Defaults to the bare 'tclsh'. |
| 267 | # |
| 268 | # The TCLTK_PATH variable governs the location of the Tcl/Tk interpreter. |
Eygene Ryabinkin | 81b63c7 | 2007-03-28 04:12:07 -0700 | [diff] [blame] | 269 | # If not set it defaults to the bare 'wish'. If it is set to the empty |
| 270 | # string then NO_TCLTK will be forced (this is used by configure script). |
| 271 | # |
Brian Downing | 43fe901 | 2008-02-05 15:10:44 -0600 | [diff] [blame] | 272 | # Define INTERNAL_QSORT to use Git's implementation of qsort(), which |
| 273 | # is a simplified version of the merge sort used in glibc. This is |
| 274 | # recommended if Git triggers O(n^2) behavior in your platform's qsort(). |
| 275 | # |
Johannes Sixt | 34779c5 | 2009-04-20 10:17:00 +0200 | [diff] [blame] | 276 | # Define UNRELIABLE_FSTAT if your system's fstat does not return the same |
| 277 | # information on a not yet closed file that lstat would return for the same |
| 278 | # file after it was closed. |
Johannes Schindelin | be66a6c | 2009-04-25 11:57:14 +0200 | [diff] [blame] | 279 | # |
Johannes Schindelin | 348df16 | 2009-04-28 00:32:25 +0200 | [diff] [blame] | 280 | # Define OBJECT_CREATION_USES_RENAMES if your operating systems has problems |
| 281 | # 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] | 282 | # 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] | 283 | # |
Johannes Schindelin | 3426e34 | 2009-05-11 13:02:18 +0200 | [diff] [blame] | 284 | # Define NO_CROSS_DIRECTORY_HARDLINKS if you plan to distribute the installed |
| 285 | # 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] | 286 | # |
Junio C Hamano | 70de5e6 | 2012-05-02 15:12:10 -0700 | [diff] [blame] | 287 | # Define NO_INSTALL_HARDLINKS if you prefer to use either symbolic links or |
| 288 | # copies to install built-in git commands e.g. git-cat-file. |
| 289 | # |
Marius Storm-Olsen | f0ed822 | 2009-05-31 18:15:23 +0200 | [diff] [blame] | 290 | # Define USE_NED_ALLOCATOR if you want to replace the platforms default |
| 291 | # memory allocators with the nedmalloc allocator written by Niall Douglas. |
Jeff King | 02232ad | 2009-06-16 15:07:40 -0400 | [diff] [blame] | 292 | # |
| 293 | # 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] | 294 | # |
Mark Levedahl | 49a370d | 2013-01-06 11:56:33 -0800 | [diff] [blame] | 295 | # Define CYGWIN_V15_WIN32API if you are using Cygwin v1.7.x but are not |
| 296 | # using the current w32api packages. The recommended approach, however, |
| 297 | # is to update your installation if compilation errors occur. |
| 298 | # |
Jeff King | 21aeafc | 2011-12-10 05:41:01 -0500 | [diff] [blame] | 299 | # Define HAVE_DEV_TTY if your system can open /dev/tty to interact with the |
| 300 | # user. |
| 301 | # |
Ævar Arnfjörð Bjarmason | bb946bb | 2011-02-22 23:41:21 +0000 | [diff] [blame] | 302 | # Define GETTEXT_POISON if you are debugging the choice of strings marked |
Jonathan Nieder | 3095522 | 2011-02-22 23:41:22 +0000 | [diff] [blame] | 303 | # for translation. In a GETTEXT_POISON build, you can turn all strings marked |
| 304 | # for translation into gibberish by setting the GIT_GETTEXT_POISON variable |
| 305 | # (to any value) in your environment. |
Ævar Arnfjörð Bjarmason | bb946bb | 2011-02-22 23:41:21 +0000 | [diff] [blame] | 306 | # |
Jakub Narebski | 63267de | 2009-09-01 13:39:20 +0200 | [diff] [blame] | 307 | # Define JSMIN to point to JavaScript minifier that functions as |
| 308 | # a filter to have gitweb.js minified. |
Junio C Hamano | 8678bc0 | 2009-12-01 11:28:15 -0800 | [diff] [blame] | 309 | # |
Mark Rada | 0e6ce21 | 2010-04-02 20:35:05 -0400 | [diff] [blame] | 310 | # Define CSSMIN to point to a CSS minifier in order to generate a minified |
| 311 | # version of gitweb.css |
| 312 | # |
Junio C Hamano | a3d023d | 2009-10-30 20:45:34 -0500 | [diff] [blame] | 313 | # Define DEFAULT_PAGER to a sensible pager command (defaults to "less") if |
| 314 | # you want to use something different. The value will be interpreted by the |
| 315 | # shell at runtime when it is used. |
| 316 | # |
Jonathan Nieder | 8f4b576 | 2009-10-30 20:44:41 -0500 | [diff] [blame] | 317 | # Define DEFAULT_EDITOR to a sensible editor command (defaults to "vi") if you |
| 318 | # want to use something different. The value will be interpreted by the shell |
| 319 | # if necessary when it is used. Examples: |
| 320 | # |
| 321 | # DEFAULT_EDITOR='~/bin/vi', |
| 322 | # DEFAULT_EDITOR='$GIT_FALLBACK_EDITOR', |
| 323 | # DEFAULT_EDITOR='"C:\Program Files\Vim\gvim.exe" --nofork' |
Jonathan Nieder | dfea575 | 2010-01-26 09:52:49 -0600 | [diff] [blame] | 324 | # |
Jonathan Nieder | 024c843 | 2011-11-18 03:58:21 -0600 | [diff] [blame] | 325 | # Define COMPUTE_HEADER_DEPENDENCIES to "yes" if you want dependencies on |
| 326 | # header files to be automatically computed, to avoid rebuilding objects when |
| 327 | # an unrelated header file changes. Define it to "no" to use the hard-coded |
| 328 | # dependency rules. The default is "auto", which means to use computed header |
| 329 | # dependencies if your compiler is detected to support it. |
| 330 | # |
Jonathan Nieder | f2fabbf | 2010-01-26 09:57:15 -0600 | [diff] [blame] | 331 | # Define CHECK_HEADER_DEPENDENCIES to check for problems in the hard-coded |
| 332 | # dependency rules. |
Junio C Hamano | d5cff17 | 2010-06-21 06:02:49 -0700 | [diff] [blame] | 333 | # |
Eyvind Bernhardsen | 942e774 | 2010-06-04 21:29:08 +0200 | [diff] [blame] | 334 | # Define NATIVE_CRLF if your platform uses CRLF for line endings. |
Thomas Rast | 6942efc | 2012-04-06 23:01:23 +0200 | [diff] [blame] | 335 | # |
| 336 | # Define XDL_FAST_HASH to use an alternative line-hashing method in |
| 337 | # the diff algorithm. It gives a nice speedup if your processor has |
| 338 | # fast unaligned word loads. Does NOT work on big-endian systems! |
| 339 | # Enabled by default on x86_64. |
Jeff King | 42dcbb7 | 2012-06-02 15:01:12 -0400 | [diff] [blame] | 340 | # |
| 341 | # Define GIT_USER_AGENT if you want to change how git identifies itself during |
| 342 | # network interactions. The default is "git/$(GIT_VERSION)". |
Junio C Hamano | a88d7aa | 2012-06-21 14:42:38 -0700 | [diff] [blame] | 343 | # |
Vincent van Ravesteijn | 1cc8af0 | 2012-06-06 20:28:16 +0000 | [diff] [blame] | 344 | # Define DEFAULT_HELP_FORMAT to "man", "info" or "html" |
| 345 | # (defaults to "man") if you want to have a different default when |
| 346 | # "git help" is called without a parameter specifying the format. |
Petr Baudis | 5bdac8b | 2005-07-29 17:48:26 +0200 | [diff] [blame] | 347 | |
Jonathan Nieder | 13fca9f | 2010-01-06 02:06:58 -0600 | [diff] [blame] | 348 | GIT-VERSION-FILE: FORCE |
Fredrik Kuivinen | 3654638 | 2006-02-14 00:15:14 +0100 | [diff] [blame] | 349 | @$(SHELL_PATH) ./GIT-VERSION-GEN |
Junio C Hamano | 9b88fce | 2005-12-27 14:40:17 -0800 | [diff] [blame] | 350 | -include GIT-VERSION-FILE |
Petr Baudis | 5bdac8b | 2005-07-29 17:48:26 +0200 | [diff] [blame] | 351 | |
Junio C Hamano | 94d2331 | 2005-11-13 01:46:13 -0800 | [diff] [blame] | 352 | # 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] | 353 | |
Pavel Roskin | b05701c | 2005-08-06 01:36:15 -0400 | [diff] [blame] | 354 | CFLAGS = -g -O2 -Wall |
Junio C Hamano | 94d2331 | 2005-11-13 01:46:13 -0800 | [diff] [blame] | 355 | LDFLAGS = |
Gary V. Vaughan | ebef827 | 2010-05-14 09:31:32 +0000 | [diff] [blame] | 356 | ALL_CFLAGS = $(CPPFLAGS) $(CFLAGS) |
Junio C Hamano | 94d2331 | 2005-11-13 01:46:13 -0800 | [diff] [blame] | 357 | ALL_LDFLAGS = $(LDFLAGS) |
Junio C Hamano | 4dc0002 | 2006-01-12 21:42:25 -0800 | [diff] [blame] | 358 | STRIP ?= strip |
Thomas Glanzmann | 29c2cce | 2005-05-07 10:41:54 +0200 | [diff] [blame] | 359 | |
Johannes Sixt | 49fa65a | 2008-07-23 21:12:18 +0200 | [diff] [blame] | 360 | # Among the variables below, these: |
| 361 | # gitexecdir |
| 362 | # template_dir |
Steffen Prohaska | 026fa0d | 2009-01-18 13:00:09 +0100 | [diff] [blame] | 363 | # mandir |
| 364 | # infodir |
Johannes Sixt | 49fa65a | 2008-07-23 21:12:18 +0200 | [diff] [blame] | 365 | # htmldir |
Johannes Sixt | 9fb1e69 | 2011-05-09 10:24:55 +0200 | [diff] [blame] | 366 | # sysconfdir |
Steffen Prohaska | 026fa0d | 2009-01-18 13:00:09 +0100 | [diff] [blame] | 367 | # can be specified as a relative path some/where/else; |
| 368 | # this is interpreted as relative to $(prefix) and "git" at |
Johannes Sixt | 49fa65a | 2008-07-23 21:12:18 +0200 | [diff] [blame] | 369 | # runtime figures out where they are based on the path to the executable. |
| 370 | # This can help installing the suite in a relocatable way. |
| 371 | |
Pavel Roskin | b05701c | 2005-08-06 01:36:15 -0400 | [diff] [blame] | 372 | prefix = $(HOME) |
Steffen Prohaska | 026fa0d | 2009-01-18 13:00:09 +0100 | [diff] [blame] | 373 | bindir_relative = bin |
| 374 | bindir = $(prefix)/$(bindir_relative) |
| 375 | mandir = share/man |
| 376 | infodir = share/info |
| 377 | gitexecdir = libexec/git-core |
David Aguilar | bc7a96a | 2011-08-18 00:23:46 -0700 | [diff] [blame] | 378 | mergetoolsdir = $(gitexecdir)/mergetools |
Johannes Sixt | 9354768 | 2007-06-11 10:02:17 +0200 | [diff] [blame] | 379 | sharedir = $(prefix)/share |
Pavan Kumar Sunkara | bc95196 | 2010-05-28 11:55:50 +0530 | [diff] [blame] | 380 | gitwebdir = $(sharedir)/gitweb |
Ævar Arnfjörð Bjarmason | 5e9637c | 2011-11-18 00:14:42 +0100 | [diff] [blame] | 381 | localedir = $(sharedir)/locale |
Steffen Prohaska | 026fa0d | 2009-01-18 13:00:09 +0100 | [diff] [blame] | 382 | template_dir = share/git-core/templates |
| 383 | htmldir = share/doc/git-doc |
Steffen Prohaska | 026fa0d | 2009-01-18 13:00:09 +0100 | [diff] [blame] | 384 | ETC_GITCONFIG = $(sysconfdir)/gitconfig |
Petr Onderka | 6df42ab | 2010-09-01 00:42:43 +0200 | [diff] [blame] | 385 | ETC_GITATTRIBUTES = $(sysconfdir)/gitattributes |
Robert Schiele | 10861be | 2007-08-01 06:30:35 +0200 | [diff] [blame] | 386 | lib = lib |
Stefano Lattarini | dd6fc7c | 2012-12-09 11:36:17 +0100 | [diff] [blame] | 387 | # DESTDIR = |
Johannes Schindelin | 352c811 | 2009-05-23 10:04:48 +0200 | [diff] [blame] | 388 | pathsep = : |
Petr Baudis | 5c2a7fb | 2005-04-13 02:14:06 -0700 | [diff] [blame] | 389 | |
Ævar Arnfjörð Bjarmason | 5e9637c | 2011-11-18 00:14:42 +0100 | [diff] [blame] | 390 | export prefix bindir sharedir sysconfdir gitwebdir localedir |
Jakub Narebski | e14421b | 2006-06-29 22:11:25 +0200 | [diff] [blame] | 391 | |
Ævar Arnfjörð Bjarmason | 6d62c98 | 2011-12-20 23:40:47 +0000 | [diff] [blame] | 392 | CC = cc |
Pavel Roskin | b05701c | 2005-08-06 01:36:15 -0400 | [diff] [blame] | 393 | AR = ar |
Emil Medve | 4cb08df | 2007-07-14 12:51:44 -0500 | [diff] [blame] | 394 | RM = rm -f |
Gary V. Vaughan | d1b1a91 | 2010-05-14 09:31:36 +0000 | [diff] [blame] | 395 | DIFF = diff |
Junio C Hamano | 229a7ed | 2005-09-23 10:41:40 -0700 | [diff] [blame] | 396 | TAR = tar |
David Kastrup | 89b2f19 | 2007-07-29 15:23:28 -0700 | [diff] [blame] | 397 | FIND = find |
Pavel Roskin | b05701c | 2005-08-06 01:36:15 -0400 | [diff] [blame] | 398 | INSTALL = install |
| 399 | RPMBUILD = rpmbuild |
Shawn O. Pearce | 5f5dbd7 | 2007-05-07 23:36:31 -0400 | [diff] [blame] | 400 | TCL_PATH = tclsh |
Eygene Ryabinkin | 81b63c7 | 2007-03-28 04:12:07 -0700 | [diff] [blame] | 401 | TCLTK_PATH = wish |
Ævar Arnfjörð Bjarmason | cd5513a | 2011-02-22 23:41:23 +0000 | [diff] [blame] | 402 | XGETTEXT = xgettext |
Ævar Arnfjörð Bjarmason | 5e9637c | 2011-11-18 00:14:42 +0100 | [diff] [blame] | 403 | MSGFMT = msgfmt |
David M. Syzdek | 158629b | 2008-11-02 14:43:20 -0900 | [diff] [blame] | 404 | PTHREAD_LIBS = -lpthread |
Gary V. Vaughan | 48793cf | 2010-05-14 09:31:34 +0000 | [diff] [blame] | 405 | PTHREAD_CFLAGS = |
Thomas Rast | e146d17 | 2010-07-26 09:43:41 +0200 | [diff] [blame] | 406 | GCOV = gcov |
Linus Torvalds | e83c516 | 2005-04-07 15:13:13 -0700 | [diff] [blame] | 407 | |
Shawn O. Pearce | 5f5dbd7 | 2007-05-07 23:36:31 -0400 | [diff] [blame] | 408 | export TCL_PATH TCLTK_PATH |
| 409 | |
Ramsay Jones | f228d1f | 2011-04-07 19:22:18 +0100 | [diff] [blame] | 410 | SPARSE_FLAGS = |
Linus Torvalds | 44c9e85 | 2005-07-03 10:02:35 -0700 | [diff] [blame] | 411 | |
Petr Baudis | 28818ff | 2005-07-29 17:50:24 +0200 | [diff] [blame] | 412 | |
| 413 | |
| 414 | ### --- END CONFIGURATION SECTION --- |
| 415 | |
Petr Baudis | 8d7f586 | 2006-06-25 03:47:03 +0200 | [diff] [blame] | 416 | # 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] | 417 | # be built by a different compiler. (Note that this is an artifact now |
| 418 | # but it still might be nice to keep that distinction.) |
Linus Torvalds | 81b50f3 | 2010-02-22 08:42:18 -0800 | [diff] [blame] | 419 | BASIC_CFLAGS = -I. |
Petr Baudis | 18b0fc1 | 2006-09-23 20:20:47 +0200 | [diff] [blame] | 420 | BASIC_LDFLAGS = |
Petr Baudis | 8d7f586 | 2006-06-25 03:47:03 +0200 | [diff] [blame] | 421 | |
Johannes Schindelin | 5c928c0 | 2009-03-25 17:27:28 +0100 | [diff] [blame] | 422 | # Guard against environment variables |
| 423 | BUILTIN_OBJS = |
| 424 | BUILT_INS = |
| 425 | COMPAT_CFLAGS = |
| 426 | COMPAT_OBJS = |
Jonathan Nieder | 3371f9b | 2011-03-27 13:13:22 -0500 | [diff] [blame] | 427 | XDIFF_OBJS = |
Jonathan Nieder | 3371f9b | 2011-03-27 13:13:22 -0500 | [diff] [blame] | 428 | VCSSVN_OBJS = |
Jeff King | b8ba629 | 2012-06-20 14:30:56 -0400 | [diff] [blame] | 429 | GENERATED_H = |
Jonathan Nieder | a673cfe | 2010-03-19 22:20:12 -0500 | [diff] [blame] | 430 | EXTRA_CPPFLAGS = |
Johannes Schindelin | 5c928c0 | 2009-03-25 17:27:28 +0100 | [diff] [blame] | 431 | LIB_H = |
| 432 | LIB_OBJS = |
Jonathan Nieder | 1b22c99 | 2010-01-26 09:54:23 -0600 | [diff] [blame] | 433 | PROGRAM_OBJS = |
Johannes Schindelin | 5c928c0 | 2009-03-25 17:27:28 +0100 | [diff] [blame] | 434 | PROGRAMS = |
| 435 | SCRIPT_PERL = |
Johan Herland | d4e1b47 | 2009-11-18 02:42:31 +0100 | [diff] [blame] | 436 | SCRIPT_PYTHON = |
Johannes Schindelin | 5c928c0 | 2009-03-25 17:27:28 +0100 | [diff] [blame] | 437 | SCRIPT_SH = |
Jonathan Nieder | 46bac90 | 2010-01-31 11:46:53 -0800 | [diff] [blame] | 438 | SCRIPT_LIB = |
Jonathan Nieder | 225f78c | 2010-01-26 10:08:44 -0600 | [diff] [blame] | 439 | TEST_PROGRAMS_NEED_X = |
Johannes Schindelin | 5c928c0 | 2009-03-25 17:27:28 +0100 | [diff] [blame] | 440 | |
Jonathan Nieder | c40d92e | 2010-03-19 19:06:15 -0500 | [diff] [blame] | 441 | # Having this variable in your environment would break pipelines because |
| 442 | # you cause "cd" to echo its destination to stdout. It can also take |
| 443 | # scripts to unexpected places. If you like CDPATH, define it for your |
| 444 | # interactive shell sessions without exporting it. |
| 445 | unexport CDPATH |
| 446 | |
Junio C Hamano | 74ca5e6 | 2008-03-12 01:46:26 -0700 | [diff] [blame] | 447 | SCRIPT_SH += git-am.sh |
| 448 | SCRIPT_SH += git-bisect.sh |
David Aguilar | afcbc8e | 2009-04-07 01:21:20 -0700 | [diff] [blame] | 449 | SCRIPT_SH += git-difftool--helper.sh |
Junio C Hamano | 74ca5e6 | 2008-03-12 01:46:26 -0700 | [diff] [blame] | 450 | SCRIPT_SH += git-filter-branch.sh |
| 451 | SCRIPT_SH += git-lost-found.sh |
| 452 | SCRIPT_SH += git-merge-octopus.sh |
| 453 | SCRIPT_SH += git-merge-one-file.sh |
| 454 | SCRIPT_SH += git-merge-resolve.sh |
Junio C Hamano | 74ca5e6 | 2008-03-12 01:46:26 -0700 | [diff] [blame] | 455 | SCRIPT_SH += git-mergetool.sh |
Junio C Hamano | 74ca5e6 | 2008-03-12 01:46:26 -0700 | [diff] [blame] | 456 | SCRIPT_SH += git-pull.sh |
| 457 | SCRIPT_SH += git-quiltimport.sh |
Junio C Hamano | 74ca5e6 | 2008-03-12 01:46:26 -0700 | [diff] [blame] | 458 | SCRIPT_SH += git-rebase.sh |
| 459 | SCRIPT_SH += git-repack.sh |
| 460 | SCRIPT_SH += git-request-pull.sh |
Junio C Hamano | 74ca5e6 | 2008-03-12 01:46:26 -0700 | [diff] [blame] | 461 | SCRIPT_SH += git-stash.sh |
| 462 | SCRIPT_SH += git-submodule.sh |
| 463 | SCRIPT_SH += git-web--browse.sh |
Petr Baudis | 28818ff | 2005-07-29 17:50:24 +0200 | [diff] [blame] | 464 | |
Jonathan Nieder | 46bac90 | 2010-01-31 11:46:53 -0800 | [diff] [blame] | 465 | SCRIPT_LIB += git-mergetool--lib |
| 466 | SCRIPT_LIB += git-parse-remote |
Martin von Zweigbergk | fdb76c1 | 2011-02-24 22:32:06 -0500 | [diff] [blame] | 467 | SCRIPT_LIB += git-rebase--am |
| 468 | SCRIPT_LIB += git-rebase--interactive |
| 469 | SCRIPT_LIB += git-rebase--merge |
Jonathan Nieder | 46bac90 | 2010-01-31 11:46:53 -0800 | [diff] [blame] | 470 | SCRIPT_LIB += git-sh-setup |
Ævar Arnfjörð Bjarmason | e00cf07 | 2011-05-14 13:47:43 +0000 | [diff] [blame] | 471 | SCRIPT_LIB += git-sh-i18n |
Jonathan Nieder | 46bac90 | 2010-01-31 11:46:53 -0800 | [diff] [blame] | 472 | |
Junio C Hamano | 74ca5e6 | 2008-03-12 01:46:26 -0700 | [diff] [blame] | 473 | SCRIPT_PERL += git-add--interactive.perl |
David Aguilar | afcbc8e | 2009-04-07 01:21:20 -0700 | [diff] [blame] | 474 | SCRIPT_PERL += git-difftool.perl |
Junio C Hamano | 74ca5e6 | 2008-03-12 01:46:26 -0700 | [diff] [blame] | 475 | SCRIPT_PERL += git-archimport.perl |
| 476 | SCRIPT_PERL += git-cvsexportcommit.perl |
| 477 | SCRIPT_PERL += git-cvsimport.perl |
| 478 | SCRIPT_PERL += git-cvsserver.perl |
| 479 | SCRIPT_PERL += git-relink.perl |
| 480 | SCRIPT_PERL += git-send-email.perl |
| 481 | SCRIPT_PERL += git-svn.perl |
Junio C Hamano | 60036a4 | 2005-07-30 17:31:47 -0700 | [diff] [blame] | 482 | |
Felipe Contreras | d0ac3ff | 2012-11-28 23:11:00 +0100 | [diff] [blame] | 483 | SCRIPT_PYTHON += git-remote-testpy.py |
Pete Wyckoff | b6f9305 | 2012-04-08 20:18:00 -0400 | [diff] [blame] | 484 | SCRIPT_PYTHON += git-p4.py |
Sverre Rabbelier | 7aeaa2f | 2010-03-29 11:48:28 -0500 | [diff] [blame] | 485 | |
Matthieu Moy | 4c06b41 | 2013-02-08 18:31:16 +0100 | [diff] [blame] | 486 | # Generated files for scripts |
| 487 | SCRIPT_SH_GEN = $(patsubst %.sh,%,$(SCRIPT_SH)) |
| 488 | SCRIPT_PERL_GEN = $(patsubst %.perl,%,$(SCRIPT_PERL)) |
| 489 | SCRIPT_PYTHON_GEN = $(patsubst %.py,%,$(SCRIPT_PYTHON)) |
| 490 | |
| 491 | # Individual rules to allow e.g. |
| 492 | # "make -C ../.. SCRIPT_PERL=contrib/foo/bar.perl build-perl-script" |
| 493 | # from subdirectories like contrib/*/ |
| 494 | .PHONY: build-perl-script build-sh-script build-python-script |
| 495 | build-perl-script: $(SCRIPT_PERL_GEN) |
| 496 | build-sh-script: $(SCRIPT_SH_GEN) |
| 497 | build-python-script: $(SCRIPT_PYTHON_GEN) |
| 498 | |
| 499 | .PHONY: install-perl-script install-sh-script install-python-script |
| 500 | install-sh-script: $(SCRIPT_SH_GEN) |
| 501 | $(INSTALL) $(SCRIPT_SH_GEN) '$(DESTDIR_SQ)$(gitexec_instdir_SQ)' |
| 502 | install-perl-script: $(SCRIPT_PERL_GEN) |
| 503 | $(INSTALL) $(SCRIPT_PERL_GEN) '$(DESTDIR_SQ)$(gitexec_instdir_SQ)' |
| 504 | install-python-script: $(SCRIPT_PYTHON_GEN) |
| 505 | $(INSTALL) $(SCRIPT_PYTHON_GEN) '$(DESTDIR_SQ)$(gitexec_instdir_SQ)' |
| 506 | |
| 507 | .PHONY: clean-perl-script clean-sh-script clean-python-script |
| 508 | clean-sh-script: |
| 509 | $(RM) $(SCRIPT_SH_GEN) |
| 510 | clean-perl-script: |
| 511 | $(RM) $(SCRIPT_PERL_GEN) |
| 512 | clean-python-script: |
| 513 | $(RM) $(SCRIPT_PYTHON_GEN) |
| 514 | |
| 515 | SCRIPTS = $(SCRIPT_SH_GEN) \ |
| 516 | $(SCRIPT_PERL_GEN) \ |
| 517 | $(SCRIPT_PYTHON_GEN) \ |
Shawn O. Pearce | e475fe1 | 2007-11-23 15:35:08 -0500 | [diff] [blame] | 518 | git-instaweb |
Andreas Ericsson | d6ebd25 | 2005-11-22 00:44:15 +0100 | [diff] [blame] | 519 | |
Junio C Hamano | 2f76919 | 2010-09-28 16:08:38 -0500 | [diff] [blame] | 520 | ETAGS_TARGET = TAGS |
| 521 | |
Junio C Hamano | 42f7740 | 2006-08-15 21:38:07 -0700 | [diff] [blame] | 522 | # Empty... |
| 523 | EXTRA_PROGRAMS = |
Andreas Ericsson | d6ebd25 | 2005-11-22 00:44:15 +0100 | [diff] [blame] | 524 | |
Junio C Hamano | 74ca5e6 | 2008-03-12 01:46:26 -0700 | [diff] [blame] | 525 | # ... and all the rest that could be moved out of bindir to gitexecdir |
| 526 | PROGRAMS += $(EXTRA_PROGRAMS) |
Jonathan Nieder | 1b22c99 | 2010-01-26 09:54:23 -0600 | [diff] [blame] | 527 | |
Nguyễn Thái Ngọc Duy | 8275905 | 2012-05-04 20:52:36 +0700 | [diff] [blame] | 528 | PROGRAM_OBJS += credential-store.o |
Erik Faye-Lund | a666b47 | 2010-11-04 02:35:24 +0100 | [diff] [blame] | 529 | PROGRAM_OBJS += daemon.o |
Jonathan Nieder | 1b22c99 | 2010-01-26 09:54:23 -0600 | [diff] [blame] | 530 | PROGRAM_OBJS += fast-import.o |
Nguyễn Thái Ngọc Duy | 8275905 | 2012-05-04 20:52:36 +0700 | [diff] [blame] | 531 | PROGRAM_OBJS += http-backend.o |
Jonathan Nieder | 1b22c99 | 2010-01-26 09:54:23 -0600 | [diff] [blame] | 532 | PROGRAM_OBJS += imap-send.o |
Nguyễn Thái Ngọc Duy | 8275905 | 2012-05-04 20:52:36 +0700 | [diff] [blame] | 533 | PROGRAM_OBJS += sh-i18n--envsubst.o |
Jonathan Nieder | 1b22c99 | 2010-01-26 09:54:23 -0600 | [diff] [blame] | 534 | PROGRAM_OBJS += shell.o |
| 535 | PROGRAM_OBJS += show-index.o |
| 536 | PROGRAM_OBJS += upload-pack.o |
Florian Achleitner | 48ea9f9 | 2012-09-19 17:21:16 +0200 | [diff] [blame] | 537 | PROGRAM_OBJS += remote-testsvn.o |
Jonathan Nieder | 1b22c99 | 2010-01-26 09:54:23 -0600 | [diff] [blame] | 538 | |
Michael Palimaka | ace5e97 | 2012-02-08 21:59:04 +1100 | [diff] [blame] | 539 | # Binary suffix, set to .exe for Windows builds |
| 540 | X = |
| 541 | |
Jonathan Nieder | 1b22c99 | 2010-01-26 09:54:23 -0600 | [diff] [blame] | 542 | PROGRAMS += $(patsubst %.o,git-%$X,$(PROGRAM_OBJS)) |
Junio C Hamano | 74ca5e6 | 2008-03-12 01:46:26 -0700 | [diff] [blame] | 543 | |
Jonathan Nieder | 225f78c | 2010-01-26 10:08:44 -0600 | [diff] [blame] | 544 | TEST_PROGRAMS_NEED_X += test-chmtime |
| 545 | TEST_PROGRAMS_NEED_X += test-ctype |
| 546 | TEST_PROGRAMS_NEED_X += test-date |
| 547 | TEST_PROGRAMS_NEED_X += test-delta |
| 548 | TEST_PROGRAMS_NEED_X += test-dump-cache-tree |
| 549 | TEST_PROGRAMS_NEED_X += test-genrandom |
Jeff King | d192508 | 2011-05-19 17:24:24 -0400 | [diff] [blame] | 550 | TEST_PROGRAMS_NEED_X += test-index-version |
David Barr | 3bbaec0 | 2010-08-09 17:39:43 -0500 | [diff] [blame] | 551 | TEST_PROGRAMS_NEED_X += test-line-buffer |
Jonathan Nieder | 225f78c | 2010-01-26 10:08:44 -0600 | [diff] [blame] | 552 | TEST_PROGRAMS_NEED_X += test-match-trees |
René Scharfe | 0db71e0 | 2012-04-01 00:10:11 +0200 | [diff] [blame] | 553 | TEST_PROGRAMS_NEED_X += test-mergesort |
Jeff King | d192508 | 2011-05-19 17:24:24 -0400 | [diff] [blame] | 554 | TEST_PROGRAMS_NEED_X += test-mktemp |
Jonathan Nieder | 225f78c | 2010-01-26 10:08:44 -0600 | [diff] [blame] | 555 | TEST_PROGRAMS_NEED_X += test-parse-options |
| 556 | TEST_PROGRAMS_NEED_X += test-path-utils |
Ramsay Jones | c918415 | 2012-09-01 18:46:54 +0100 | [diff] [blame] | 557 | TEST_PROGRAMS_NEED_X += test-regex |
Heiko Voigt | bcc0a3e | 2012-03-29 09:21:21 +0200 | [diff] [blame] | 558 | TEST_PROGRAMS_NEED_X += test-revision-walking |
Jonathan Nieder | 225f78c | 2010-01-26 10:08:44 -0600 | [diff] [blame] | 559 | TEST_PROGRAMS_NEED_X += test-run-command |
Nguyễn Thái Ngọc Duy | 8275905 | 2012-05-04 20:52:36 +0700 | [diff] [blame] | 560 | TEST_PROGRAMS_NEED_X += test-scrap-cache-tree |
Jonathan Nieder | 225f78c | 2010-01-26 10:08:44 -0600 | [diff] [blame] | 561 | TEST_PROGRAMS_NEED_X += test-sha1 |
| 562 | TEST_PROGRAMS_NEED_X += test-sigchain |
Michael Haggerty | ff919f9 | 2012-09-12 16:04:43 +0200 | [diff] [blame] | 563 | TEST_PROGRAMS_NEED_X += test-string-list |
Nguyễn Thái Ngọc Duy | 0ed7481 | 2010-12-27 08:26:04 +0700 | [diff] [blame] | 564 | TEST_PROGRAMS_NEED_X += test-subprocess |
David Barr | 21746aa | 2010-08-09 17:55:00 -0500 | [diff] [blame] | 565 | TEST_PROGRAMS_NEED_X += test-svn-fe |
Nguyễn Thái Ngọc Duy | feabcc1 | 2012-10-15 13:25:55 +0700 | [diff] [blame] | 566 | TEST_PROGRAMS_NEED_X += test-wildmatch |
Jonathan Nieder | 225f78c | 2010-01-26 10:08:44 -0600 | [diff] [blame] | 567 | |
Junio C Hamano | a026d53 | 2010-03-02 12:44:08 -0800 | [diff] [blame] | 568 | TEST_PROGRAMS = $(patsubst %,%$X,$(TEST_PROGRAMS_NEED_X)) |
Andreas Ericsson | d6ebd25 | 2005-11-22 00:44:15 +0100 | [diff] [blame] | 569 | |
Junio C Hamano | 1736855 | 2008-02-23 11:08:25 -0800 | [diff] [blame] | 570 | # List built-in command $C whose implementation cmd_$C() is not in |
Linus Torvalds | 81b50f3 | 2010-02-22 08:42:18 -0800 | [diff] [blame] | 571 | # builtin/$C.o but is linked in as part of some other command. |
| 572 | BUILT_INS += $(patsubst builtin/%.o,git-%$X,$(BUILTIN_OBJS)) |
Junio C Hamano | 74ca5e6 | 2008-03-12 01:46:26 -0700 | [diff] [blame] | 573 | |
Junio C Hamano | 74ca5e6 | 2008-03-12 01:46:26 -0700 | [diff] [blame] | 574 | BUILT_INS += git-cherry$X |
Stephan Beyer | fcb6c07 | 2009-02-09 23:00:45 +0100 | [diff] [blame] | 575 | BUILT_INS += git-cherry-pick$X |
Junio C Hamano | 74ca5e6 | 2008-03-12 01:46:26 -0700 | [diff] [blame] | 576 | BUILT_INS += git-format-patch$X |
| 577 | BUILT_INS += git-fsck-objects$X |
| 578 | BUILT_INS += git-get-tar-commit-id$X |
| 579 | BUILT_INS += git-init$X |
| 580 | BUILT_INS += git-merge-subtree$X |
| 581 | BUILT_INS += git-peek-remote$X |
| 582 | BUILT_INS += git-repo-config$X |
| 583 | BUILT_INS += git-show$X |
Junio C Hamano | 24b1f65 | 2008-12-03 00:30:34 -0800 | [diff] [blame] | 584 | BUILT_INS += git-stage$X |
Junio C Hamano | 74ca5e6 | 2008-03-12 01:46:26 -0700 | [diff] [blame] | 585 | BUILT_INS += git-status$X |
| 586 | BUILT_INS += git-whatchanged$X |
Junio C Hamano | 9173080 | 2006-04-10 17:37:58 -0700 | [diff] [blame] | 587 | |
Junio C Hamano | ad17f01 | 2009-08-07 12:09:29 -0700 | [diff] [blame] | 588 | # what 'all' will build and 'install' will install in gitexecdir, |
| 589 | # excluding programs for built-in commands |
Junio C Hamano | 6506e15 | 2007-02-06 21:27:09 -0800 | [diff] [blame] | 590 | ALL_PROGRAMS = $(PROGRAMS) $(SCRIPTS) |
Linus Torvalds | e83c516 | 2005-04-07 15:13:13 -0700 | [diff] [blame] | 591 | |
Eygene Ryabinkin | 3cfaf11 | 2007-03-28 04:00:23 -0700 | [diff] [blame] | 592 | # what 'all' will build but not install in gitexecdir |
Jeff King | 499c293 | 2009-04-03 15:32:20 -0400 | [diff] [blame] | 593 | OTHER_PROGRAMS = git$X |
Eygene Ryabinkin | 3cfaf11 | 2007-03-28 04:00:23 -0700 | [diff] [blame] | 594 | |
Matthew Ogilvie | ea92519 | 2009-12-02 22:14:05 -0700 | [diff] [blame] | 595 | # what test wrappers are needed and 'install' will install, in bindir |
| 596 | BINDIR_PROGRAMS_NEED_X += git |
| 597 | BINDIR_PROGRAMS_NEED_X += git-upload-pack |
| 598 | BINDIR_PROGRAMS_NEED_X += git-receive-pack |
| 599 | BINDIR_PROGRAMS_NEED_X += git-upload-archive |
| 600 | BINDIR_PROGRAMS_NEED_X += git-shell |
| 601 | |
| 602 | BINDIR_PROGRAMS_NO_X += git-cvsserver |
| 603 | |
Ryan Anderson | 3d32051 | 2005-11-21 00:11:22 -0500 | [diff] [blame] | 604 | # Set paths to tools early so that they can be used for version tests. |
| 605 | ifndef SHELL_PATH |
| 606 | SHELL_PATH = /bin/sh |
| 607 | endif |
| 608 | ifndef PERL_PATH |
| 609 | PERL_PATH = /usr/bin/perl |
| 610 | endif |
Johan Herland | d4e1b47 | 2009-11-18 02:42:31 +0100 | [diff] [blame] | 611 | ifndef PYTHON_PATH |
| 612 | PYTHON_PATH = /usr/bin/python |
| 613 | endif |
Junio C Hamano | 720d150 | 2005-09-10 17:46:27 -0700 | [diff] [blame] | 614 | |
Luben Tuikov | 3a79347 | 2006-12-14 23:03:03 -0800 | [diff] [blame] | 615 | export PERL_PATH |
Johan Herland | d4e1b47 | 2009-11-18 02:42:31 +0100 | [diff] [blame] | 616 | export PYTHON_PATH |
Luben Tuikov | 3a79347 | 2006-12-14 23:03:03 -0800 | [diff] [blame] | 617 | |
Stefano Lattarini | dd6fc7c | 2012-12-09 11:36:17 +0100 | [diff] [blame] | 618 | LIB_FILE = libgit.a |
| 619 | XDIFF_LIB = xdiff/lib.a |
| 620 | VCSSVN_LIB = vcs-svn/lib.a |
Linus Torvalds | 0a02ce7 | 2005-04-18 12:49:39 -0700 | [diff] [blame] | 621 | |
Jonathan Nieder | 60d24dd | 2012-07-06 22:39:18 -0500 | [diff] [blame] | 622 | LIB_H += xdiff/xinclude.h |
| 623 | LIB_H += xdiff/xmacros.h |
| 624 | LIB_H += xdiff/xdiff.h |
| 625 | LIB_H += xdiff/xtypes.h |
| 626 | LIB_H += xdiff/xutils.h |
| 627 | LIB_H += xdiff/xprepare.h |
| 628 | LIB_H += xdiff/xdiffi.h |
| 629 | LIB_H += xdiff/xemit.h |
Nguyễn Thái Ngọc Duy | 1b8b2e4 | 2012-04-23 19:30:21 +0700 | [diff] [blame] | 630 | |
Jonathan Nieder | 60d24dd | 2012-07-06 22:39:18 -0500 | [diff] [blame] | 631 | LIB_H += vcs-svn/line_buffer.h |
| 632 | LIB_H += vcs-svn/sliding_window.h |
| 633 | LIB_H += vcs-svn/repo_tree.h |
| 634 | LIB_H += vcs-svn/fast_export.h |
| 635 | LIB_H += vcs-svn/svndiff.h |
| 636 | LIB_H += vcs-svn/svndump.h |
Nguyễn Thái Ngọc Duy | 1b8b2e4 | 2012-04-23 19:30:21 +0700 | [diff] [blame] | 637 | |
Jeff King | b8ba629 | 2012-06-20 14:30:56 -0400 | [diff] [blame] | 638 | GENERATED_H += common-cmds.h |
Nguyễn Thái Ngọc Duy | 1b8b2e4 | 2012-04-23 19:30:21 +0700 | [diff] [blame] | 639 | |
Jeff King | 7519443 | 2009-09-09 07:38:58 -0400 | [diff] [blame] | 640 | LIB_H += advice.h |
Junio C Hamano | 74ca5e6 | 2008-03-12 01:46:26 -0700 | [diff] [blame] | 641 | LIB_H += archive.h |
Jeff King | c1189ca | 2011-09-13 17:57:57 -0400 | [diff] [blame] | 642 | LIB_H += argv-array.h |
Junio C Hamano | 74ca5e6 | 2008-03-12 01:46:26 -0700 | [diff] [blame] | 643 | LIB_H += attr.h |
Jeff King | b8ba629 | 2012-06-20 14:30:56 -0400 | [diff] [blame] | 644 | LIB_H += bisect.h |
Junio C Hamano | 74ca5e6 | 2008-03-12 01:46:26 -0700 | [diff] [blame] | 645 | LIB_H += blob.h |
Jeff King | b8ba629 | 2012-06-20 14:30:56 -0400 | [diff] [blame] | 646 | LIB_H += branch.h |
Junio C Hamano | 74ca5e6 | 2008-03-12 01:46:26 -0700 | [diff] [blame] | 647 | LIB_H += builtin.h |
Junio C Hamano | 568508e | 2011-10-28 14:48:40 -0700 | [diff] [blame] | 648 | LIB_H += bulk-checkin.h |
Jeff King | b8ba629 | 2012-06-20 14:30:56 -0400 | [diff] [blame] | 649 | LIB_H += bundle.h |
Junio C Hamano | 74ca5e6 | 2008-03-12 01:46:26 -0700 | [diff] [blame] | 650 | LIB_H += cache-tree.h |
Jeff King | fc89003 | 2012-06-20 14:30:08 -0400 | [diff] [blame] | 651 | LIB_H += cache.h |
Jonathan Nieder | 21528ab | 2010-01-26 09:44:47 -0600 | [diff] [blame] | 652 | LIB_H += color.h |
Jeff King | b8ba629 | 2012-06-20 14:30:56 -0400 | [diff] [blame] | 653 | LIB_H += column.h |
Junio C Hamano | 74ca5e6 | 2008-03-12 01:46:26 -0700 | [diff] [blame] | 654 | LIB_H += commit.h |
Dmitry V. Levin | 7545712 | 2009-11-02 02:09:05 +0300 | [diff] [blame] | 655 | LIB_H += compat/bswap.h |
Dmitry Potapov | adbc0b6 | 2008-09-30 17:53:47 +0400 | [diff] [blame] | 656 | LIB_H += compat/cygwin.h |
Stephan Beyer | fcb6c07 | 2009-02-09 23:00:45 +0100 | [diff] [blame] | 657 | LIB_H += compat/mingw.h |
Fredrik Kuivinen | e831171 | 2011-08-21 00:40:40 +0200 | [diff] [blame] | 658 | LIB_H += compat/obstack.h |
Joachim Schmitz | 6d45eb1 | 2012-09-17 23:16:39 +0200 | [diff] [blame] | 659 | LIB_H += compat/poll/poll.h |
Torsten Bögershausen | 76759c7 | 2012-07-08 15:50:25 +0200 | [diff] [blame] | 660 | LIB_H += compat/precompose_utf8.h |
Jeff King | 21aeafc | 2011-12-10 05:41:01 -0500 | [diff] [blame] | 661 | LIB_H += compat/terminal.h |
Nguyễn Thái Ngọc Duy | 8275905 | 2012-05-04 20:52:36 +0700 | [diff] [blame] | 662 | LIB_H += compat/win32/dirent.h |
Andrzej K. Haczewski | 44626dc | 2010-01-15 21:12:20 +0100 | [diff] [blame] | 663 | LIB_H += compat/win32/pthread.h |
Mike Pape | 088d880 | 2010-11-04 02:35:10 +0100 | [diff] [blame] | 664 | LIB_H += compat/win32/syslog.h |
Junio C Hamano | f96400c | 2011-09-02 16:33:22 -0700 | [diff] [blame] | 665 | LIB_H += connected.h |
Jonathan Nieder | 487da9c | 2011-11-18 04:02:02 -0600 | [diff] [blame] | 666 | LIB_H += convert.h |
Jeff King | abca927 | 2011-12-10 05:31:11 -0500 | [diff] [blame] | 667 | LIB_H += credential.h |
Junio C Hamano | 74ca5e6 | 2008-03-12 01:46:26 -0700 | [diff] [blame] | 668 | LIB_H += csum-file.h |
| 669 | LIB_H += decorate.h |
| 670 | LIB_H += delta.h |
Junio C Hamano | 74ca5e6 | 2008-03-12 01:46:26 -0700 | [diff] [blame] | 671 | LIB_H += diff.h |
Nguyễn Thái Ngọc Duy | 8275905 | 2012-05-04 20:52:36 +0700 | [diff] [blame] | 672 | LIB_H += diffcore.h |
Junio C Hamano | 74ca5e6 | 2008-03-12 01:46:26 -0700 | [diff] [blame] | 673 | LIB_H += dir.h |
Jonathan Nieder | 21528ab | 2010-01-26 09:44:47 -0600 | [diff] [blame] | 674 | LIB_H += exec_cmd.h |
Jeff King | b8ba629 | 2012-06-20 14:30:56 -0400 | [diff] [blame] | 675 | LIB_H += fetch-pack.h |
Junio C Hamano | 898eacd | 2011-10-06 23:12:09 -0700 | [diff] [blame] | 676 | LIB_H += fmt-merge-msg.h |
Junio C Hamano | 74ca5e6 | 2008-03-12 01:46:26 -0700 | [diff] [blame] | 677 | LIB_H += fsck.h |
Ævar Arnfjörð Bjarmason | 6578483 | 2011-02-22 23:41:20 +0000 | [diff] [blame] | 678 | LIB_H += gettext.h |
Junio C Hamano | 74ca5e6 | 2008-03-12 01:46:26 -0700 | [diff] [blame] | 679 | LIB_H += git-compat-util.h |
Junio C Hamano | 2f47eae | 2011-09-07 21:19:47 -0700 | [diff] [blame] | 680 | LIB_H += gpg-interface.h |
Adam Simpkins | c12172d | 2008-05-04 03:36:53 -0700 | [diff] [blame] | 681 | LIB_H += graph.h |
Junio C Hamano | 74ca5e6 | 2008-03-12 01:46:26 -0700 | [diff] [blame] | 682 | LIB_H += grep.h |
| 683 | LIB_H += hash.h |
Miklos Vajna | 940208a | 2008-07-30 01:16:58 +0200 | [diff] [blame] | 684 | LIB_H += help.h |
Jeff King | b8ba629 | 2012-06-20 14:30:56 -0400 | [diff] [blame] | 685 | LIB_H += http.h |
Fredrik Kuivinen | b95c5ad | 2011-08-21 00:41:57 +0200 | [diff] [blame] | 686 | LIB_H += kwset.h |
Johannes Schindelin | 8af84da | 2008-08-31 15:50:23 +0200 | [diff] [blame] | 687 | LIB_H += levenshtein.h |
Junio C Hamano | 74ca5e6 | 2008-03-12 01:46:26 -0700 | [diff] [blame] | 688 | LIB_H += list-objects.h |
| 689 | LIB_H += ll-merge.h |
| 690 | LIB_H += log-tree.h |
| 691 | LIB_H += mailmap.h |
Ramsay Jones | a60521b | 2013-01-22 16:47:47 +0000 | [diff] [blame] | 692 | LIB_H += merge-blobs.h |
Miklos Vajna | db3a954 | 2008-09-03 01:49:05 +0200 | [diff] [blame] | 693 | LIB_H += merge-recursive.h |
René Scharfe | 0db71e0 | 2012-04-01 00:10:11 +0200 | [diff] [blame] | 694 | LIB_H += mergesort.h |
Jeff King | a941d5e | 2010-04-01 20:07:40 -0400 | [diff] [blame] | 695 | LIB_H += notes-cache.h |
Johan Herland | 75ef3f4 | 2010-11-09 22:49:46 +0100 | [diff] [blame] | 696 | LIB_H += notes-merge.h |
Jeff King | fc89003 | 2012-06-20 14:30:08 -0400 | [diff] [blame] | 697 | LIB_H += notes.h |
Junio C Hamano | 74ca5e6 | 2008-03-12 01:46:26 -0700 | [diff] [blame] | 698 | LIB_H += object.h |
Johan Herland | 94e724a | 2008-06-15 16:05:06 +0200 | [diff] [blame] | 699 | LIB_H += pack-refs.h |
Junio C Hamano | 74ca5e6 | 2008-03-12 01:46:26 -0700 | [diff] [blame] | 700 | LIB_H += pack-revindex.h |
Jeff King | fc89003 | 2012-06-20 14:30:08 -0400 | [diff] [blame] | 701 | LIB_H += pack.h |
Junio C Hamano | 74ca5e6 | 2008-03-12 01:46:26 -0700 | [diff] [blame] | 702 | LIB_H += parse-options.h |
| 703 | LIB_H += patch-ids.h |
Adam Spiers | 6f525e7 | 2013-01-06 16:58:08 +0000 | [diff] [blame] | 704 | LIB_H += pathspec.h |
Junio C Hamano | 74ca5e6 | 2008-03-12 01:46:26 -0700 | [diff] [blame] | 705 | LIB_H += pkt-line.h |
| 706 | LIB_H += progress.h |
Jeff King | d3c58b8 | 2011-12-10 05:40:54 -0500 | [diff] [blame] | 707 | LIB_H += prompt.h |
Junio C Hamano | 74ca5e6 | 2008-03-12 01:46:26 -0700 | [diff] [blame] | 708 | LIB_H += quote.h |
Jeff King | b8ba629 | 2012-06-20 14:30:56 -0400 | [diff] [blame] | 709 | LIB_H += reachable.h |
Junio C Hamano | 74ca5e6 | 2008-03-12 01:46:26 -0700 | [diff] [blame] | 710 | LIB_H += reflog-walk.h |
| 711 | LIB_H += refs.h |
| 712 | LIB_H += remote.h |
Stephan Beyer | 5b2fd95 | 2008-07-09 14:58:57 +0200 | [diff] [blame] | 713 | LIB_H += rerere.h |
Junio C Hamano | cfc5789 | 2009-12-25 00:30:51 -0800 | [diff] [blame] | 714 | LIB_H += resolve-undo.h |
Junio C Hamano | 74ca5e6 | 2008-03-12 01:46:26 -0700 | [diff] [blame] | 715 | LIB_H += revision.h |
| 716 | LIB_H += run-command.h |
Jeff King | b8ba629 | 2012-06-20 14:30:56 -0400 | [diff] [blame] | 717 | LIB_H += send-pack.h |
Ramkumar Ramachandra | 26ae337 | 2011-08-04 16:09:11 +0530 | [diff] [blame] | 718 | LIB_H += sequencer.h |
Jeff King | 902bb36 | 2011-05-19 17:34:33 -0400 | [diff] [blame] | 719 | LIB_H += sha1-array.h |
Junio C Hamano | 628522e | 2007-12-29 02:05:47 -0800 | [diff] [blame] | 720 | LIB_H += sha1-lookup.h |
Jeff King | b8ba629 | 2012-06-20 14:30:56 -0400 | [diff] [blame] | 721 | LIB_H += shortlog.h |
Junio C Hamano | 74ca5e6 | 2008-03-12 01:46:26 -0700 | [diff] [blame] | 722 | LIB_H += sideband.h |
Jeff King | 4a16d07 | 2009-01-22 01:02:35 -0500 | [diff] [blame] | 723 | LIB_H += sigchain.h |
Junio C Hamano | 74ca5e6 | 2008-03-12 01:46:26 -0700 | [diff] [blame] | 724 | LIB_H += strbuf.h |
Junio C Hamano | 46bf043 | 2011-05-11 19:30:25 -0700 | [diff] [blame] | 725 | LIB_H += streaming.h |
Stephan Beyer | fcb6c07 | 2009-02-09 23:00:45 +0100 | [diff] [blame] | 726 | LIB_H += string-list.h |
Johannes Schindelin | 752c0c2 | 2009-10-19 14:38:32 +0200 | [diff] [blame] | 727 | LIB_H += submodule.h |
Junio C Hamano | 74ca5e6 | 2008-03-12 01:46:26 -0700 | [diff] [blame] | 728 | LIB_H += tag.h |
Jeff King | b8ba629 | 2012-06-20 14:30:56 -0400 | [diff] [blame] | 729 | LIB_H += tar.h |
Dmitry V. Levin | 39cb644 | 2012-02-25 03:42:42 +0400 | [diff] [blame] | 730 | LIB_H += thread-utils.h |
Junio C Hamano | 74ca5e6 | 2008-03-12 01:46:26 -0700 | [diff] [blame] | 731 | LIB_H += transport.h |
Junio C Hamano | 74ca5e6 | 2008-03-12 01:46:26 -0700 | [diff] [blame] | 732 | LIB_H += tree-walk.h |
Jeff King | fc89003 | 2012-06-20 14:30:08 -0400 | [diff] [blame] | 733 | LIB_H += tree.h |
Junio C Hamano | 74ca5e6 | 2008-03-12 01:46:26 -0700 | [diff] [blame] | 734 | LIB_H += unpack-trees.h |
Jeff King | b8ba629 | 2012-06-20 14:30:56 -0400 | [diff] [blame] | 735 | LIB_H += url.h |
Jeff King | be58e70 | 2008-10-05 17:43:21 -0400 | [diff] [blame] | 736 | LIB_H += userdiff.h |
Junio C Hamano | 74ca5e6 | 2008-03-12 01:46:26 -0700 | [diff] [blame] | 737 | LIB_H += utf8.h |
Junio C Hamano | d2c1898 | 2012-04-03 15:53:08 -0700 | [diff] [blame] | 738 | LIB_H += varint.h |
Jeff King | b8ba629 | 2012-06-20 14:30:56 -0400 | [diff] [blame] | 739 | LIB_H += walker.h |
Nguyễn Thái Ngọc Duy | feabcc1 | 2012-10-15 13:25:55 +0700 | [diff] [blame] | 740 | LIB_H += wildmatch.h |
Jeff King | b8ba629 | 2012-06-20 14:30:56 -0400 | [diff] [blame] | 741 | LIB_H += wt-status.h |
Jonathan Nieder | 21528ab | 2010-01-26 09:44:47 -0600 | [diff] [blame] | 742 | LIB_H += xdiff-interface.h |
| 743 | LIB_H += xdiff/xdiff.h |
Junio C Hamano | 8f3f9b0 | 2005-07-23 17:54:41 -0700 | [diff] [blame] | 744 | |
Dmitry Potapov | 5b8e6f8 | 2008-06-28 00:46:42 +0400 | [diff] [blame] | 745 | LIB_OBJS += abspath.o |
Jeff King | 7519443 | 2009-09-09 07:38:58 -0400 | [diff] [blame] | 746 | LIB_OBJS += advice.o |
Junio C Hamano | 74ca5e6 | 2008-03-12 01:46:26 -0700 | [diff] [blame] | 747 | LIB_OBJS += alias.o |
| 748 | LIB_OBJS += alloc.o |
| 749 | LIB_OBJS += archive.o |
| 750 | LIB_OBJS += archive-tar.o |
| 751 | LIB_OBJS += archive-zip.o |
Jeff King | c1189ca | 2011-09-13 17:57:57 -0400 | [diff] [blame] | 752 | LIB_OBJS += argv-array.o |
Junio C Hamano | 74ca5e6 | 2008-03-12 01:46:26 -0700 | [diff] [blame] | 753 | LIB_OBJS += attr.o |
| 754 | LIB_OBJS += base85.o |
Christian Couder | a2ad79c | 2009-03-26 05:55:24 +0100 | [diff] [blame] | 755 | LIB_OBJS += bisect.o |
Junio C Hamano | 74ca5e6 | 2008-03-12 01:46:26 -0700 | [diff] [blame] | 756 | LIB_OBJS += blob.o |
| 757 | LIB_OBJS += branch.o |
Junio C Hamano | 568508e | 2011-10-28 14:48:40 -0700 | [diff] [blame] | 758 | LIB_OBJS += bulk-checkin.o |
Junio C Hamano | 74ca5e6 | 2008-03-12 01:46:26 -0700 | [diff] [blame] | 759 | LIB_OBJS += bundle.o |
| 760 | LIB_OBJS += cache-tree.o |
| 761 | LIB_OBJS += color.o |
Nguyễn Thái Ngọc Duy | 7e29b82 | 2012-04-21 11:44:32 +0700 | [diff] [blame] | 762 | LIB_OBJS += column.o |
Junio C Hamano | 74ca5e6 | 2008-03-12 01:46:26 -0700 | [diff] [blame] | 763 | LIB_OBJS += combine-diff.o |
| 764 | LIB_OBJS += commit.o |
Fredrik Kuivinen | e831171 | 2011-08-21 00:40:40 +0200 | [diff] [blame] | 765 | LIB_OBJS += compat/obstack.o |
Jeff King | 21aeafc | 2011-12-10 05:41:01 -0500 | [diff] [blame] | 766 | LIB_OBJS += compat/terminal.o |
Junio C Hamano | 74ca5e6 | 2008-03-12 01:46:26 -0700 | [diff] [blame] | 767 | LIB_OBJS += config.o |
| 768 | LIB_OBJS += connect.o |
Junio C Hamano | f96400c | 2011-09-02 16:33:22 -0700 | [diff] [blame] | 769 | LIB_OBJS += connected.o |
Junio C Hamano | 74ca5e6 | 2008-03-12 01:46:26 -0700 | [diff] [blame] | 770 | LIB_OBJS += convert.o |
| 771 | LIB_OBJS += copy.o |
Jeff King | abca927 | 2011-12-10 05:31:11 -0500 | [diff] [blame] | 772 | LIB_OBJS += credential.o |
Junio C Hamano | 74ca5e6 | 2008-03-12 01:46:26 -0700 | [diff] [blame] | 773 | LIB_OBJS += csum-file.o |
| 774 | LIB_OBJS += ctype.o |
| 775 | LIB_OBJS += date.o |
| 776 | LIB_OBJS += decorate.o |
| 777 | LIB_OBJS += diffcore-break.o |
| 778 | LIB_OBJS += diffcore-delta.o |
| 779 | LIB_OBJS += diffcore-order.o |
| 780 | LIB_OBJS += diffcore-pickaxe.o |
| 781 | LIB_OBJS += diffcore-rename.o |
| 782 | LIB_OBJS += diff-delta.o |
| 783 | LIB_OBJS += diff-lib.o |
Stephan Beyer | fcb6c07 | 2009-02-09 23:00:45 +0100 | [diff] [blame] | 784 | LIB_OBJS += diff-no-index.o |
Junio C Hamano | 74ca5e6 | 2008-03-12 01:46:26 -0700 | [diff] [blame] | 785 | LIB_OBJS += diff.o |
| 786 | LIB_OBJS += dir.o |
Stephan Beyer | d82f33e | 2008-07-25 18:28:41 +0200 | [diff] [blame] | 787 | LIB_OBJS += editor.o |
Junio C Hamano | 74ca5e6 | 2008-03-12 01:46:26 -0700 | [diff] [blame] | 788 | LIB_OBJS += entry.o |
| 789 | LIB_OBJS += environment.o |
| 790 | LIB_OBJS += exec_cmd.o |
Nguyễn Thái Ngọc Duy | 745f7a8 | 2012-10-26 22:53:55 +0700 | [diff] [blame] | 791 | LIB_OBJS += fetch-pack.o |
Junio C Hamano | 74ca5e6 | 2008-03-12 01:46:26 -0700 | [diff] [blame] | 792 | LIB_OBJS += fsck.o |
Ævar Arnfjörð Bjarmason | 5e9637c | 2011-11-18 00:14:42 +0100 | [diff] [blame] | 793 | LIB_OBJS += gettext.o |
Nguyễn Thái Ngọc Duy | 8275905 | 2012-05-04 20:52:36 +0700 | [diff] [blame] | 794 | LIB_OBJS += gpg-interface.o |
Adam Simpkins | c12172d | 2008-05-04 03:36:53 -0700 | [diff] [blame] | 795 | LIB_OBJS += graph.o |
Junio C Hamano | 74ca5e6 | 2008-03-12 01:46:26 -0700 | [diff] [blame] | 796 | LIB_OBJS += grep.o |
| 797 | LIB_OBJS += hash.o |
| 798 | LIB_OBJS += help.o |
Linus Torvalds | a503121 | 2010-01-21 15:25:19 -0800 | [diff] [blame] | 799 | LIB_OBJS += hex.o |
Junio C Hamano | 74ca5e6 | 2008-03-12 01:46:26 -0700 | [diff] [blame] | 800 | LIB_OBJS += ident.o |
Fredrik Kuivinen | b95c5ad | 2011-08-21 00:41:57 +0200 | [diff] [blame] | 801 | LIB_OBJS += kwset.o |
Johannes Schindelin | 8af84da | 2008-08-31 15:50:23 +0200 | [diff] [blame] | 802 | LIB_OBJS += levenshtein.o |
Junio C Hamano | 74ca5e6 | 2008-03-12 01:46:26 -0700 | [diff] [blame] | 803 | LIB_OBJS += list-objects.o |
| 804 | LIB_OBJS += ll-merge.o |
| 805 | LIB_OBJS += lockfile.o |
| 806 | LIB_OBJS += log-tree.o |
| 807 | LIB_OBJS += mailmap.o |
| 808 | LIB_OBJS += match-trees.o |
Nguyễn Thái Ngọc Duy | db699a8 | 2012-10-26 22:53:49 +0700 | [diff] [blame] | 809 | LIB_OBJS += merge.o |
Junio C Hamano | fa2364e | 2012-12-06 15:08:01 -0800 | [diff] [blame] | 810 | LIB_OBJS += merge-blobs.o |
Miklos Vajna | 9047ebb | 2008-08-12 18:45:14 +0200 | [diff] [blame] | 811 | LIB_OBJS += merge-recursive.o |
René Scharfe | 0db71e0 | 2012-04-01 00:10:11 +0200 | [diff] [blame] | 812 | LIB_OBJS += mergesort.o |
Linus Torvalds | 96872bc | 2008-03-21 13:16:24 -0700 | [diff] [blame] | 813 | LIB_OBJS += name-hash.o |
Johannes Schindelin | a97a746 | 2009-10-09 12:21:57 +0200 | [diff] [blame] | 814 | LIB_OBJS += notes.o |
Jeff King | a941d5e | 2010-04-01 20:07:40 -0400 | [diff] [blame] | 815 | LIB_OBJS += notes-cache.o |
Johan Herland | 75ef3f4 | 2010-11-09 22:49:46 +0100 | [diff] [blame] | 816 | LIB_OBJS += notes-merge.o |
Junio C Hamano | 74ca5e6 | 2008-03-12 01:46:26 -0700 | [diff] [blame] | 817 | LIB_OBJS += object.o |
| 818 | LIB_OBJS += pack-check.o |
Johan Herland | 94e724a | 2008-06-15 16:05:06 +0200 | [diff] [blame] | 819 | LIB_OBJS += pack-refs.o |
Junio C Hamano | 74ca5e6 | 2008-03-12 01:46:26 -0700 | [diff] [blame] | 820 | LIB_OBJS += pack-revindex.o |
| 821 | LIB_OBJS += pack-write.o |
| 822 | LIB_OBJS += pager.o |
| 823 | LIB_OBJS += parse-options.o |
Dmitry Ivankov | 0687628 | 2011-08-11 15:15:38 +0600 | [diff] [blame] | 824 | LIB_OBJS += parse-options-cb.o |
Junio C Hamano | 74ca5e6 | 2008-03-12 01:46:26 -0700 | [diff] [blame] | 825 | LIB_OBJS += patch-delta.o |
| 826 | LIB_OBJS += patch-ids.o |
Junio C Hamano | 74ca5e6 | 2008-03-12 01:46:26 -0700 | [diff] [blame] | 827 | LIB_OBJS += path.o |
Adam Spiers | 6f525e7 | 2013-01-06 16:58:08 +0000 | [diff] [blame] | 828 | LIB_OBJS += pathspec.o |
Junio C Hamano | 74ca5e6 | 2008-03-12 01:46:26 -0700 | [diff] [blame] | 829 | LIB_OBJS += pkt-line.o |
Stephan Beyer | fcb6c07 | 2009-02-09 23:00:45 +0100 | [diff] [blame] | 830 | LIB_OBJS += preload-index.o |
Junio C Hamano | 74ca5e6 | 2008-03-12 01:46:26 -0700 | [diff] [blame] | 831 | LIB_OBJS += pretty.o |
| 832 | LIB_OBJS += progress.o |
Jeff King | d3c58b8 | 2011-12-10 05:40:54 -0500 | [diff] [blame] | 833 | LIB_OBJS += prompt.o |
Junio C Hamano | 74ca5e6 | 2008-03-12 01:46:26 -0700 | [diff] [blame] | 834 | LIB_OBJS += quote.o |
| 835 | LIB_OBJS += reachable.o |
| 836 | LIB_OBJS += read-cache.o |
| 837 | LIB_OBJS += reflog-walk.o |
| 838 | LIB_OBJS += refs.o |
| 839 | LIB_OBJS += remote.o |
Christian Couder | 6809557 | 2009-01-23 10:06:53 +0100 | [diff] [blame] | 840 | LIB_OBJS += replace_object.o |
Stephan Beyer | 5b2fd95 | 2008-07-09 14:58:57 +0200 | [diff] [blame] | 841 | LIB_OBJS += rerere.o |
Junio C Hamano | cfc5789 | 2009-12-25 00:30:51 -0800 | [diff] [blame] | 842 | LIB_OBJS += resolve-undo.o |
Junio C Hamano | 74ca5e6 | 2008-03-12 01:46:26 -0700 | [diff] [blame] | 843 | LIB_OBJS += revision.o |
| 844 | LIB_OBJS += run-command.o |
Nguyễn Thái Ngọc Duy | f5d942e | 2012-10-26 22:53:53 +0700 | [diff] [blame] | 845 | LIB_OBJS += send-pack.o |
Nguyễn Thái Ngọc Duy | 8275905 | 2012-05-04 20:52:36 +0700 | [diff] [blame] | 846 | LIB_OBJS += sequencer.o |
Junio C Hamano | 74ca5e6 | 2008-03-12 01:46:26 -0700 | [diff] [blame] | 847 | LIB_OBJS += server-info.o |
| 848 | LIB_OBJS += setup.o |
Jeff King | 902bb36 | 2011-05-19 17:34:33 -0400 | [diff] [blame] | 849 | LIB_OBJS += sha1-array.o |
Junio C Hamano | 628522e | 2007-12-29 02:05:47 -0800 | [diff] [blame] | 850 | LIB_OBJS += sha1-lookup.o |
Stephan Beyer | fcb6c07 | 2009-02-09 23:00:45 +0100 | [diff] [blame] | 851 | LIB_OBJS += sha1_file.o |
Junio C Hamano | 74ca5e6 | 2008-03-12 01:46:26 -0700 | [diff] [blame] | 852 | LIB_OBJS += sha1_name.o |
| 853 | LIB_OBJS += shallow.o |
| 854 | LIB_OBJS += sideband.o |
Jeff King | 4a16d07 | 2009-01-22 01:02:35 -0500 | [diff] [blame] | 855 | LIB_OBJS += sigchain.o |
Junio C Hamano | 74ca5e6 | 2008-03-12 01:46:26 -0700 | [diff] [blame] | 856 | LIB_OBJS += strbuf.o |
Junio C Hamano | 46bf043 | 2011-05-11 19:30:25 -0700 | [diff] [blame] | 857 | LIB_OBJS += streaming.o |
Stephan Beyer | fcb6c07 | 2009-02-09 23:00:45 +0100 | [diff] [blame] | 858 | LIB_OBJS += string-list.o |
Johannes Schindelin | 752c0c2 | 2009-10-19 14:38:32 +0200 | [diff] [blame] | 859 | LIB_OBJS += submodule.o |
Junio C Hamano | 74ca5e6 | 2008-03-12 01:46:26 -0700 | [diff] [blame] | 860 | LIB_OBJS += symlinks.o |
| 861 | LIB_OBJS += tag.o |
| 862 | LIB_OBJS += trace.o |
| 863 | LIB_OBJS += transport.o |
Daniel Barkalow | 6eb996b | 2009-08-05 01:01:53 -0400 | [diff] [blame] | 864 | LIB_OBJS += transport-helper.o |
Junio C Hamano | 74ca5e6 | 2008-03-12 01:46:26 -0700 | [diff] [blame] | 865 | LIB_OBJS += tree-diff.o |
| 866 | LIB_OBJS += tree.o |
| 867 | LIB_OBJS += tree-walk.o |
| 868 | LIB_OBJS += unpack-trees.o |
Jeff King | 638794c | 2010-05-23 05:17:55 -0400 | [diff] [blame] | 869 | LIB_OBJS += url.o |
Junio C Hamano | 74ca5e6 | 2008-03-12 01:46:26 -0700 | [diff] [blame] | 870 | LIB_OBJS += usage.o |
Stephan Beyer | fcb6c07 | 2009-02-09 23:00:45 +0100 | [diff] [blame] | 871 | LIB_OBJS += userdiff.o |
Junio C Hamano | 74ca5e6 | 2008-03-12 01:46:26 -0700 | [diff] [blame] | 872 | LIB_OBJS += utf8.o |
Junio C Hamano | d2c1898 | 2012-04-03 15:53:08 -0700 | [diff] [blame] | 873 | LIB_OBJS += varint.o |
Jeff King | 816fb46 | 2012-06-02 14:51:42 -0400 | [diff] [blame] | 874 | LIB_OBJS += version.o |
Junio C Hamano | 74ca5e6 | 2008-03-12 01:46:26 -0700 | [diff] [blame] | 875 | LIB_OBJS += walker.o |
Nguyễn Thái Ngọc Duy | feabcc1 | 2012-10-15 13:25:55 +0700 | [diff] [blame] | 876 | LIB_OBJS += wildmatch.o |
Linus Torvalds | 112db55 | 2008-06-22 12:19:25 -0700 | [diff] [blame] | 877 | LIB_OBJS += wrapper.o |
Junio C Hamano | 74ca5e6 | 2008-03-12 01:46:26 -0700 | [diff] [blame] | 878 | LIB_OBJS += write_or_die.o |
| 879 | LIB_OBJS += ws.o |
| 880 | LIB_OBJS += wt-status.o |
| 881 | LIB_OBJS += xdiff-interface.o |
Jonathan Nieder | b0613ce | 2010-11-06 06:47:34 -0500 | [diff] [blame] | 882 | LIB_OBJS += zlib.o |
Josef Weidendorfer | b1bf95b | 2005-07-31 21:17:43 +0200 | [diff] [blame] | 883 | |
Linus Torvalds | 81b50f3 | 2010-02-22 08:42:18 -0800 | [diff] [blame] | 884 | BUILTIN_OBJS += builtin/add.o |
| 885 | BUILTIN_OBJS += builtin/annotate.o |
| 886 | BUILTIN_OBJS += builtin/apply.o |
| 887 | BUILTIN_OBJS += builtin/archive.o |
| 888 | BUILTIN_OBJS += builtin/bisect--helper.o |
| 889 | BUILTIN_OBJS += builtin/blame.o |
| 890 | BUILTIN_OBJS += builtin/branch.o |
| 891 | BUILTIN_OBJS += builtin/bundle.o |
| 892 | BUILTIN_OBJS += builtin/cat-file.o |
| 893 | BUILTIN_OBJS += builtin/check-attr.o |
Adam Spiers | 368aa52 | 2013-01-06 16:58:13 +0000 | [diff] [blame] | 894 | BUILTIN_OBJS += builtin/check-ignore.o |
Linus Torvalds | 81b50f3 | 2010-02-22 08:42:18 -0800 | [diff] [blame] | 895 | BUILTIN_OBJS += builtin/check-ref-format.o |
| 896 | BUILTIN_OBJS += builtin/checkout-index.o |
| 897 | BUILTIN_OBJS += builtin/checkout.o |
| 898 | BUILTIN_OBJS += builtin/clean.o |
| 899 | BUILTIN_OBJS += builtin/clone.o |
Nguyễn Thái Ngọc Duy | 7e29b82 | 2012-04-21 11:44:32 +0700 | [diff] [blame] | 900 | BUILTIN_OBJS += builtin/column.o |
Linus Torvalds | 81b50f3 | 2010-02-22 08:42:18 -0800 | [diff] [blame] | 901 | BUILTIN_OBJS += builtin/commit-tree.o |
| 902 | BUILTIN_OBJS += builtin/commit.o |
| 903 | BUILTIN_OBJS += builtin/config.o |
| 904 | BUILTIN_OBJS += builtin/count-objects.o |
Javier Roucher Iglesias | e30b2fe | 2012-06-24 13:39:59 +0200 | [diff] [blame] | 905 | BUILTIN_OBJS += builtin/credential.o |
Linus Torvalds | 81b50f3 | 2010-02-22 08:42:18 -0800 | [diff] [blame] | 906 | BUILTIN_OBJS += builtin/describe.o |
| 907 | BUILTIN_OBJS += builtin/diff-files.o |
| 908 | BUILTIN_OBJS += builtin/diff-index.o |
| 909 | BUILTIN_OBJS += builtin/diff-tree.o |
| 910 | BUILTIN_OBJS += builtin/diff.o |
| 911 | BUILTIN_OBJS += builtin/fast-export.o |
| 912 | BUILTIN_OBJS += builtin/fetch-pack.o |
| 913 | BUILTIN_OBJS += builtin/fetch.o |
| 914 | BUILTIN_OBJS += builtin/fmt-merge-msg.o |
| 915 | BUILTIN_OBJS += builtin/for-each-ref.o |
| 916 | BUILTIN_OBJS += builtin/fsck.o |
| 917 | BUILTIN_OBJS += builtin/gc.o |
| 918 | BUILTIN_OBJS += builtin/grep.o |
| 919 | BUILTIN_OBJS += builtin/hash-object.o |
| 920 | BUILTIN_OBJS += builtin/help.o |
| 921 | BUILTIN_OBJS += builtin/index-pack.o |
| 922 | BUILTIN_OBJS += builtin/init-db.o |
| 923 | BUILTIN_OBJS += builtin/log.o |
| 924 | BUILTIN_OBJS += builtin/ls-files.o |
| 925 | BUILTIN_OBJS += builtin/ls-remote.o |
| 926 | BUILTIN_OBJS += builtin/ls-tree.o |
| 927 | BUILTIN_OBJS += builtin/mailinfo.o |
| 928 | BUILTIN_OBJS += builtin/mailsplit.o |
| 929 | BUILTIN_OBJS += builtin/merge.o |
| 930 | BUILTIN_OBJS += builtin/merge-base.o |
| 931 | BUILTIN_OBJS += builtin/merge-file.o |
| 932 | BUILTIN_OBJS += builtin/merge-index.o |
| 933 | BUILTIN_OBJS += builtin/merge-ours.o |
| 934 | BUILTIN_OBJS += builtin/merge-recursive.o |
| 935 | BUILTIN_OBJS += builtin/merge-tree.o |
| 936 | BUILTIN_OBJS += builtin/mktag.o |
| 937 | BUILTIN_OBJS += builtin/mktree.o |
| 938 | BUILTIN_OBJS += builtin/mv.o |
| 939 | BUILTIN_OBJS += builtin/name-rev.o |
Junio C Hamano | 2949151 | 2010-03-15 00:52:06 -0700 | [diff] [blame] | 940 | BUILTIN_OBJS += builtin/notes.o |
Linus Torvalds | 81b50f3 | 2010-02-22 08:42:18 -0800 | [diff] [blame] | 941 | BUILTIN_OBJS += builtin/pack-objects.o |
| 942 | BUILTIN_OBJS += builtin/pack-redundant.o |
| 943 | BUILTIN_OBJS += builtin/pack-refs.o |
| 944 | BUILTIN_OBJS += builtin/patch-id.o |
| 945 | BUILTIN_OBJS += builtin/prune-packed.o |
| 946 | BUILTIN_OBJS += builtin/prune.o |
| 947 | BUILTIN_OBJS += builtin/push.o |
| 948 | BUILTIN_OBJS += builtin/read-tree.o |
| 949 | BUILTIN_OBJS += builtin/receive-pack.o |
| 950 | BUILTIN_OBJS += builtin/reflog.o |
| 951 | BUILTIN_OBJS += builtin/remote.o |
Ilari Liusvaara | 7f3eceb | 2010-10-12 19:39:43 +0300 | [diff] [blame] | 952 | BUILTIN_OBJS += builtin/remote-ext.o |
Ilari Liusvaara | 3a9ed4b | 2010-10-12 19:39:42 +0300 | [diff] [blame] | 953 | BUILTIN_OBJS += builtin/remote-fd.o |
Linus Torvalds | 81b50f3 | 2010-02-22 08:42:18 -0800 | [diff] [blame] | 954 | BUILTIN_OBJS += builtin/replace.o |
| 955 | BUILTIN_OBJS += builtin/rerere.o |
| 956 | BUILTIN_OBJS += builtin/reset.o |
| 957 | BUILTIN_OBJS += builtin/rev-list.o |
| 958 | BUILTIN_OBJS += builtin/rev-parse.o |
| 959 | BUILTIN_OBJS += builtin/revert.o |
| 960 | BUILTIN_OBJS += builtin/rm.o |
| 961 | BUILTIN_OBJS += builtin/send-pack.o |
| 962 | BUILTIN_OBJS += builtin/shortlog.o |
| 963 | BUILTIN_OBJS += builtin/show-branch.o |
| 964 | BUILTIN_OBJS += builtin/show-ref.o |
| 965 | BUILTIN_OBJS += builtin/stripspace.o |
| 966 | BUILTIN_OBJS += builtin/symbolic-ref.o |
| 967 | BUILTIN_OBJS += builtin/tag.o |
| 968 | BUILTIN_OBJS += builtin/tar-tree.o |
| 969 | BUILTIN_OBJS += builtin/unpack-file.o |
| 970 | BUILTIN_OBJS += builtin/unpack-objects.o |
| 971 | BUILTIN_OBJS += builtin/update-index.o |
| 972 | BUILTIN_OBJS += builtin/update-ref.o |
| 973 | BUILTIN_OBJS += builtin/update-server-info.o |
| 974 | BUILTIN_OBJS += builtin/upload-archive.o |
| 975 | BUILTIN_OBJS += builtin/var.o |
| 976 | BUILTIN_OBJS += builtin/verify-pack.o |
| 977 | BUILTIN_OBJS += builtin/verify-tag.o |
| 978 | BUILTIN_OBJS += builtin/write-tree.o |
Linus Torvalds | 70827b1 | 2006-04-21 10:27:34 -0700 | [diff] [blame] | 979 | |
Johannes Schindelin | 54c261f | 2006-03-27 01:14:52 +0200 | [diff] [blame] | 980 | GITLIBS = $(LIB_FILE) $(XDIFF_LIB) |
Robert Schiele | bef19da | 2007-07-29 20:35:45 +0200 | [diff] [blame] | 981 | EXTLIBS = |
Linus Torvalds | cef661f | 2005-04-21 12:33:22 -0700 | [diff] [blame] | 982 | |
Jeff King | 42dcbb7 | 2012-06-02 15:01:12 -0400 | [diff] [blame] | 983 | GIT_USER_AGENT = git/$(GIT_VERSION) |
| 984 | |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 985 | include config.mak.uname |
Jakub Narebski | 5566771 | 2006-07-03 01:56:48 +0200 | [diff] [blame] | 986 | -include config.mak.autogen |
Johannes Schindelin | f2d6a25 | 2005-10-11 15:22:47 -0700 | [diff] [blame] | 987 | -include config.mak |
Junio C Hamano | 597c9cc | 2005-09-07 12:22:56 -0700 | [diff] [blame] | 988 | |
Johannes Sixt | 9fb1e69 | 2011-05-09 10:24:55 +0200 | [diff] [blame] | 989 | ifndef sysconfdir |
| 990 | ifeq ($(prefix),/usr) |
| 991 | sysconfdir = /etc |
| 992 | else |
| 993 | sysconfdir = etc |
| 994 | endif |
| 995 | endif |
| 996 | |
Jonathan Nieder | f2fabbf | 2010-01-26 09:57:15 -0600 | [diff] [blame] | 997 | ifdef CHECK_HEADER_DEPENDENCIES |
Jonathan Nieder | 024c843 | 2011-11-18 03:58:21 -0600 | [diff] [blame] | 998 | COMPUTE_HEADER_DEPENDENCIES = no |
Jonathan Nieder | f2fabbf | 2010-01-26 09:57:15 -0600 | [diff] [blame] | 999 | USE_COMPUTED_HEADER_DEPENDENCIES = |
Jonathan Nieder | 024c843 | 2011-11-18 03:58:21 -0600 | [diff] [blame] | 1000 | endif |
| 1001 | |
Fredrik Kuivinen | 111ee18 | 2011-08-18 20:34:39 +0200 | [diff] [blame] | 1002 | ifndef COMPUTE_HEADER_DEPENDENCIES |
Jonathan Nieder | 024c843 | 2011-11-18 03:58:21 -0600 | [diff] [blame] | 1003 | COMPUTE_HEADER_DEPENDENCIES = auto |
| 1004 | endif |
| 1005 | |
| 1006 | ifeq ($(COMPUTE_HEADER_DEPENDENCIES),auto) |
David Aguilar | 1816bf2 | 2011-08-30 01:27:35 -0700 | [diff] [blame] | 1007 | dep_check = $(shell $(CC) $(ALL_CFLAGS) \ |
Jonathan Nieder | 6978934 | 2011-11-18 17:23:24 -0600 | [diff] [blame] | 1008 | -c -MF /dev/null -MQ /dev/null -MMD -MP \ |
| 1009 | -x c /dev/null -o /dev/null 2>&1; \ |
David Aguilar | 1816bf2 | 2011-08-30 01:27:35 -0700 | [diff] [blame] | 1010 | echo $$?) |
Fredrik Kuivinen | 111ee18 | 2011-08-18 20:34:39 +0200 | [diff] [blame] | 1011 | ifeq ($(dep_check),0) |
Jonathan Nieder | 024c843 | 2011-11-18 03:58:21 -0600 | [diff] [blame] | 1012 | override COMPUTE_HEADER_DEPENDENCIES = yes |
| 1013 | else |
| 1014 | override COMPUTE_HEADER_DEPENDENCIES = no |
Fredrik Kuivinen | 111ee18 | 2011-08-18 20:34:39 +0200 | [diff] [blame] | 1015 | endif |
Jonathan Nieder | f2fabbf | 2010-01-26 09:57:15 -0600 | [diff] [blame] | 1016 | endif |
| 1017 | |
Jonathan Nieder | 024c843 | 2011-11-18 03:58:21 -0600 | [diff] [blame] | 1018 | ifeq ($(COMPUTE_HEADER_DEPENDENCIES),yes) |
Jonathan Nieder | f2fabbf | 2010-01-26 09:57:15 -0600 | [diff] [blame] | 1019 | USE_COMPUTED_HEADER_DEPENDENCIES = YesPlease |
Jonathan Nieder | 024c843 | 2011-11-18 03:58:21 -0600 | [diff] [blame] | 1020 | else |
| 1021 | ifneq ($(COMPUTE_HEADER_DEPENDENCIES),no) |
| 1022 | $(error please set COMPUTE_HEADER_DEPENDENCIES to yes, no, or auto \ |
| 1023 | (not "$(COMPUTE_HEADER_DEPENDENCIES)")) |
| 1024 | endif |
Jonathan Nieder | f2fabbf | 2010-01-26 09:57:15 -0600 | [diff] [blame] | 1025 | endif |
| 1026 | |
Junio C Hamano | 0e0aea5 | 2009-06-05 18:36:15 -0500 | [diff] [blame] | 1027 | ifdef SANE_TOOL_PATH |
Junio C Hamano | 61dbb3c | 2009-06-08 09:41:49 -0700 | [diff] [blame] | 1028 | SANE_TOOL_PATH_SQ = $(subst ','\'',$(SANE_TOOL_PATH)) |
| 1029 | 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] | 1030 | PATH := $(SANE_TOOL_PATH):${PATH} |
| 1031 | else |
Junio C Hamano | 61dbb3c | 2009-06-08 09:41:49 -0700 | [diff] [blame] | 1032 | BROKEN_PATH_FIX = '/^\# @@BROKEN_PATH_FIX@@$$/d' |
Junio C Hamano | 0e0aea5 | 2009-06-05 18:36:15 -0500 | [diff] [blame] | 1033 | endif |
| 1034 | |
Gary V. Vaughan | f9f33cd | 2010-05-14 09:31:43 +0000 | [diff] [blame] | 1035 | ifneq (,$(INLINE)) |
| 1036 | BASIC_CFLAGS += -Dinline=$(INLINE) |
| 1037 | endif |
| 1038 | |
Gary V. Vaughan | e88a135 | 2010-05-14 09:31:42 +0000 | [diff] [blame] | 1039 | ifneq (,$(SOCKLEN_T)) |
| 1040 | BASIC_CFLAGS += -Dsocklen_t=$(SOCKLEN_T) |
| 1041 | endif |
| 1042 | |
Brian Gernhardt | 59f8674 | 2006-12-12 12:01:47 -0500 | [diff] [blame] | 1043 | ifeq ($(uname_S),Darwin) |
| 1044 | ifndef NO_FINK |
| 1045 | ifeq ($(shell test -d /sw/lib && echo y),y) |
| 1046 | BASIC_CFLAGS += -I/sw/include |
| 1047 | BASIC_LDFLAGS += -L/sw/lib |
| 1048 | endif |
| 1049 | endif |
| 1050 | ifndef NO_DARWIN_PORTS |
| 1051 | ifeq ($(shell test -d /opt/local/lib && echo y),y) |
| 1052 | BASIC_CFLAGS += -I/opt/local/include |
| 1053 | BASIC_LDFLAGS += -L/opt/local/lib |
| 1054 | endif |
| 1055 | endif |
Ted Pavlic | f7d9d04 | 2009-01-26 14:03:59 -0500 | [diff] [blame] | 1056 | PTHREAD_LIBS = |
Brian Gernhardt | 59f8674 | 2006-12-12 12:01:47 -0500 | [diff] [blame] | 1057 | endif |
| 1058 | |
Junio C Hamano | f5b904d | 2008-08-16 21:56:24 -0700 | [diff] [blame] | 1059 | ifndef CC_LD_DYNPATH |
| 1060 | ifdef NO_R_TO_GCC_LINKER |
| 1061 | # Some gcc does not accept and pass -R to the linker to specify |
| 1062 | # the runtime dynamic library path. |
| 1063 | CC_LD_DYNPATH = -Wl,-rpath, |
| 1064 | else |
| 1065 | CC_LD_DYNPATH = -R |
| 1066 | endif |
Junio C Hamano | bbfc63d | 2006-12-27 14:17:35 -0800 | [diff] [blame] | 1067 | endif |
| 1068 | |
David Aguilar | e1c0688 | 2009-05-31 01:35:51 -0700 | [diff] [blame] | 1069 | ifdef NO_LIBGEN_H |
| 1070 | COMPAT_CFLAGS += -DNO_LIBGEN_H |
| 1071 | COMPAT_OBJS += compat/basename.o |
| 1072 | endif |
| 1073 | |
Michał Kiedrowicz | 63e7e9d | 2011-05-09 23:52:05 +0200 | [diff] [blame] | 1074 | ifdef USE_LIBPCRE |
| 1075 | BASIC_CFLAGS += -DUSE_LIBPCRE |
| 1076 | ifdef LIBPCREDIR |
| 1077 | BASIC_CFLAGS += -I$(LIBPCREDIR)/include |
| 1078 | EXTLIBS += -L$(LIBPCREDIR)/$(lib) $(CC_LD_DYNPATH)$(LIBPCREDIR)/$(lib) |
| 1079 | endif |
| 1080 | EXTLIBS += -lpcre |
| 1081 | endif |
| 1082 | |
Daniel Barkalow | 30ae764 | 2007-09-10 23:02:45 -0400 | [diff] [blame] | 1083 | ifdef NO_CURL |
| 1084 | BASIC_CFLAGS += -DNO_CURL |
Johannes Sixt | 4256f36 | 2010-01-19 16:39:12 +0100 | [diff] [blame] | 1085 | REMOTE_CURL_PRIMARY = |
| 1086 | REMOTE_CURL_ALIASES = |
| 1087 | REMOTE_CURL_NAMES = |
Daniel Barkalow | 30ae764 | 2007-09-10 23:02:45 -0400 | [diff] [blame] | 1088 | else |
Junio C Hamano | 229a7ed | 2005-09-23 10:41:40 -0700 | [diff] [blame] | 1089 | ifdef CURLDIR |
Robert Schiele | 10861be | 2007-08-01 06:30:35 +0200 | [diff] [blame] | 1090 | # Try "-Wl,-rpath=$(CURLDIR)/$(lib)" in such a case. |
Petr Baudis | 8d7f586 | 2006-06-25 03:47:03 +0200 | [diff] [blame] | 1091 | BASIC_CFLAGS += -I$(CURLDIR)/include |
Robert Schiele | 10861be | 2007-08-01 06:30:35 +0200 | [diff] [blame] | 1092 | CURL_LIBCURL = -L$(CURLDIR)/$(lib) $(CC_LD_DYNPATH)$(CURLDIR)/$(lib) -lcurl |
Junio C Hamano | 229a7ed | 2005-09-23 10:41:40 -0700 | [diff] [blame] | 1093 | else |
| 1094 | CURL_LIBCURL = -lcurl |
| 1095 | endif |
Thomas Cort | bc5f813 | 2011-07-19 18:55:47 -0400 | [diff] [blame] | 1096 | ifdef NEEDS_SSL_WITH_CURL |
Stefano Lattarini | dd6fc7c | 2012-12-09 11:36:17 +0100 | [diff] [blame] | 1097 | CURL_LIBCURL += -lssl |
Thomas Cort | bc5f813 | 2011-07-19 18:55:47 -0400 | [diff] [blame] | 1098 | ifdef NEEDS_CRYPTO_WITH_SSL |
| 1099 | CURL_LIBCURL += -lcrypto |
| 1100 | endif |
| 1101 | endif |
| 1102 | ifdef NEEDS_IDN_WITH_CURL |
| 1103 | CURL_LIBCURL += -lidn |
| 1104 | endif |
| 1105 | |
Johannes Sixt | 4256f36 | 2010-01-19 16:39:12 +0100 | [diff] [blame] | 1106 | REMOTE_CURL_PRIMARY = git-remote-http$X |
| 1107 | REMOTE_CURL_ALIASES = git-remote-https$X git-remote-ftp$X git-remote-ftps$X |
| 1108 | REMOTE_CURL_NAMES = $(REMOTE_CURL_PRIMARY) $(REMOTE_CURL_ALIASES) |
Jonathan Nieder | 1b22c99 | 2010-01-26 09:54:23 -0600 | [diff] [blame] | 1109 | PROGRAM_OBJS += http-fetch.o |
| 1110 | PROGRAMS += $(REMOTE_CURL_NAMES) |
Paul Gortmaker | cad06d4 | 2012-11-21 22:19:57 -0500 | [diff] [blame] | 1111 | curl_check := $(shell (echo 070908; curl-config --vernum) 2>/dev/null | sort -r | sed -ne 2p) |
Nick Hengeveld | 0890098 | 2005-11-18 17:08:36 -0800 | [diff] [blame] | 1112 | ifeq "$(curl_check)" "070908" |
| 1113 | ifndef NO_EXPAT |
Jonathan Nieder | 1b22c99 | 2010-01-26 09:54:23 -0600 | [diff] [blame] | 1114 | PROGRAM_OBJS += http-push.o |
Nick Hengeveld | 0890098 | 2005-11-18 17:08:36 -0800 | [diff] [blame] | 1115 | endif |
Nick Hengeveld | 58e60dd | 2005-11-02 11:19:24 -0800 | [diff] [blame] | 1116 | endif |
Johannes Schindelin | 459a21b | 2006-04-05 16:22:40 +0200 | [diff] [blame] | 1117 | ifndef NO_EXPAT |
Serge van den Boom | 85b4518 | 2009-01-28 21:43:57 +0100 | [diff] [blame] | 1118 | ifdef EXPATDIR |
| 1119 | BASIC_CFLAGS += -I$(EXPATDIR)/include |
| 1120 | EXPAT_LIBEXPAT = -L$(EXPATDIR)/$(lib) $(CC_LD_DYNPATH)$(EXPATDIR)/$(lib) -lexpat |
| 1121 | else |
| 1122 | EXPAT_LIBEXPAT = -lexpat |
| 1123 | endif |
Matt Kraai | 081fd8d | 2013-02-11 14:03:45 -0800 | [diff] [blame] | 1124 | ifdef EXPAT_NEEDS_XMLPARSE_H |
| 1125 | BASIC_CFLAGS += -DEXPAT_NEEDS_XMLPARSE_H |
| 1126 | endif |
Johannes Schindelin | 459a21b | 2006-04-05 16:22:40 +0200 | [diff] [blame] | 1127 | endif |
Junio C Hamano | 229a7ed | 2005-09-23 10:41:40 -0700 | [diff] [blame] | 1128 | endif |
| 1129 | |
Robert Schiele | bef19da | 2007-07-29 20:35:45 +0200 | [diff] [blame] | 1130 | ifdef ZLIB_PATH |
| 1131 | BASIC_CFLAGS += -I$(ZLIB_PATH)/include |
Robert Schiele | 10861be | 2007-08-01 06:30:35 +0200 | [diff] [blame] | 1132 | EXTLIBS += -L$(ZLIB_PATH)/$(lib) $(CC_LD_DYNPATH)$(ZLIB_PATH)/$(lib) |
Robert Schiele | bef19da | 2007-07-29 20:35:45 +0200 | [diff] [blame] | 1133 | endif |
| 1134 | EXTLIBS += -lz |
| 1135 | |
Petr Baudis | dd53c7a | 2005-07-29 17:50:51 +0200 | [diff] [blame] | 1136 | ifndef NO_OPENSSL |
Junio C Hamano | 215a7ad | 2005-09-07 17:26:23 -0700 | [diff] [blame] | 1137 | OPENSSL_LIBSSL = -lssl |
Junio C Hamano | 455a7f3 | 2005-09-30 13:31:16 -0700 | [diff] [blame] | 1138 | ifdef OPENSSLDIR |
Petr Baudis | 8d7f586 | 2006-06-25 03:47:03 +0200 | [diff] [blame] | 1139 | BASIC_CFLAGS += -I$(OPENSSLDIR)/include |
Robert Schiele | 10861be | 2007-08-01 06:30:35 +0200 | [diff] [blame] | 1140 | OPENSSL_LINK = -L$(OPENSSLDIR)/$(lib) $(CC_LD_DYNPATH)$(OPENSSLDIR)/$(lib) |
Junio C Hamano | 455a7f3 | 2005-09-30 13:31:16 -0700 | [diff] [blame] | 1141 | else |
| 1142 | OPENSSL_LINK = |
| 1143 | endif |
Brian Gernhardt | 0460dba | 2009-09-08 09:54:38 -0400 | [diff] [blame] | 1144 | ifdef NEEDS_CRYPTO_WITH_SSL |
Thomas Cort | bc5f813 | 2011-07-19 18:55:47 -0400 | [diff] [blame] | 1145 | OPENSSL_LIBSSL += -lcrypto |
Brian Gernhardt | 0460dba | 2009-09-08 09:54:38 -0400 | [diff] [blame] | 1146 | endif |
Petr Baudis | dd53c7a | 2005-07-29 17:50:51 +0200 | [diff] [blame] | 1147 | else |
Petr Baudis | 8d7f586 | 2006-06-25 03:47:03 +0200 | [diff] [blame] | 1148 | BASIC_CFLAGS += -DNO_OPENSSL |
Nicolas Pitre | 30ae47b | 2009-08-17 20:09:56 -0400 | [diff] [blame] | 1149 | BLK_SHA1 = 1 |
Junio C Hamano | 215a7ad | 2005-09-07 17:26:23 -0700 | [diff] [blame] | 1150 | OPENSSL_LIBSSL = |
Petr Baudis | dd53c7a | 2005-07-29 17:50:51 +0200 | [diff] [blame] | 1151 | endif |
Junio C Hamano | 5b02b9b | 2010-12-08 14:54:13 -0800 | [diff] [blame] | 1152 | ifdef NO_OPENSSL |
| 1153 | LIB_4_CRYPTO = |
| 1154 | else |
Junio C Hamano | 597c9cc | 2005-09-07 12:22:56 -0700 | [diff] [blame] | 1155 | ifdef NEEDS_SSL_WITH_CRYPTO |
Junio C Hamano | 455a7f3 | 2005-09-30 13:31:16 -0700 | [diff] [blame] | 1156 | LIB_4_CRYPTO = $(OPENSSL_LINK) -lcrypto -lssl |
Junio C Hamano | 597c9cc | 2005-09-07 12:22:56 -0700 | [diff] [blame] | 1157 | else |
Junio C Hamano | 455a7f3 | 2005-09-30 13:31:16 -0700 | [diff] [blame] | 1158 | LIB_4_CRYPTO = $(OPENSSL_LINK) -lcrypto |
Junio C Hamano | 597c9cc | 2005-09-07 12:22:56 -0700 | [diff] [blame] | 1159 | endif |
Junio C Hamano | 5b02b9b | 2010-12-08 14:54:13 -0800 | [diff] [blame] | 1160 | endif |
Junio C Hamano | 597c9cc | 2005-09-07 12:22:56 -0700 | [diff] [blame] | 1161 | ifdef NEEDS_LIBICONV |
Junio C Hamano | 455a7f3 | 2005-09-30 13:31:16 -0700 | [diff] [blame] | 1162 | ifdef ICONVDIR |
Petr Baudis | 8d7f586 | 2006-06-25 03:47:03 +0200 | [diff] [blame] | 1163 | BASIC_CFLAGS += -I$(ICONVDIR)/include |
Robert Schiele | 10861be | 2007-08-01 06:30:35 +0200 | [diff] [blame] | 1164 | ICONV_LINK = -L$(ICONVDIR)/$(lib) $(CC_LD_DYNPATH)$(ICONVDIR)/$(lib) |
Junio C Hamano | 455a7f3 | 2005-09-30 13:31:16 -0700 | [diff] [blame] | 1165 | else |
| 1166 | ICONV_LINK = |
| 1167 | endif |
Joachim Schmitz | 6c10990 | 2012-09-19 12:03:30 +0200 | [diff] [blame] | 1168 | ifdef NEEDS_LIBINTL_BEFORE_LIBICONV |
| 1169 | ICONV_LINK += -lintl |
| 1170 | endif |
Petr Baudis | d595a47 | 2006-06-24 18:35:12 -0700 | [diff] [blame] | 1171 | EXTLIBS += $(ICONV_LINK) -liconv |
Junio C Hamano | 597c9cc | 2005-09-07 12:22:56 -0700 | [diff] [blame] | 1172 | endif |
Brandon Casey | ecc395c | 2009-07-10 12:10:45 -0500 | [diff] [blame] | 1173 | ifdef NEEDS_LIBGEN |
| 1174 | EXTLIBS += -lgen |
| 1175 | endif |
Ævar Arnfjörð Bjarmason | 5e9637c | 2011-11-18 00:14:42 +0100 | [diff] [blame] | 1176 | ifndef NO_GETTEXT |
| 1177 | ifndef LIBC_CONTAINS_LIBINTL |
| 1178 | EXTLIBS += -lintl |
| 1179 | endif |
| 1180 | endif |
Patrick Mauritz | f0ebff0 | 2005-09-06 01:24:03 +0200 | [diff] [blame] | 1181 | ifdef NEEDS_SOCKET |
Petr Baudis | d595a47 | 2006-06-24 18:35:12 -0700 | [diff] [blame] | 1182 | EXTLIBS += -lsocket |
Patrick Mauritz | f0ebff0 | 2005-09-06 01:24:03 +0200 | [diff] [blame] | 1183 | endif |
Junio C Hamano | 5a90d4a | 2005-09-11 22:25:49 -0700 | [diff] [blame] | 1184 | ifdef NEEDS_NSL |
Petr Baudis | d595a47 | 2006-06-24 18:35:12 -0700 | [diff] [blame] | 1185 | EXTLIBS += -lnsl |
Junio C Hamano | 5a90d4a | 2005-09-11 22:25:49 -0700 | [diff] [blame] | 1186 | endif |
Brandon Casey | 70cf991 | 2009-06-05 18:36:10 -0500 | [diff] [blame] | 1187 | ifdef NEEDS_RESOLV |
| 1188 | EXTLIBS += -lresolv |
| 1189 | endif |
Junio C Hamano | 63be37b | 2006-01-19 17:13:57 -0800 | [diff] [blame] | 1190 | ifdef NO_D_TYPE_IN_DIRENT |
Petr Baudis | 8d7f586 | 2006-06-25 03:47:03 +0200 | [diff] [blame] | 1191 | BASIC_CFLAGS += -DNO_D_TYPE_IN_DIRENT |
Junio C Hamano | 63be37b | 2006-01-19 17:13:57 -0800 | [diff] [blame] | 1192 | endif |
Junio C Hamano | 35a730f | 2006-01-19 17:13:51 -0800 | [diff] [blame] | 1193 | ifdef NO_D_INO_IN_DIRENT |
Petr Baudis | 8d7f586 | 2006-06-25 03:47:03 +0200 | [diff] [blame] | 1194 | BASIC_CFLAGS += -DNO_D_INO_IN_DIRENT |
Junio C Hamano | 35a730f | 2006-01-19 17:13:51 -0800 | [diff] [blame] | 1195 | endif |
David Michael | 110d698 | 2012-12-14 14:56:59 -0500 | [diff] [blame] | 1196 | ifdef NO_GECOS_IN_PWENT |
| 1197 | BASIC_CFLAGS += -DNO_GECOS_IN_PWENT |
| 1198 | endif |
Junio C Hamano | fdb2a2a | 2008-08-18 21:57:16 +0200 | [diff] [blame] | 1199 | ifdef NO_ST_BLOCKS_IN_STRUCT_STAT |
| 1200 | BASIC_CFLAGS += -DNO_ST_BLOCKS_IN_STRUCT_STAT |
| 1201 | endif |
Brian Gernhardt | d7371a2 | 2009-03-08 17:22:51 -0400 | [diff] [blame] | 1202 | ifdef USE_NSEC |
| 1203 | BASIC_CFLAGS += -DUSE_NSEC |
| 1204 | endif |
Brian Gernhardt | c567383 | 2009-03-08 16:04:28 -0400 | [diff] [blame] | 1205 | ifdef USE_ST_TIMESPEC |
| 1206 | BASIC_CFLAGS += -DUSE_ST_TIMESPEC |
| 1207 | endif |
Junio C Hamano | 6520c84 | 2011-06-18 18:07:03 -0700 | [diff] [blame] | 1208 | ifdef NO_NORETURN |
| 1209 | BASIC_CFLAGS += -DNO_NORETURN |
| 1210 | endif |
Kjetil Barvik | c06ff49 | 2009-03-04 18:47:40 +0100 | [diff] [blame] | 1211 | ifdef NO_NSEC |
| 1212 | BASIC_CFLAGS += -DNO_NSEC |
| 1213 | endif |
Michal Rokos | c4582f9 | 2008-03-05 16:46:13 +0100 | [diff] [blame] | 1214 | ifdef SNPRINTF_RETURNS_BOGUS |
| 1215 | COMPAT_CFLAGS += -DSNPRINTF_RETURNS_BOGUS |
| 1216 | COMPAT_OBJS += compat/snprintf.o |
| 1217 | endif |
Brandon Casey | cba2252 | 2008-02-08 20:32:47 -0600 | [diff] [blame] | 1218 | ifdef FREAD_READS_DIRECTORIES |
| 1219 | COMPAT_CFLAGS += -DFREAD_READS_DIRECTORIES |
| 1220 | COMPAT_OBJS += compat/fopen.o |
| 1221 | endif |
Junio C Hamano | 9f0bb90 | 2006-05-02 00:40:24 -0700 | [diff] [blame] | 1222 | ifdef NO_SYMLINK_HEAD |
Petr Baudis | 8d7f586 | 2006-06-25 03:47:03 +0200 | [diff] [blame] | 1223 | BASIC_CFLAGS += -DNO_SYMLINK_HEAD |
Junio C Hamano | 9f0bb90 | 2006-05-02 00:40:24 -0700 | [diff] [blame] | 1224 | endif |
Ævar Arnfjörð Bjarmason | bb946bb | 2011-02-22 23:41:21 +0000 | [diff] [blame] | 1225 | ifdef GETTEXT_POISON |
| 1226 | BASIC_CFLAGS += -DGETTEXT_POISON |
| 1227 | endif |
Ævar Arnfjörð Bjarmason | 5e9637c | 2011-11-18 00:14:42 +0100 | [diff] [blame] | 1228 | ifdef NO_GETTEXT |
| 1229 | BASIC_CFLAGS += -DNO_GETTEXT |
Junio C Hamano | 60f4079 | 2012-01-23 18:31:09 -0600 | [diff] [blame] | 1230 | USE_GETTEXT_SCHEME ?= fallthrough |
Ævar Arnfjörð Bjarmason | 5e9637c | 2011-11-18 00:14:42 +0100 | [diff] [blame] | 1231 | endif |
Joachim Schmitz | 6d45eb1 | 2012-09-17 23:16:39 +0200 | [diff] [blame] | 1232 | ifdef NO_POLL |
| 1233 | NO_SYS_POLL_H = YesPlease |
| 1234 | COMPAT_CFLAGS += -DNO_POLL -Icompat/poll |
| 1235 | COMPAT_OBJS += compat/poll/poll.o |
| 1236 | endif |
Linus Torvalds | ef34af2 | 2005-09-18 18:30:50 -0700 | [diff] [blame] | 1237 | ifdef NO_STRCASESTR |
Junio C Hamano | 4050c0d | 2005-12-05 11:54:29 -0800 | [diff] [blame] | 1238 | COMPAT_CFLAGS += -DNO_STRCASESTR |
Jason Riedy | e40b61f | 2005-12-02 15:08:28 -0800 | [diff] [blame] | 1239 | COMPAT_OBJS += compat/strcasestr.o |
| 1240 | endif |
Peter Eriksen | 817151e | 2006-06-24 16:01:25 +0200 | [diff] [blame] | 1241 | ifdef NO_STRLCPY |
| 1242 | COMPAT_CFLAGS += -DNO_STRLCPY |
| 1243 | COMPAT_OBJS += compat/strlcpy.o |
| 1244 | endif |
Jason Riedy | bc6b4f5 | 2007-02-19 16:22:56 -0800 | [diff] [blame] | 1245 | ifdef NO_STRTOUMAX |
| 1246 | COMPAT_CFLAGS += -DNO_STRTOUMAX |
Nick Alcock | e3eed7f | 2011-11-02 15:46:22 +0000 | [diff] [blame] | 1247 | COMPAT_OBJS += compat/strtoumax.o compat/strtoimax.o |
Jason Riedy | bc6b4f5 | 2007-02-19 16:22:56 -0800 | [diff] [blame] | 1248 | endif |
| 1249 | ifdef NO_STRTOULL |
| 1250 | COMPAT_CFLAGS += -DNO_STRTOULL |
| 1251 | endif |
Jonathan Nieder | 78457bc | 2010-08-13 18:59:40 -0500 | [diff] [blame] | 1252 | ifdef NO_STRTOK_R |
| 1253 | COMPAT_CFLAGS += -DNO_STRTOK_R |
| 1254 | COMPAT_OBJS += compat/strtok_r.o |
| 1255 | endif |
Ævar Arnfjörð Bjarmason | f3f3d93 | 2010-10-03 09:56:39 +0000 | [diff] [blame] | 1256 | ifdef NO_FNMATCH |
| 1257 | COMPAT_CFLAGS += -Icompat/fnmatch |
| 1258 | COMPAT_CFLAGS += -DNO_FNMATCH |
| 1259 | COMPAT_OBJS += compat/fnmatch/fnmatch.o |
Ævar Arnfjörð Bjarmason | 4de066b | 2010-10-04 02:48:11 +0000 | [diff] [blame] | 1260 | else |
| 1261 | ifdef NO_FNMATCH_CASEFOLD |
| 1262 | COMPAT_CFLAGS += -Icompat/fnmatch |
| 1263 | COMPAT_CFLAGS += -DNO_FNMATCH_CASEFOLD |
| 1264 | COMPAT_OBJS += compat/fnmatch/fnmatch.o |
| 1265 | endif |
Ævar Arnfjörð Bjarmason | f3f3d93 | 2010-10-03 09:56:39 +0000 | [diff] [blame] | 1266 | endif |
Nguyễn Thái Ngọc Duy | cebcab1 | 2013-01-01 09:44:11 +0700 | [diff] [blame] | 1267 | ifdef USE_WILDMATCH |
| 1268 | COMPAT_CFLAGS += -DUSE_WILDMATCH |
| 1269 | endif |
Jason Riedy | e40b61f | 2005-12-02 15:08:28 -0800 | [diff] [blame] | 1270 | ifdef NO_SETENV |
Junio C Hamano | 4050c0d | 2005-12-05 11:54:29 -0800 | [diff] [blame] | 1271 | COMPAT_CFLAGS += -DNO_SETENV |
Jason Riedy | e40b61f | 2005-12-02 15:08:28 -0800 | [diff] [blame] | 1272 | COMPAT_OBJS += compat/setenv.o |
Linus Torvalds | ef34af2 | 2005-09-18 18:30:50 -0700 | [diff] [blame] | 1273 | endif |
Shawn O. Pearce | ca5bb5d | 2007-10-20 16:03:49 -0400 | [diff] [blame] | 1274 | ifdef NO_MKDTEMP |
| 1275 | COMPAT_CFLAGS += -DNO_MKDTEMP |
| 1276 | COMPAT_OBJS += compat/mkdtemp.o |
| 1277 | endif |
Joachim Schmitz | dc9f462 | 2012-09-08 19:01:31 +0200 | [diff] [blame] | 1278 | ifdef MKDIR_WO_TRAILING_SLASH |
| 1279 | COMPAT_CFLAGS += -DMKDIR_WO_TRAILING_SLASH |
| 1280 | COMPAT_OBJS += compat/mkdir.o |
| 1281 | endif |
David Aguilar | 0620b39 | 2009-05-31 01:35:50 -0700 | [diff] [blame] | 1282 | ifdef NO_MKSTEMPS |
| 1283 | COMPAT_CFLAGS += -DNO_MKSTEMPS |
David Aguilar | 0620b39 | 2009-05-31 01:35:50 -0700 | [diff] [blame] | 1284 | endif |
Johannes Schindelin | 104ff34 | 2006-08-29 12:51:14 +0200 | [diff] [blame] | 1285 | ifdef NO_UNSETENV |
Jason Riedy | 731043f | 2006-01-25 12:38:36 -0800 | [diff] [blame] | 1286 | COMPAT_CFLAGS += -DNO_UNSETENV |
| 1287 | COMPAT_OBJS += compat/unsetenv.o |
| 1288 | endif |
Robert Schiele | 2600973 | 2008-01-24 19:34:46 +0100 | [diff] [blame] | 1289 | ifdef NO_SYS_SELECT_H |
| 1290 | BASIC_CFLAGS += -DNO_SYS_SELECT_H |
| 1291 | endif |
Markus Duft | 2844923 | 2010-10-27 10:39:52 +0200 | [diff] [blame] | 1292 | ifdef NO_SYS_POLL_H |
| 1293 | BASIC_CFLAGS += -DNO_SYS_POLL_H |
| 1294 | endif |
Junio C Hamano | b2d05e0 | 2012-12-18 09:35:33 -0800 | [diff] [blame] | 1295 | ifdef NEEDS_SYS_PARAM_H |
| 1296 | BASIC_CFLAGS += -DNEEDS_SYS_PARAM_H |
David Michael | 6ede720 | 2012-12-14 14:56:58 -0500 | [diff] [blame] | 1297 | endif |
Markus Duft | 2844923 | 2010-10-27 10:39:52 +0200 | [diff] [blame] | 1298 | ifdef NO_INTTYPES_H |
| 1299 | BASIC_CFLAGS += -DNO_INTTYPES_H |
| 1300 | endif |
| 1301 | ifdef NO_INITGROUPS |
| 1302 | BASIC_CFLAGS += -DNO_INITGROUPS |
| 1303 | endif |
Johannes Schindelin | 730d48a | 2005-10-08 15:54:36 -0700 | [diff] [blame] | 1304 | ifdef NO_MMAP |
Junio C Hamano | 4050c0d | 2005-12-05 11:54:29 -0800 | [diff] [blame] | 1305 | COMPAT_CFLAGS += -DNO_MMAP |
Jason Riedy | e40b61f | 2005-12-02 15:08:28 -0800 | [diff] [blame] | 1306 | COMPAT_OBJS += compat/mmap.o |
Janos Laube | b130a72 | 2009-03-13 16:50:45 +0100 | [diff] [blame] | 1307 | else |
| 1308 | ifdef USE_WIN32_MMAP |
| 1309 | COMPAT_CFLAGS += -DUSE_WIN32_MMAP |
| 1310 | COMPAT_OBJS += compat/win32mmap.o |
| 1311 | endif |
Johannes Schindelin | 730d48a | 2005-10-08 15:54:36 -0700 | [diff] [blame] | 1312 | endif |
Johannes Schindelin | 348df16 | 2009-04-28 00:32:25 +0200 | [diff] [blame] | 1313 | ifdef OBJECT_CREATION_USES_RENAMES |
| 1314 | COMPAT_CFLAGS += -DOBJECT_CREATION_MODE=1 |
Johannes Schindelin | be66a6c | 2009-04-25 11:57:14 +0200 | [diff] [blame] | 1315 | endif |
Joachim Schmitz | 7f9e848 | 2012-09-08 18:54:34 +0200 | [diff] [blame] | 1316 | ifdef NO_STRUCT_ITIMERVAL |
| 1317 | COMPAT_CFLAGS += -DNO_STRUCT_ITIMERVAL |
Stefano Lattarini | dd6fc7c | 2012-12-09 11:36:17 +0100 | [diff] [blame] | 1318 | NO_SETITIMER = YesPlease |
Joachim Schmitz | 7f9e848 | 2012-09-08 18:54:34 +0200 | [diff] [blame] | 1319 | endif |
| 1320 | ifdef NO_SETITIMER |
| 1321 | COMPAT_CFLAGS += -DNO_SETITIMER |
| 1322 | endif |
Stefan-W. Hahn | 6900679 | 2007-01-09 22:04:12 +0100 | [diff] [blame] | 1323 | ifdef NO_PREAD |
| 1324 | COMPAT_CFLAGS += -DNO_PREAD |
| 1325 | COMPAT_OBJS += compat/pread.o |
Junio C Hamano | c0f8654 | 2012-06-26 19:19:32 +0100 | [diff] [blame] | 1326 | NO_THREAD_SAFE_PREAD = YesPlease |
| 1327 | endif |
| 1328 | ifdef NO_THREAD_SAFE_PREAD |
| 1329 | BASIC_CFLAGS += -DNO_THREAD_SAFE_PREAD |
Stefan-W. Hahn | 6900679 | 2007-01-09 22:04:12 +0100 | [diff] [blame] | 1330 | endif |
Shawn O. Pearce | 1510fea | 2006-12-14 06:15:57 -0500 | [diff] [blame] | 1331 | ifdef NO_FAST_WORKING_DIRECTORY |
| 1332 | BASIC_CFLAGS += -DNO_FAST_WORKING_DIRECTORY |
| 1333 | endif |
Shawn O. Pearce | c869753 | 2006-12-30 23:53:55 -0500 | [diff] [blame] | 1334 | ifdef NO_TRUSTABLE_FILEMODE |
| 1335 | BASIC_CFLAGS += -DNO_TRUSTABLE_FILEMODE |
| 1336 | endif |
hpa | 49744d6 | 2005-09-28 16:52:21 -0700 | [diff] [blame] | 1337 | ifdef NO_IPV6 |
Petr Baudis | 8d7f586 | 2006-06-25 03:47:03 +0200 | [diff] [blame] | 1338 | BASIC_CFLAGS += -DNO_IPV6 |
Junio C Hamano | bdc37f5 | 2006-01-19 17:13:32 -0800 | [diff] [blame] | 1339 | endif |
Joachim Schmitz | 6c10990 | 2012-09-19 12:03:30 +0200 | [diff] [blame] | 1340 | ifdef NO_INTPTR_T |
| 1341 | COMPAT_CFLAGS += -DNO_INTPTR_T |
| 1342 | endif |
David M. Syzdek | 0bc3e78 | 2008-10-26 03:52:37 -0800 | [diff] [blame] | 1343 | ifdef NO_UINTMAX_T |
| 1344 | BASIC_CFLAGS += -Duintmax_t=uint32_t |
| 1345 | endif |
Junio C Hamano | bdc37f5 | 2006-01-19 17:13:32 -0800 | [diff] [blame] | 1346 | ifdef NO_SOCKADDR_STORAGE |
| 1347 | ifdef NO_IPV6 |
Petr Baudis | 8d7f586 | 2006-06-25 03:47:03 +0200 | [diff] [blame] | 1348 | BASIC_CFLAGS += -Dsockaddr_storage=sockaddr_in |
Junio C Hamano | bdc37f5 | 2006-01-19 17:13:32 -0800 | [diff] [blame] | 1349 | else |
Petr Baudis | 8d7f586 | 2006-06-25 03:47:03 +0200 | [diff] [blame] | 1350 | BASIC_CFLAGS += -Dsockaddr_storage=sockaddr_in6 |
Junio C Hamano | bdc37f5 | 2006-01-19 17:13:32 -0800 | [diff] [blame] | 1351 | endif |
hpa | 49744d6 | 2005-09-28 16:52:21 -0700 | [diff] [blame] | 1352 | endif |
Yakov Lerner | 6ba68ab | 2006-05-22 00:37:00 +0300 | [diff] [blame] | 1353 | ifdef NO_INET_NTOP |
| 1354 | LIB_OBJS += compat/inet_ntop.o |
Mike Pape | da523cc | 2010-11-04 02:35:11 +0100 | [diff] [blame] | 1355 | BASIC_CFLAGS += -DNO_INET_NTOP |
Yakov Lerner | 6ba68ab | 2006-05-22 00:37:00 +0300 | [diff] [blame] | 1356 | endif |
Jon Loeliger | dd46762 | 2006-09-26 09:47:43 -0500 | [diff] [blame] | 1357 | ifdef NO_INET_PTON |
| 1358 | LIB_OBJS += compat/inet_pton.o |
Mike Pape | da523cc | 2010-11-04 02:35:11 +0100 | [diff] [blame] | 1359 | BASIC_CFLAGS += -DNO_INET_PTON |
Jon Loeliger | dd46762 | 2006-09-26 09:47:43 -0500 | [diff] [blame] | 1360 | endif |
Johannes Sixt | 6320358 | 2011-12-12 22:12:56 +0100 | [diff] [blame] | 1361 | ifndef NO_UNIX_SOCKETS |
| 1362 | LIB_OBJS += unix-socket.o |
| 1363 | LIB_H += unix-socket.h |
| 1364 | PROGRAM_OBJS += credential-cache.o |
| 1365 | PROGRAM_OBJS += credential-cache--daemon.o |
| 1366 | endif |
Linus Torvalds | cef661f | 2005-04-21 12:33:22 -0700 | [diff] [blame] | 1367 | |
Fernando J. Pereda | b6e56ec | 2006-02-16 09:38:01 +0100 | [diff] [blame] | 1368 | ifdef NO_ICONV |
Petr Baudis | 8d7f586 | 2006-06-25 03:47:03 +0200 | [diff] [blame] | 1369 | BASIC_CFLAGS += -DNO_ICONV |
Fernando J. Pereda | b6e56ec | 2006-02-16 09:38:01 +0100 | [diff] [blame] | 1370 | endif |
| 1371 | |
Ramsay Jones | fd547a9 | 2007-03-03 18:29:03 +0000 | [diff] [blame] | 1372 | ifdef OLD_ICONV |
| 1373 | BASIC_CFLAGS += -DOLD_ICONV |
| 1374 | endif |
| 1375 | |
David Symonds | 609a228 | 2007-11-07 14:24:28 +1100 | [diff] [blame] | 1376 | ifdef NO_DEFLATE_BOUND |
| 1377 | BASIC_CFLAGS += -DNO_DEFLATE_BOUND |
| 1378 | endif |
| 1379 | |
Erik Faye-Lund | a666b47 | 2010-11-04 02:35:24 +0100 | [diff] [blame] | 1380 | ifdef NO_POSIX_GOODIES |
| 1381 | BASIC_CFLAGS += -DNO_POSIX_GOODIES |
| 1382 | endif |
| 1383 | |
Linus Torvalds | d7c208a | 2009-08-05 16:13:20 -0700 | [diff] [blame] | 1384 | ifdef BLK_SHA1 |
| 1385 | SHA1_HEADER = "block-sha1/sha1.h" |
| 1386 | LIB_OBJS += block-sha1/sha1.o |
Jonathan Nieder | 21528ab | 2010-01-26 09:44:47 -0600 | [diff] [blame] | 1387 | LIB_H += block-sha1/sha1.h |
Linus Torvalds | d7c208a | 2009-08-05 16:13:20 -0700 | [diff] [blame] | 1388 | else |
Nicolas Pitre | 7c6ef2f | 2005-09-20 12:27:13 -0400 | [diff] [blame] | 1389 | ifdef PPC_SHA1 |
| 1390 | SHA1_HEADER = "ppc/sha1.h" |
| 1391 | LIB_OBJS += ppc/sha1.o ppc/sha1ppc.o |
Jonathan Nieder | 21528ab | 2010-01-26 09:44:47 -0600 | [diff] [blame] | 1392 | LIB_H += ppc/sha1.h |
Nicolas Pitre | 7c6ef2f | 2005-09-20 12:27:13 -0400 | [diff] [blame] | 1393 | else |
Nicolas Pitre | 7c6ef2f | 2005-09-20 12:27:13 -0400 | [diff] [blame] | 1394 | SHA1_HEADER = <openssl/sha.h> |
Petr Baudis | d595a47 | 2006-06-24 18:35:12 -0700 | [diff] [blame] | 1395 | EXTLIBS += $(LIB_4_CRYPTO) |
Nicolas Pitre | 7c6ef2f | 2005-09-20 12:27:13 -0400 | [diff] [blame] | 1396 | endif |
| 1397 | endif |
Alex Riesen | f848718 | 2006-12-04 10:50:04 +0100 | [diff] [blame] | 1398 | ifdef NO_PERL_MAKEMAKER |
| 1399 | export NO_PERL_MAKEMAKER |
| 1400 | endif |
Alex Riesen | fa0c87c | 2007-06-13 20:54:32 +0200 | [diff] [blame] | 1401 | ifdef NO_HSTRERROR |
| 1402 | COMPAT_CFLAGS += -DNO_HSTRERROR |
| 1403 | COMPAT_OBJS += compat/hstrerror.o |
| 1404 | endif |
René Scharfe | b21b9f1 | 2007-09-07 00:32:54 +0200 | [diff] [blame] | 1405 | ifdef NO_MEMMEM |
| 1406 | COMPAT_CFLAGS += -DNO_MEMMEM |
| 1407 | COMPAT_OBJS += compat/memmem.o |
| 1408 | endif |
Matt Kraai | 40036be | 2012-12-18 14:03:55 -0800 | [diff] [blame] | 1409 | ifdef NO_GETPAGESIZE |
| 1410 | COMPAT_CFLAGS += -DNO_GETPAGESIZE |
| 1411 | endif |
Brian Downing | 43fe901 | 2008-02-05 15:10:44 -0600 | [diff] [blame] | 1412 | ifdef INTERNAL_QSORT |
| 1413 | COMPAT_CFLAGS += -DINTERNAL_QSORT |
| 1414 | COMPAT_OBJS += compat/qsort.o |
| 1415 | endif |
Steffen Prohaska | 35fb0e86 | 2009-01-18 13:00:14 +0100 | [diff] [blame] | 1416 | ifdef RUNTIME_PREFIX |
| 1417 | COMPAT_CFLAGS += -DRUNTIME_PREFIX |
| 1418 | endif |
Alex Riesen | b777434 | 2007-03-07 00:44:49 +0100 | [diff] [blame] | 1419 | |
Junio C Hamano | 46059cc | 2008-11-15 04:08:14 -0800 | [diff] [blame] | 1420 | ifdef NO_PTHREADS |
Junio C Hamano | 46059cc | 2008-11-15 04:08:14 -0800 | [diff] [blame] | 1421 | BASIC_CFLAGS += -DNO_PTHREADS |
| 1422 | else |
Gary V. Vaughan | 48793cf | 2010-05-14 09:31:34 +0000 | [diff] [blame] | 1423 | BASIC_CFLAGS += $(PTHREAD_CFLAGS) |
Junio C Hamano | 46059cc | 2008-11-15 04:08:14 -0800 | [diff] [blame] | 1424 | EXTLIBS += $(PTHREAD_LIBS) |
Andreas Ericsson | 833e3df | 2008-02-22 20:11:56 -0600 | [diff] [blame] | 1425 | LIB_OBJS += thread-utils.o |
Nicolas Pitre | 8ecce68 | 2007-09-06 02:13:11 -0400 | [diff] [blame] | 1426 | endif |
Dan McGee | 7eb151d | 2010-01-29 19:22:19 -0600 | [diff] [blame] | 1427 | |
Chris Webb | cb6a22c | 2010-04-13 10:07:13 +0100 | [diff] [blame] | 1428 | ifdef HAVE_PATHS_H |
| 1429 | BASIC_CFLAGS += -DHAVE_PATHS_H |
| 1430 | endif |
| 1431 | |
Ævar Arnfjörð Bjarmason | 5e9637c | 2011-11-18 00:14:42 +0100 | [diff] [blame] | 1432 | ifdef HAVE_LIBCHARSET_H |
| 1433 | BASIC_CFLAGS += -DHAVE_LIBCHARSET_H |
Дилян Палаузов | b522528 | 2012-02-12 17:23:36 +0100 | [diff] [blame] | 1434 | EXTLIBS += $(CHARSET_LIB) |
Ævar Arnfjörð Bjarmason | 5e9637c | 2011-11-18 00:14:42 +0100 | [diff] [blame] | 1435 | endif |
| 1436 | |
David Michael | b3e103d | 2012-12-14 14:57:01 -0500 | [diff] [blame] | 1437 | ifdef HAVE_STRINGS_H |
| 1438 | BASIC_CFLAGS += -DHAVE_STRINGS_H |
| 1439 | endif |
| 1440 | |
Jeff King | 21aeafc | 2011-12-10 05:41:01 -0500 | [diff] [blame] | 1441 | ifdef HAVE_DEV_TTY |
| 1442 | BASIC_CFLAGS += -DHAVE_DEV_TTY |
| 1443 | endif |
| 1444 | |
Alex Riesen | 81a24b5 | 2008-03-05 00:15:39 +0100 | [diff] [blame] | 1445 | ifdef DIR_HAS_BSD_GROUP_SEMANTICS |
| 1446 | COMPAT_CFLAGS += -DDIR_HAS_BSD_GROUP_SEMANTICS |
| 1447 | endif |
Johannes Sixt | 34779c5 | 2009-04-20 10:17:00 +0200 | [diff] [blame] | 1448 | ifdef UNRELIABLE_FSTAT |
| 1449 | BASIC_CFLAGS += -DUNRELIABLE_FSTAT |
| 1450 | endif |
Jeff King | 02232ad | 2009-06-16 15:07:40 -0400 | [diff] [blame] | 1451 | ifdef NO_REGEX |
| 1452 | COMPAT_CFLAGS += -Icompat/regex |
| 1453 | COMPAT_OBJS += compat/regex/regex.o |
| 1454 | endif |
Mark Levedahl | 9fca6cf | 2012-11-18 16:16:52 -0500 | [diff] [blame] | 1455 | ifdef CYGWIN_V15_WIN32API |
| 1456 | COMPAT_CFLAGS += -DCYGWIN_V15_WIN32API |
Mark Levedahl | 380a4d9 | 2012-11-11 19:17:20 -0500 | [diff] [blame] | 1457 | endif |
Nicolas Pitre | 8ecce68 | 2007-09-06 02:13:11 -0400 | [diff] [blame] | 1458 | |
Marius Storm-Olsen | f0ed822 | 2009-05-31 18:15:23 +0200 | [diff] [blame] | 1459 | ifdef USE_NED_ALLOCATOR |
René Scharfe | d555ff5 | 2010-09-11 11:59:18 +0200 | [diff] [blame] | 1460 | COMPAT_CFLAGS += -Icompat/nedmalloc |
Marius Storm-Olsen | f0ed822 | 2009-05-31 18:15:23 +0200 | [diff] [blame] | 1461 | COMPAT_OBJS += compat/nedmalloc/nedmalloc.o |
| 1462 | endif |
| 1463 | |
Junio C Hamano | 7b3bdbb | 2010-05-31 17:35:20 -0700 | [diff] [blame] | 1464 | ifdef GIT_TEST_CMP_USE_COPIED_CONTEXT |
| 1465 | export GIT_TEST_CMP_USE_COPIED_CONTEXT |
| 1466 | endif |
| 1467 | |
Ævar Arnfjörð Bjarmason | 5e9637c | 2011-11-18 00:14:42 +0100 | [diff] [blame] | 1468 | ifndef NO_MSGFMT_EXTENDED_OPTIONS |
| 1469 | MSGFMT += --check --statistics |
| 1470 | endif |
| 1471 | |
Thomas Rast | 6942efc | 2012-04-06 23:01:23 +0200 | [diff] [blame] | 1472 | ifneq (,$(XDL_FAST_HASH)) |
| 1473 | BASIC_CFLAGS += -DXDL_FAST_HASH |
| 1474 | endif |
| 1475 | |
Eygene Ryabinkin | 81b63c7 | 2007-03-28 04:12:07 -0700 | [diff] [blame] | 1476 | ifeq ($(TCLTK_PATH),) |
Stefano Lattarini | dd6fc7c | 2012-12-09 11:36:17 +0100 | [diff] [blame] | 1477 | NO_TCLTK = NoThanks |
Eygene Ryabinkin | 81b63c7 | 2007-03-28 04:12:07 -0700 | [diff] [blame] | 1478 | endif |
| 1479 | |
Jeff King | 499c293 | 2009-04-03 15:32:20 -0400 | [diff] [blame] | 1480 | ifeq ($(PERL_PATH),) |
Stefano Lattarini | dd6fc7c | 2012-12-09 11:36:17 +0100 | [diff] [blame] | 1481 | NO_PERL = NoThanks |
Jeff King | 499c293 | 2009-04-03 15:32:20 -0400 | [diff] [blame] | 1482 | endif |
| 1483 | |
Johan Herland | d4e1b47 | 2009-11-18 02:42:31 +0100 | [diff] [blame] | 1484 | ifeq ($(PYTHON_PATH),) |
Stefano Lattarini | dd6fc7c | 2012-12-09 11:36:17 +0100 | [diff] [blame] | 1485 | NO_PYTHON = NoThanks |
Johan Herland | d4e1b47 | 2009-11-18 02:42:31 +0100 | [diff] [blame] | 1486 | endif |
| 1487 | |
Fernando J. Pereda | 3b486cd | 2007-04-04 22:42:33 +0200 | [diff] [blame] | 1488 | QUIET_SUBDIR0 = +$(MAKE) -C # space to separate -C and subdir |
Alex Riesen | b777434 | 2007-03-07 00:44:49 +0100 | [diff] [blame] | 1489 | QUIET_SUBDIR1 = |
| 1490 | |
Alex Riesen | a6f3709 | 2007-03-07 00:05:34 +0100 | [diff] [blame] | 1491 | ifneq ($(findstring $(MAKEFLAGS),w),w) |
| 1492 | PRINT_DIR = --no-print-directory |
| 1493 | else # "make -w" |
| 1494 | NO_SUBDIR = : |
| 1495 | endif |
| 1496 | |
Alex Riesen | b777434 | 2007-03-07 00:44:49 +0100 | [diff] [blame] | 1497 | ifneq ($(findstring $(MAKEFLAGS),s),s) |
Shawn O. Pearce | 2314c94 | 2007-03-06 02:09:14 -0500 | [diff] [blame] | 1498 | ifndef V |
Alex Riesen | 31d0399 | 2007-03-06 23:37:18 +0100 | [diff] [blame] | 1499 | QUIET_CC = @echo ' ' CC $@; |
Shawn O. Pearce | 74f2b2a | 2007-03-06 01:35:01 -0500 | [diff] [blame] | 1500 | QUIET_AR = @echo ' ' AR $@; |
| 1501 | QUIET_LINK = @echo ' ' LINK $@; |
| 1502 | QUIET_BUILT_IN = @echo ' ' BUILTIN $@; |
| 1503 | QUIET_GEN = @echo ' ' GEN $@; |
Junio C Hamano | 611c7f6 | 2009-08-06 22:08:09 -0700 | [diff] [blame] | 1504 | QUIET_LNCP = @echo ' ' LN/CP $@; |
Ævar Arnfjörð Bjarmason | cd5513a | 2011-02-22 23:41:23 +0000 | [diff] [blame] | 1505 | QUIET_XGETTEXT = @echo ' ' XGETTEXT $@; |
Ævar Arnfjörð Bjarmason | 5e9637c | 2011-11-18 00:14:42 +0100 | [diff] [blame] | 1506 | QUIET_MSGFMT = @echo ' ' MSGFMT $@; |
Ævar Arnfjörð Bjarmason | bc548ef | 2010-07-25 19:52:40 +0000 | [diff] [blame] | 1507 | QUIET_GCOV = @echo ' ' GCOV $@; |
Ramsay Jones | 0bcd9ae | 2011-04-21 20:14:42 +0100 | [diff] [blame] | 1508 | QUIET_SP = @echo ' ' SP $<; |
Fernando J. Pereda | 3b486cd | 2007-04-04 22:42:33 +0200 | [diff] [blame] | 1509 | QUIET_SUBDIR0 = +@subdir= |
Alex Riesen | a6f3709 | 2007-03-07 00:05:34 +0100 | [diff] [blame] | 1510 | QUIET_SUBDIR1 = ;$(NO_SUBDIR) echo ' ' SUBDIR $$subdir; \ |
| 1511 | $(MAKE) $(PRINT_DIR) -C $$subdir |
Shawn O. Pearce | 2314c94 | 2007-03-06 02:09:14 -0500 | [diff] [blame] | 1512 | export V |
Alex Riesen | 31d0399 | 2007-03-06 23:37:18 +0100 | [diff] [blame] | 1513 | export QUIET_GEN |
Alex Riesen | b777434 | 2007-03-07 00:44:49 +0100 | [diff] [blame] | 1514 | export QUIET_BUILT_IN |
| 1515 | endif |
Shawn O. Pearce | 74f2b2a | 2007-03-06 01:35:01 -0500 | [diff] [blame] | 1516 | endif |
Nicolas Pitre | 7c6ef2f | 2005-09-20 12:27:13 -0400 | [diff] [blame] | 1517 | |
Junio C Hamano | 70de5e6 | 2012-05-02 15:12:10 -0700 | [diff] [blame] | 1518 | ifdef NO_INSTALL_HARDLINKS |
| 1519 | export NO_INSTALL_HARDLINKS |
| 1520 | endif |
| 1521 | |
Theodore Ts'o | f2d713f | 2012-02-06 01:00:17 -0500 | [diff] [blame] | 1522 | ### profile feedback build |
| 1523 | # |
| 1524 | |
| 1525 | # Can adjust this to be a global directory if you want to do extended |
| 1526 | # data gathering |
| 1527 | PROFILE_DIR := $(CURDIR) |
| 1528 | |
Johannes Sixt | e60ec75 | 2012-02-09 09:22:26 +0100 | [diff] [blame] | 1529 | ifeq ("$(PROFILE)","GEN") |
Theodore Ts'o | f2d713f | 2012-02-06 01:00:17 -0500 | [diff] [blame] | 1530 | CFLAGS += -fprofile-generate=$(PROFILE_DIR) -DNO_NORETURN=1 |
| 1531 | EXTLIBS += -lgcov |
Stefano Lattarini | dd6fc7c | 2012-12-09 11:36:17 +0100 | [diff] [blame] | 1532 | export CCACHE_DISABLE = t |
| 1533 | V = 1 |
Johannes Sixt | e60ec75 | 2012-02-09 09:22:26 +0100 | [diff] [blame] | 1534 | else |
| 1535 | ifneq ("$(PROFILE)","") |
Theodore Ts'o | f2d713f | 2012-02-06 01:00:17 -0500 | [diff] [blame] | 1536 | CFLAGS += -fprofile-use=$(PROFILE_DIR) -fprofile-correction -DNO_NORETURN=1 |
Stefano Lattarini | dd6fc7c | 2012-12-09 11:36:17 +0100 | [diff] [blame] | 1537 | export CCACHE_DISABLE = t |
| 1538 | V = 1 |
Theodore Ts'o | f2d713f | 2012-02-06 01:00:17 -0500 | [diff] [blame] | 1539 | endif |
Johannes Sixt | e60ec75 | 2012-02-09 09:22:26 +0100 | [diff] [blame] | 1540 | endif |
Theodore Ts'o | f2d713f | 2012-02-06 01:00:17 -0500 | [diff] [blame] | 1541 | |
Pavel Roskin | addf88e | 2006-07-09 03:44:30 -0400 | [diff] [blame] | 1542 | # Shell quote (do not use $(call) to accommodate ancient setups); |
Johannes Schindelin | 39c015c | 2006-02-18 12:40:22 +0100 | [diff] [blame] | 1543 | |
| 1544 | SHA1_HEADER_SQ = $(subst ','\'',$(SHA1_HEADER)) |
Johannes Schindelin | 32043c9 | 2007-02-14 12:48:14 +0100 | [diff] [blame] | 1545 | ETC_GITCONFIG_SQ = $(subst ','\'',$(ETC_GITCONFIG)) |
Petr Onderka | 6df42ab | 2010-09-01 00:42:43 +0200 | [diff] [blame] | 1546 | ETC_GITATTRIBUTES_SQ = $(subst ','\'',$(ETC_GITATTRIBUTES)) |
Johannes Schindelin | 39c015c | 2006-02-18 12:40:22 +0100 | [diff] [blame] | 1547 | |
| 1548 | DESTDIR_SQ = $(subst ','\'',$(DESTDIR)) |
| 1549 | bindir_SQ = $(subst ','\'',$(bindir)) |
Steffen Prohaska | 026fa0d | 2009-01-18 13:00:09 +0100 | [diff] [blame] | 1550 | bindir_relative_SQ = $(subst ','\'',$(bindir_relative)) |
Sergei Organov | 8e566f2 | 2007-12-06 21:33:01 +0300 | [diff] [blame] | 1551 | mandir_SQ = $(subst ','\'',$(mandir)) |
Junio C Hamano | a149a1a | 2007-12-10 01:35:29 -0800 | [diff] [blame] | 1552 | infodir_SQ = $(subst ','\'',$(infodir)) |
Ævar Arnfjörð Bjarmason | 5e9637c | 2011-11-18 00:14:42 +0100 | [diff] [blame] | 1553 | localedir_SQ = $(subst ','\'',$(localedir)) |
Johannes Schindelin | 39c015c | 2006-02-18 12:40:22 +0100 | [diff] [blame] | 1554 | gitexecdir_SQ = $(subst ','\'',$(gitexecdir)) |
| 1555 | template_dir_SQ = $(subst ','\'',$(template_dir)) |
Christian Couder | 5d6491c | 2007-12-02 06:07:55 +0100 | [diff] [blame] | 1556 | htmldir_SQ = $(subst ','\'',$(htmldir)) |
Yakov Lerner | ca3bcab | 2006-06-15 01:36:00 +0300 | [diff] [blame] | 1557 | prefix_SQ = $(subst ','\'',$(prefix)) |
Pavan Kumar Sunkara | c0cb4ed | 2010-05-28 11:55:52 +0530 | [diff] [blame] | 1558 | gitwebdir_SQ = $(subst ','\'',$(gitwebdir)) |
Johannes Schindelin | 39c015c | 2006-02-18 12:40:22 +0100 | [diff] [blame] | 1559 | |
| 1560 | SHELL_PATH_SQ = $(subst ','\'',$(SHELL_PATH)) |
| 1561 | PERL_PATH_SQ = $(subst ','\'',$(PERL_PATH)) |
Johan Herland | d4e1b47 | 2009-11-18 02:42:31 +0100 | [diff] [blame] | 1562 | PYTHON_PATH_SQ = $(subst ','\'',$(PYTHON_PATH)) |
Eygene Ryabinkin | 81b63c7 | 2007-03-28 04:12:07 -0700 | [diff] [blame] | 1563 | TCLTK_PATH_SQ = $(subst ','\'',$(TCLTK_PATH)) |
Junio C Hamano | 09ce4bb | 2010-06-05 09:36:13 -0700 | [diff] [blame] | 1564 | DIFF_SQ = $(subst ','\'',$(DIFF)) |
Johannes Schindelin | 39c015c | 2006-02-18 12:40:22 +0100 | [diff] [blame] | 1565 | |
Petr Baudis | d595a47 | 2006-06-24 18:35:12 -0700 | [diff] [blame] | 1566 | LIBS = $(GITLIBS) $(EXTLIBS) |
| 1567 | |
Johannes Schindelin | 32043c9 | 2007-02-14 12:48:14 +0100 | [diff] [blame] | 1568 | BASIC_CFLAGS += -DSHA1_HEADER='$(SHA1_HEADER_SQ)' \ |
Johannes Sixt | 506b17b | 2007-11-13 21:05:05 +0100 | [diff] [blame] | 1569 | $(COMPAT_CFLAGS) |
Jason Riedy | e40b61f | 2005-12-02 15:08:28 -0800 | [diff] [blame] | 1570 | LIB_OBJS += $(COMPAT_OBJS) |
Petr Baudis | 8d7f586 | 2006-06-25 03:47:03 +0200 | [diff] [blame] | 1571 | |
Jonathan Nieder | 8f4b576 | 2009-10-30 20:44:41 -0500 | [diff] [blame] | 1572 | # Quote for C |
| 1573 | |
| 1574 | ifdef DEFAULT_EDITOR |
| 1575 | DEFAULT_EDITOR_CQ = "$(subst ",\",$(subst \,\\,$(DEFAULT_EDITOR)))" |
| 1576 | DEFAULT_EDITOR_CQ_SQ = $(subst ','\'',$(DEFAULT_EDITOR_CQ)) |
| 1577 | |
| 1578 | BASIC_CFLAGS += -DDEFAULT_EDITOR='$(DEFAULT_EDITOR_CQ_SQ)' |
| 1579 | endif |
| 1580 | |
Junio C Hamano | a3d023d | 2009-10-30 20:45:34 -0500 | [diff] [blame] | 1581 | ifdef DEFAULT_PAGER |
| 1582 | DEFAULT_PAGER_CQ = "$(subst ",\",$(subst \,\\,$(DEFAULT_PAGER)))" |
| 1583 | DEFAULT_PAGER_CQ_SQ = $(subst ','\'',$(DEFAULT_PAGER_CQ)) |
| 1584 | |
| 1585 | BASIC_CFLAGS += -DDEFAULT_PAGER='$(DEFAULT_PAGER_CQ_SQ)' |
| 1586 | endif |
| 1587 | |
Ben Walton | b3e34dd | 2012-03-30 21:33:21 -0400 | [diff] [blame] | 1588 | ifdef SHELL_PATH |
| 1589 | SHELL_PATH_CQ = "$(subst ",\",$(subst \,\\,$(SHELL_PATH)))" |
| 1590 | SHELL_PATH_CQ_SQ = $(subst ','\'',$(SHELL_PATH_CQ)) |
| 1591 | |
| 1592 | BASIC_CFLAGS += -DSHELL_PATH='$(SHELL_PATH_CQ_SQ)' |
| 1593 | endif |
| 1594 | |
Jeff King | 42dcbb7 | 2012-06-02 15:01:12 -0400 | [diff] [blame] | 1595 | GIT_USER_AGENT_SQ = $(subst ','\'',$(GIT_USER_AGENT)) |
| 1596 | GIT_USER_AGENT_CQ = "$(subst ",\",$(subst \,\\,$(GIT_USER_AGENT)))" |
| 1597 | GIT_USER_AGENT_CQ_SQ = $(subst ','\'',$(GIT_USER_AGENT_CQ)) |
Jeff King | 620c293 | 2012-06-20 14:31:51 -0400 | [diff] [blame] | 1598 | GIT-USER-AGENT: FORCE |
| 1599 | @if test x'$(GIT_USER_AGENT_SQ)' != x"`cat GIT-USER-AGENT 2>/dev/null`"; then \ |
Jeff King | 620c293 | 2012-06-20 14:31:51 -0400 | [diff] [blame] | 1600 | echo '$(GIT_USER_AGENT_SQ)' >GIT-USER-AGENT; \ |
| 1601 | fi |
Jeff King | 42dcbb7 | 2012-06-02 15:01:12 -0400 | [diff] [blame] | 1602 | |
Vincent van Ravesteijn | 1cc8af0 | 2012-06-06 20:28:16 +0000 | [diff] [blame] | 1603 | ifdef DEFAULT_HELP_FORMAT |
| 1604 | BASIC_CFLAGS += -DDEFAULT_HELP_FORMAT='"$(DEFAULT_HELP_FORMAT)"' |
| 1605 | endif |
| 1606 | |
Petr Baudis | 8d7f586 | 2006-06-25 03:47:03 +0200 | [diff] [blame] | 1607 | ALL_CFLAGS += $(BASIC_CFLAGS) |
| 1608 | ALL_LDFLAGS += $(BASIC_LDFLAGS) |
| 1609 | |
Gary V. Vaughan | d1b1a91 | 2010-05-14 09:31:36 +0000 | [diff] [blame] | 1610 | export DIFF TAR INSTALL DESTDIR SHELL_PATH |
Petr Baudis | d595a47 | 2006-06-24 18:35:12 -0700 | [diff] [blame] | 1611 | |
| 1612 | |
Petr Baudis | 28818ff | 2005-07-29 17:50:24 +0200 | [diff] [blame] | 1613 | ### Build rules |
Linus Torvalds | 8996702 | 2005-04-30 13:19:56 -0700 | [diff] [blame] | 1614 | |
Brandon Casey | c94c8e5 | 2008-08-07 14:03:42 -0500 | [diff] [blame] | 1615 | SHELL = $(SHELL_PATH) |
| 1616 | |
Theodore Ts'o | f2d713f | 2012-02-06 01:00:17 -0500 | [diff] [blame] | 1617 | all:: shell_compatibility_test |
| 1618 | |
| 1619 | ifeq "$(PROFILE)" "BUILD" |
| 1620 | ifeq ($(filter all,$(MAKECMDGOALS)),all) |
| 1621 | all:: profile-clean |
| 1622 | $(MAKE) PROFILE=GEN all |
| 1623 | $(MAKE) PROFILE=GEN -j1 test |
| 1624 | endif |
| 1625 | endif |
| 1626 | |
| 1627 | all:: $(ALL_PROGRAMS) $(SCRIPT_LIB) $(BUILT_INS) $(OTHER_PROGRAMS) GIT-BUILD-OPTIONS |
Junio C Hamano | 6fc301b | 2007-01-10 12:24:54 -0800 | [diff] [blame] | 1628 | ifneq (,$X) |
Sebastian Schuberth | ade2ca0 | 2009-10-27 12:23:33 +0100 | [diff] [blame] | 1629 | $(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] | 1630 | endif |
Petr Baudis | 28818ff | 2005-07-29 17:50:24 +0200 | [diff] [blame] | 1631 | |
Junio C Hamano | 6fc301b | 2007-01-10 12:24:54 -0800 | [diff] [blame] | 1632 | all:: |
Eygene Ryabinkin | 3cfaf11 | 2007-03-28 04:00:23 -0700 | [diff] [blame] | 1633 | ifndef NO_TCLTK |
Junio C Hamano | e84a063 | 2008-07-28 00:02:48 -0700 | [diff] [blame] | 1634 | $(QUIET_SUBDIR0)git-gui $(QUIET_SUBDIR1) gitexecdir='$(gitexec_instdir_SQ)' all |
Junio C Hamano | 62ba514 | 2007-11-17 10:51:16 -0800 | [diff] [blame] | 1635 | $(QUIET_SUBDIR0)gitk-git $(QUIET_SUBDIR1) all |
Eygene Ryabinkin | 3cfaf11 | 2007-03-28 04:00:23 -0700 | [diff] [blame] | 1636 | endif |
Jeff King | 499c293 | 2009-04-03 15:32:20 -0400 | [diff] [blame] | 1637 | ifndef NO_PERL |
Ævar Arnfjörð Bjarmason | 5e9637c | 2011-11-18 00:14:42 +0100 | [diff] [blame] | 1638 | $(QUIET_SUBDIR0)perl $(QUIET_SUBDIR1) PERL_PATH='$(PERL_PATH_SQ)' prefix='$(prefix_SQ)' localedir='$(localedir_SQ)' all |
Jeff King | 499c293 | 2009-04-03 15:32:20 -0400 | [diff] [blame] | 1639 | endif |
Sverre Rabbelier | 2fe40b6 | 2009-11-18 02:42:32 +0100 | [diff] [blame] | 1640 | ifndef NO_PYTHON |
| 1641 | $(QUIET_SUBDIR0)git_remote_helpers $(QUIET_SUBDIR1) PYTHON_PATH='$(PYTHON_PATH_SQ)' prefix='$(prefix_SQ)' all |
| 1642 | endif |
Ben Walton | 502be95 | 2010-03-20 10:48:08 -0400 | [diff] [blame] | 1643 | $(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] | 1644 | |
Brandon Casey | 6dc4627 | 2008-08-07 14:06:26 -0500 | [diff] [blame] | 1645 | please_set_SHELL_PATH_to_a_more_modern_shell: |
| 1646 | @$$(:) |
| 1647 | |
| 1648 | shell_compatibility_test: please_set_SHELL_PATH_to_a_more_modern_shell |
| 1649 | |
Junio C Hamano | 4dc0002 | 2006-01-12 21:42:25 -0800 | [diff] [blame] | 1650 | strip: $(PROGRAMS) git$X |
| 1651 | $(STRIP) $(STRIP_OPTS) $(PROGRAMS) git$X |
| 1652 | |
Jonathan Nieder | 7b63c77 | 2012-07-06 23:19:09 -0500 | [diff] [blame] | 1653 | ### Target-specific flags and dependencies |
| 1654 | |
| 1655 | # The generic compilation pattern rule and automatically |
| 1656 | # computed header dependencies (falling back to a dependency on |
| 1657 | # LIB_H) are enough to describe how most targets should be built, |
| 1658 | # but some targets are special enough to need something a little |
| 1659 | # different. |
| 1660 | # |
| 1661 | # - When a source file "foo.c" #includes a generated header file, |
| 1662 | # we need to list that dependency for the "foo.o" target. |
| 1663 | # |
| 1664 | # We also list it from other targets that are built from foo.c |
| 1665 | # like "foo.sp" and "foo.s", even though that is easy to forget |
| 1666 | # to do because the generated header is already present around |
| 1667 | # after a regular build attempt. |
| 1668 | # |
| 1669 | # - Some code depends on configuration kept in makefile |
| 1670 | # variables. The target-specific variable EXTRA_CPPFLAGS can |
| 1671 | # be used to convey that information to the C preprocessor |
| 1672 | # using -D options. |
| 1673 | # |
| 1674 | # The "foo.o" target should have a corresponding dependency on |
| 1675 | # a file that changes when the value of the makefile variable |
| 1676 | # changes. For example, targets making use of the |
| 1677 | # $(GIT_VERSION) variable depend on GIT-VERSION-FILE. |
| 1678 | # |
| 1679 | # Technically the ".sp" and ".s" targets do not need this |
| 1680 | # dependency because they are force-built, but they get the |
| 1681 | # same dependency for consistency. This way, you do not have to |
| 1682 | # know how each target is implemented. And it means the |
| 1683 | # dependencies here will not need to change if the force-build |
| 1684 | # details change some day. |
| 1685 | |
Jeff King | be1dbd0 | 2012-06-20 14:31:55 -0400 | [diff] [blame] | 1686 | git.sp git.s git.o: GIT-PREFIX |
Jeff King | 816fb46 | 2012-06-02 14:51:42 -0400 | [diff] [blame] | 1687 | git.sp git.s git.o: EXTRA_CPPFLAGS = \ |
Jon Seymour | f2dd8c3 | 2011-05-01 18:16:25 +1000 | [diff] [blame] | 1688 | '-DGIT_HTML_PATH="$(htmldir_SQ)"' \ |
| 1689 | '-DGIT_MAN_PATH="$(mandir_SQ)"' \ |
| 1690 | '-DGIT_INFO_PATH="$(infodir_SQ)"' |
Junio C Hamano | 334d28a | 2007-06-13 01:28:21 -0700 | [diff] [blame] | 1691 | |
Fredrik Kuivinen | d9a25fc | 2011-06-22 12:50:56 +0200 | [diff] [blame] | 1692 | git$X: git.o GIT-LDFLAGS $(BUILTIN_OBJS) $(GITLIBS) |
Matt McCutchen | 54dadbd | 2007-07-09 21:30:39 -0400 | [diff] [blame] | 1693 | $(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ git.o \ |
Linus Torvalds | 70827b1 | 2006-04-21 10:27:34 -0700 | [diff] [blame] | 1694 | $(BUILTIN_OBJS) $(ALL_LDFLAGS) $(LIBS) |
Junio C Hamano | 6a2e50f | 2005-09-07 21:26:52 -0700 | [diff] [blame] | 1695 | |
Jeff King | c0219dd | 2012-06-20 14:31:33 -0400 | [diff] [blame] | 1696 | help.sp help.s help.o: common-cmds.h |
Erik Faye-Lund | 6612b9e | 2010-11-26 17:00:39 +0100 | [diff] [blame] | 1697 | |
Jeff King | be1dbd0 | 2012-06-20 14:31:55 -0400 | [diff] [blame] | 1698 | builtin/help.sp builtin/help.s builtin/help.o: common-cmds.h GIT-PREFIX |
Ramsay Jones | 0bcd9ae | 2011-04-21 20:14:42 +0100 | [diff] [blame] | 1699 | builtin/help.sp builtin/help.s builtin/help.o: EXTRA_CPPFLAGS = \ |
Jonathan Nieder | 373a5ed | 2010-01-06 02:05:04 -0600 | [diff] [blame] | 1700 | '-DGIT_HTML_PATH="$(htmldir_SQ)"' \ |
| 1701 | '-DGIT_MAN_PATH="$(mandir_SQ)"' \ |
| 1702 | '-DGIT_INFO_PATH="$(infodir_SQ)"' |
Junio C Hamano | 08df617 | 2006-04-21 21:56:13 -0700 | [diff] [blame] | 1703 | |
Jeff King | 520a6cd | 2012-06-20 14:32:22 -0400 | [diff] [blame] | 1704 | version.sp version.s version.o: GIT-VERSION-FILE GIT-USER-AGENT |
Jeff King | 816fb46 | 2012-06-02 14:51:42 -0400 | [diff] [blame] | 1705 | version.sp version.s version.o: EXTRA_CPPFLAGS = \ |
Jeff King | 620c293 | 2012-06-20 14:31:51 -0400 | [diff] [blame] | 1706 | '-DGIT_VERSION="$(GIT_VERSION)"' \ |
| 1707 | '-DGIT_USER_AGENT=$(GIT_USER_AGENT_CQ_SQ)' |
Jeff King | 816fb46 | 2012-06-02 14:51:42 -0400 | [diff] [blame] | 1708 | |
Junio C Hamano | 9173080 | 2006-04-10 17:37:58 -0700 | [diff] [blame] | 1709 | $(BUILT_INS): git$X |
Andreas Färber | 3e073dc | 2008-08-25 17:33:03 +0200 | [diff] [blame] | 1710 | $(QUIET_BUILT_IN)$(RM) $@ && \ |
| 1711 | ln git$X $@ 2>/dev/null || \ |
| 1712 | ln -s git$X $@ 2>/dev/null || \ |
| 1713 | cp git$X $@ |
Junio C Hamano | 9173080 | 2006-04-10 17:37:58 -0700 | [diff] [blame] | 1714 | |
Junio C Hamano | 79d3066 | 2007-12-01 23:39:19 -0800 | [diff] [blame] | 1715 | common-cmds.h: ./generate-cmdlist.sh command-list.txt |
Junio C Hamano | 48dd1da | 2007-06-13 02:00:01 -0700 | [diff] [blame] | 1716 | |
Junio C Hamano | 766b084 | 2007-04-05 15:03:48 -0700 | [diff] [blame] | 1717 | common-cmds.h: $(wildcard Documentation/git-*.txt) |
Shawn O. Pearce | 74f2b2a | 2007-03-06 01:35:01 -0500 | [diff] [blame] | 1718 | $(QUIET_GEN)./generate-cmdlist.sh > $@+ && mv $@+ $@ |
Fredrik Kuivinen | a87cd02 | 2006-03-09 17:24:19 +0100 | [diff] [blame] | 1719 | |
Jeff King | e4dd89a | 2012-06-20 14:32:16 -0400 | [diff] [blame] | 1720 | SCRIPT_DEFINES = $(SHELL_PATH_SQ):$(DIFF_SQ):$(GIT_VERSION):\ |
Jeff King | b5295f3 | 2012-06-20 14:32:19 -0400 | [diff] [blame] | 1721 | $(localedir_SQ):$(NO_CURL):$(USE_GETTEXT_SCHEME):$(SANE_TOOL_PATH_SQ):\ |
| 1722 | $(gitwebdir_SQ):$(PERL_PATH_SQ) |
Jonathan Nieder | 46bac90 | 2010-01-31 11:46:53 -0800 | [diff] [blame] | 1723 | define cmd_munge_script |
| 1724 | $(RM) $@ $@+ && \ |
| 1725 | sed -e '1s|#!.*/sh|#!$(SHELL_PATH_SQ)|' \ |
| 1726 | -e 's|@SHELL_PATH@|$(SHELL_PATH_SQ)|' \ |
Junio C Hamano | 09ce4bb | 2010-06-05 09:36:13 -0700 | [diff] [blame] | 1727 | -e 's|@@DIFF@@|$(DIFF_SQ)|' \ |
Ævar Arnfjörð Bjarmason | 5e9637c | 2011-11-18 00:14:42 +0100 | [diff] [blame] | 1728 | -e 's|@@LOCALEDIR@@|$(localedir_SQ)|g' \ |
Jonathan Nieder | 46bac90 | 2010-01-31 11:46:53 -0800 | [diff] [blame] | 1729 | -e 's/@@NO_CURL@@/$(NO_CURL)/g' \ |
Alex Riesen | ad17ea7 | 2012-01-23 14:04:29 -0800 | [diff] [blame] | 1730 | -e 's/@@USE_GETTEXT_SCHEME@@/$(USE_GETTEXT_SCHEME)/g' \ |
Jonathan Nieder | 46bac90 | 2010-01-31 11:46:53 -0800 | [diff] [blame] | 1731 | -e $(BROKEN_PATH_FIX) \ |
Jeff King | b5295f3 | 2012-06-20 14:32:19 -0400 | [diff] [blame] | 1732 | -e 's|@@GITWEBDIR@@|$(gitwebdir_SQ)|g' \ |
| 1733 | -e 's|@@PERL@@|$(PERL_PATH_SQ)|g' \ |
Jonathan Nieder | 46bac90 | 2010-01-31 11:46:53 -0800 | [diff] [blame] | 1734 | $@.sh >$@+ |
| 1735 | endef |
| 1736 | |
Jeff King | e4dd89a | 2012-06-20 14:32:16 -0400 | [diff] [blame] | 1737 | GIT-SCRIPT-DEFINES: FORCE |
| 1738 | @FLAGS='$(SCRIPT_DEFINES)'; \ |
| 1739 | if test x"$$FLAGS" != x"`cat $@ 2>/dev/null`" ; then \ |
Christian Couder | 1a59d88 | 2012-12-18 16:26:39 +0100 | [diff] [blame] | 1740 | echo >&2 " * new script parameters"; \ |
Jeff King | e4dd89a | 2012-06-20 14:32:16 -0400 | [diff] [blame] | 1741 | echo "$$FLAGS" >$@; \ |
| 1742 | fi |
| 1743 | |
| 1744 | |
| 1745 | $(patsubst %.sh,%,$(SCRIPT_SH)) : % : %.sh GIT-SCRIPT-DEFINES |
Jonathan Nieder | 46bac90 | 2010-01-31 11:46:53 -0800 | [diff] [blame] | 1746 | $(QUIET_GEN)$(cmd_munge_script) && \ |
Shawn O. Pearce | 74f2b2a | 2007-03-06 01:35:01 -0500 | [diff] [blame] | 1747 | chmod +x $@+ && \ |
Jim Meyering | fc36f6a | 2006-05-25 18:52:01 +0200 | [diff] [blame] | 1748 | mv $@+ $@ |
Junio C Hamano | bc6146d | 2005-09-08 18:50:33 -0700 | [diff] [blame] | 1749 | |
Jeff King | e4dd89a | 2012-06-20 14:32:16 -0400 | [diff] [blame] | 1750 | $(SCRIPT_LIB) : % : %.sh GIT-SCRIPT-DEFINES |
Jonathan Nieder | 46bac90 | 2010-01-31 11:46:53 -0800 | [diff] [blame] | 1751 | $(QUIET_GEN)$(cmd_munge_script) && \ |
| 1752 | mv $@+ $@ |
| 1753 | |
Jeff King | 499c293 | 2009-04-03 15:32:20 -0400 | [diff] [blame] | 1754 | ifndef NO_PERL |
Alex Riesen | f848718 | 2006-12-04 10:50:04 +0100 | [diff] [blame] | 1755 | $(patsubst %.perl,%,$(SCRIPT_PERL)): perl/perl.mak |
| 1756 | |
Junio C Hamano | ee9be06 | 2012-07-27 20:04:20 +0000 | [diff] [blame] | 1757 | perl/perl.mak: perl/PM.stamp |
| 1758 | |
| 1759 | perl/PM.stamp: FORCE |
Johannes Sixt | 9145b19 | 2012-08-06 23:06:14 +0200 | [diff] [blame] | 1760 | $(QUIET_GEN)$(FIND) perl -type f -name '*.pm' | sort >$@+ && \ |
Junio C Hamano | ee9be06 | 2012-07-27 20:04:20 +0000 | [diff] [blame] | 1761 | { cmp $@+ $@ >/dev/null 2>/dev/null || mv $@+ $@; } && \ |
| 1762 | $(RM) $@+ |
| 1763 | |
Jeff King | be1dbd0 | 2012-06-20 14:31:55 -0400 | [diff] [blame] | 1764 | perl/perl.mak: GIT-CFLAGS GIT-PREFIX perl/Makefile perl/Makefile.PL |
Alex Riesen | 31d0399 | 2007-03-06 23:37:18 +0100 | [diff] [blame] | 1765 | $(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] | 1766 | |
Jeff King | 520a6cd | 2012-06-20 14:32:22 -0400 | [diff] [blame] | 1767 | $(patsubst %.perl,%,$(SCRIPT_PERL)): % : %.perl GIT-VERSION-FILE |
Emil Medve | 4cb08df | 2007-07-14 12:51:44 -0500 | [diff] [blame] | 1768 | $(QUIET_GEN)$(RM) $@ $@+ && \ |
Jim Meyering | e883932 | 2007-09-25 08:42:16 +0200 | [diff] [blame] | 1769 | INSTLIBDIR=`MAKEFLAGS= $(MAKE) -C perl -s --no-print-directory instlibdir` && \ |
Junio C Hamano | 998c4da | 2006-07-07 13:04:35 -0700 | [diff] [blame] | 1770 | sed -e '1{' \ |
| 1771 | -e ' s|#!.*perl|#!$(PERL_PATH_SQ)|' \ |
| 1772 | -e ' h' \ |
Ævar Arnfjörð Bjarmason | a6c6060 | 2010-05-30 17:12:41 +0000 | [diff] [blame] | 1773 | -e ' s=.*=use lib (split(/$(pathsep)/, $$ENV{GITPERLLIB} || "'"$$INSTLIBDIR"'"));=' \ |
Junio C Hamano | 998c4da | 2006-07-07 13:04:35 -0700 | [diff] [blame] | 1774 | -e ' H' \ |
| 1775 | -e ' x' \ |
| 1776 | -e '}' \ |
Junio C Hamano | 3ff8cbe | 2005-10-04 12:41:35 -0700 | [diff] [blame] | 1777 | -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' \ |
Shawn O. Pearce | 74f2b2a | 2007-03-06 01:35:01 -0500 | [diff] [blame] | 1778 | $@.perl >$@+ && \ |
| 1779 | chmod +x $@+ && \ |
Jim Meyering | fc36f6a | 2006-05-25 18:52:01 +0200 | [diff] [blame] | 1780 | mv $@+ $@ |
Junio C Hamano | bc6146d | 2005-09-08 18:50:33 -0700 | [diff] [blame] | 1781 | |
John 'Warthog9' Hawley | 62331ef | 2010-01-30 23:30:40 +0100 | [diff] [blame] | 1782 | |
| 1783 | .PHONY: gitweb |
| 1784 | gitweb: |
| 1785 | $(QUIET_SUBDIR0)gitweb $(QUIET_SUBDIR1) all |
| 1786 | |
Jeff King | b5295f3 | 2012-06-20 14:32:19 -0400 | [diff] [blame] | 1787 | git-instaweb: git-instaweb.sh gitweb GIT-SCRIPT-DEFINES |
| 1788 | $(QUIET_GEN)$(cmd_munge_script) && \ |
Shawn O. Pearce | 74f2b2a | 2007-03-06 01:35:01 -0500 | [diff] [blame] | 1789 | chmod +x $@+ && \ |
Eric Wong | a51d37c | 2006-07-01 15:14:14 -0700 | [diff] [blame] | 1790 | mv $@+ $@ |
Jeff King | 499c293 | 2009-04-03 15:32:20 -0400 | [diff] [blame] | 1791 | else # NO_PERL |
| 1792 | $(patsubst %.perl,%,$(SCRIPT_PERL)) git-instaweb: % : unimplemented.sh |
| 1793 | $(QUIET_GEN)$(RM) $@ $@+ && \ |
| 1794 | sed -e '1s|#!.*/sh|#!$(SHELL_PATH_SQ)|' \ |
| 1795 | -e 's|@@REASON@@|NO_PERL=$(NO_PERL)|g' \ |
| 1796 | unimplemented.sh >$@+ && \ |
| 1797 | chmod +x $@+ && \ |
| 1798 | mv $@+ $@ |
| 1799 | endif # NO_PERL |
Eric Wong | a51d37c | 2006-07-01 15:14:14 -0700 | [diff] [blame] | 1800 | |
Sverre Rabbelier | 2fe40b6 | 2009-11-18 02:42:32 +0100 | [diff] [blame] | 1801 | ifndef NO_PYTHON |
Christian Couder | 96a4647 | 2012-12-18 16:26:38 +0100 | [diff] [blame] | 1802 | $(patsubst %.py,%,$(SCRIPT_PYTHON)): GIT-CFLAGS GIT-PREFIX GIT-PYTHON-VARS |
Sverre Rabbelier | 2fe40b6 | 2009-11-18 02:42:32 +0100 | [diff] [blame] | 1803 | $(patsubst %.py,%,$(SCRIPT_PYTHON)): % : %.py |
| 1804 | $(QUIET_GEN)$(RM) $@ $@+ && \ |
| 1805 | INSTLIBDIR=`MAKEFLAGS= $(MAKE) -C git_remote_helpers -s \ |
| 1806 | --no-print-directory prefix='$(prefix_SQ)' DESTDIR='$(DESTDIR_SQ)' \ |
| 1807 | instlibdir` && \ |
Brian Gernhardt | f733f6a | 2010-04-09 11:57:45 -0400 | [diff] [blame] | 1808 | sed -e '1s|#!.*python|#!$(PYTHON_PATH_SQ)|' \ |
| 1809 | -e 's|\(os\.getenv("GITPYTHONLIB"\)[^)]*)|\1,"@@INSTLIBDIR@@")|' \ |
Sverre Rabbelier | 2fe40b6 | 2009-11-18 02:42:32 +0100 | [diff] [blame] | 1810 | -e 's|@@INSTLIBDIR@@|'"$$INSTLIBDIR"'|g' \ |
| 1811 | $@.py >$@+ && \ |
| 1812 | chmod +x $@+ && \ |
| 1813 | mv $@+ $@ |
| 1814 | else # NO_PYTHON |
| 1815 | $(patsubst %.py,%,$(SCRIPT_PYTHON)): % : unimplemented.sh |
| 1816 | $(QUIET_GEN)$(RM) $@ $@+ && \ |
| 1817 | sed -e '1s|#!.*/sh|#!$(SHELL_PATH_SQ)|' \ |
| 1818 | -e 's|@@REASON@@|NO_PYTHON=$(NO_PYTHON)|g' \ |
| 1819 | unimplemented.sh >$@+ && \ |
| 1820 | chmod +x $@+ && \ |
| 1821 | mv $@+ $@ |
| 1822 | endif # NO_PYTHON |
| 1823 | |
Jeff King | 7f1b697 | 2013-02-21 01:26:14 -0500 | [diff] [blame] | 1824 | CONFIGURE_RECIPE = $(RM) configure configure.ac+ && \ |
| 1825 | sed -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' \ |
| 1826 | configure.ac >configure.ac+ && \ |
| 1827 | autoconf -o configure configure.ac+ && \ |
| 1828 | $(RM) configure.ac+ |
| 1829 | |
Jeff King | 520a6cd | 2012-06-20 14:32:22 -0400 | [diff] [blame] | 1830 | configure: configure.ac GIT-VERSION-FILE |
Jeff King | 7f1b697 | 2013-02-21 01:26:14 -0500 | [diff] [blame] | 1831 | $(QUIET_GEN)$(CONFIGURE_RECIPE) |
Jakub Narebski | 3900145 | 2006-08-08 18:35:23 +0200 | [diff] [blame] | 1832 | |
Stefano Lattarini | 8242ff4 | 2012-07-19 09:50:02 +0200 | [diff] [blame] | 1833 | ifdef AUTOCONFIGURED |
Jonathan Nieder | 1226504 | 2013-01-02 00:25:44 -0800 | [diff] [blame] | 1834 | # We avoid depending on 'configure' here, because it gets rebuilt |
| 1835 | # every time GIT-VERSION-FILE is modified, only to update the embedded |
| 1836 | # version number string, which config.status does not care about. We |
| 1837 | # do want to recheck when the platform/environment detection logic |
| 1838 | # changes, hence this depends on configure.ac. |
| 1839 | config.status: configure.ac |
Jeff King | 7f1b697 | 2013-02-21 01:26:14 -0500 | [diff] [blame] | 1840 | $(QUIET_GEN)$(CONFIGURE_RECIPE) && \ |
Jonathan Nieder | 1226504 | 2013-01-02 00:25:44 -0800 | [diff] [blame] | 1841 | if test -f config.status; then \ |
Stefano Lattarini | 8242ff4 | 2012-07-19 09:50:02 +0200 | [diff] [blame] | 1842 | ./config.status --recheck; \ |
| 1843 | else \ |
| 1844 | ./configure; \ |
| 1845 | fi |
| 1846 | reconfigure config.mak.autogen: config.status |
| 1847 | $(QUIET_GEN)./config.status |
| 1848 | .PHONY: reconfigure # This is a convenience target. |
| 1849 | endif |
| 1850 | |
Jonathan Nieder | 3371f9b | 2011-03-27 13:13:22 -0500 | [diff] [blame] | 1851 | XDIFF_OBJS += xdiff/xdiffi.o |
| 1852 | XDIFF_OBJS += xdiff/xprepare.o |
| 1853 | XDIFF_OBJS += xdiff/xutils.o |
| 1854 | XDIFF_OBJS += xdiff/xemit.o |
| 1855 | XDIFF_OBJS += xdiff/xmerge.o |
| 1856 | XDIFF_OBJS += xdiff/xpatience.o |
Junio C Hamano | d475536 | 2012-01-27 11:04:28 -0800 | [diff] [blame] | 1857 | XDIFF_OBJS += xdiff/xhistogram.o |
Jonathan Nieder | 3371f9b | 2011-03-27 13:13:22 -0500 | [diff] [blame] | 1858 | |
Jonathan Nieder | 3371f9b | 2011-03-27 13:13:22 -0500 | [diff] [blame] | 1859 | VCSSVN_OBJS += vcs-svn/line_buffer.o |
Jonathan Nieder | 9d2f5dd | 2011-01-02 21:54:58 -0600 | [diff] [blame] | 1860 | VCSSVN_OBJS += vcs-svn/sliding_window.o |
Jonathan Nieder | 3371f9b | 2011-03-27 13:13:22 -0500 | [diff] [blame] | 1861 | VCSSVN_OBJS += vcs-svn/repo_tree.o |
| 1862 | VCSSVN_OBJS += vcs-svn/fast_export.o |
Jonathan Nieder | ddcc8c5 | 2010-12-25 05:11:32 -0600 | [diff] [blame] | 1863 | VCSSVN_OBJS += vcs-svn/svndiff.o |
Jonathan Nieder | 3371f9b | 2011-03-27 13:13:22 -0500 | [diff] [blame] | 1864 | VCSSVN_OBJS += vcs-svn/svndump.o |
| 1865 | |
Jonathan Nieder | 60d24dd | 2012-07-06 22:39:18 -0500 | [diff] [blame] | 1866 | TEST_OBJS := $(patsubst test-%$X,test-%.o,$(TEST_PROGRAMS)) |
| 1867 | OBJECTS := $(LIB_OBJS) $(BUILTIN_OBJS) $(PROGRAM_OBJS) $(TEST_OBJS) \ |
| 1868 | $(XDIFF_OBJS) \ |
| 1869 | $(VCSSVN_OBJS) \ |
| 1870 | git.o |
| 1871 | ifndef NO_CURL |
| 1872 | OBJECTS += http.o http-walker.o remote-curl.o |
| 1873 | endif |
Jonathan Nieder | c373991 | 2010-01-26 09:52:11 -0600 | [diff] [blame] | 1874 | |
Jonathan Nieder | ec5e0bb | 2010-01-31 15:23:53 -0600 | [diff] [blame] | 1875 | dep_files := $(foreach f,$(OBJECTS),$(dir $f).depend/$(notdir $f).d) |
Jonathan Nieder | 010acc1 | 2010-01-31 15:37:25 -0600 | [diff] [blame] | 1876 | dep_dirs := $(addsuffix .depend,$(sort $(dir $(OBJECTS)))) |
Jonathan Nieder | beeb456 | 2010-01-26 09:49:33 -0600 | [diff] [blame] | 1877 | |
Jonathan Nieder | 024c843 | 2011-11-18 03:58:21 -0600 | [diff] [blame] | 1878 | ifeq ($(COMPUTE_HEADER_DEPENDENCIES),yes) |
Jonathan Nieder | dfea575 | 2010-01-26 09:52:49 -0600 | [diff] [blame] | 1879 | $(dep_dirs): |
Junio C Hamano | eb0e0dd | 2011-10-05 12:36:21 -0700 | [diff] [blame] | 1880 | @mkdir -p $@ |
Jonathan Nieder | dfea575 | 2010-01-26 09:52:49 -0600 | [diff] [blame] | 1881 | |
| 1882 | missing_dep_dirs := $(filter-out $(wildcard $(dep_dirs)),$(dep_dirs)) |
Jonathan Nieder | ec5e0bb | 2010-01-31 15:23:53 -0600 | [diff] [blame] | 1883 | dep_file = $(dir $@).depend/$(notdir $@).d |
Jonathan Nieder | 6978934 | 2011-11-18 17:23:24 -0600 | [diff] [blame] | 1884 | dep_args = -MF $(dep_file) -MQ $@ -MMD -MP |
Jonathan Nieder | f2fabbf | 2010-01-26 09:57:15 -0600 | [diff] [blame] | 1885 | ifdef CHECK_HEADER_DEPENDENCIES |
| 1886 | $(error cannot compute header dependencies outside a normal build. \ |
| 1887 | Please unset CHECK_HEADER_DEPENDENCIES and try again) |
| 1888 | endif |
| 1889 | endif |
| 1890 | |
Jonathan Nieder | 024c843 | 2011-11-18 03:58:21 -0600 | [diff] [blame] | 1891 | ifneq ($(COMPUTE_HEADER_DEPENDENCIES),yes) |
Jonathan Nieder | f2fabbf | 2010-01-26 09:57:15 -0600 | [diff] [blame] | 1892 | ifndef CHECK_HEADER_DEPENDENCIES |
Jonathan Nieder | dfea575 | 2010-01-26 09:52:49 -0600 | [diff] [blame] | 1893 | dep_dirs = |
| 1894 | missing_dep_dirs = |
Jonathan Nieder | f2fabbf | 2010-01-26 09:57:15 -0600 | [diff] [blame] | 1895 | dep_args = |
Jonathan Nieder | dfea575 | 2010-01-26 09:52:49 -0600 | [diff] [blame] | 1896 | endif |
Jonathan Nieder | f2fabbf | 2010-01-26 09:57:15 -0600 | [diff] [blame] | 1897 | endif |
| 1898 | |
| 1899 | ifdef CHECK_HEADER_DEPENDENCIES |
| 1900 | ifndef PRINT_HEADER_DEPENDENCIES |
| 1901 | missing_deps = $(filter-out $(notdir $^), \ |
| 1902 | $(notdir $(shell $(MAKE) -s $@ \ |
| 1903 | CHECK_HEADER_DEPENDENCIES=YesPlease \ |
| 1904 | USE_COMPUTED_HEADER_DEPENDENCIES=YesPlease \ |
| 1905 | PRINT_HEADER_DEPENDENCIES=YesPlease))) |
| 1906 | endif |
| 1907 | endif |
| 1908 | |
| 1909 | ASM_SRC := $(wildcard $(OBJECTS:o=S)) |
| 1910 | ASM_OBJ := $(ASM_SRC:S=o) |
| 1911 | C_OBJ := $(filter-out $(ASM_OBJ),$(OBJECTS)) |
Jonathan Nieder | dfea575 | 2010-01-26 09:52:49 -0600 | [diff] [blame] | 1912 | |
Jonathan Nieder | 3024888 | 2010-01-26 09:51:24 -0600 | [diff] [blame] | 1913 | .SUFFIXES: |
| 1914 | |
Jonathan Nieder | f2fabbf | 2010-01-26 09:57:15 -0600 | [diff] [blame] | 1915 | ifdef PRINT_HEADER_DEPENDENCIES |
| 1916 | $(C_OBJ): %.o: %.c FORCE |
| 1917 | echo $^ |
| 1918 | $(ASM_OBJ): %.o: %.S FORCE |
| 1919 | echo $^ |
Jonathan Nieder | dfea575 | 2010-01-26 09:52:49 -0600 | [diff] [blame] | 1920 | |
Jonathan Nieder | f2fabbf | 2010-01-26 09:57:15 -0600 | [diff] [blame] | 1921 | ifndef CHECK_HEADER_DEPENDENCIES |
| 1922 | $(error cannot print header dependencies during a normal build. \ |
| 1923 | Please set CHECK_HEADER_DEPENDENCIES and try again) |
| 1924 | endif |
Jonathan Nieder | dfea575 | 2010-01-26 09:52:49 -0600 | [diff] [blame] | 1925 | endif |
| 1926 | |
Jonathan Nieder | f2fabbf | 2010-01-26 09:57:15 -0600 | [diff] [blame] | 1927 | ifndef PRINT_HEADER_DEPENDENCIES |
| 1928 | ifdef CHECK_HEADER_DEPENDENCIES |
| 1929 | $(C_OBJ): %.o: %.c $(dep_files) FORCE |
| 1930 | @set -e; echo CHECK $@; \ |
| 1931 | missing_deps="$(missing_deps)"; \ |
| 1932 | if test "$$missing_deps"; \ |
| 1933 | then \ |
| 1934 | echo missing dependencies: $$missing_deps; \ |
| 1935 | false; \ |
| 1936 | fi |
| 1937 | $(ASM_OBJ): %.o: %.S $(dep_files) FORCE |
| 1938 | @set -e; echo CHECK $@; \ |
| 1939 | missing_deps="$(missing_deps)"; \ |
| 1940 | if test "$$missing_deps"; \ |
| 1941 | then \ |
| 1942 | echo missing dependencies: $$missing_deps; \ |
| 1943 | false; \ |
| 1944 | fi |
| 1945 | endif |
| 1946 | endif |
Jonathan Nieder | dfea575 | 2010-01-26 09:52:49 -0600 | [diff] [blame] | 1947 | |
Jonathan Nieder | f2fabbf | 2010-01-26 09:57:15 -0600 | [diff] [blame] | 1948 | ifndef CHECK_HEADER_DEPENDENCIES |
| 1949 | $(C_OBJ): %.o: %.c GIT-CFLAGS $(missing_dep_dirs) |
Jonathan Nieder | a673cfe | 2010-03-19 22:20:12 -0500 | [diff] [blame] | 1950 | $(QUIET_CC)$(CC) -o $*.o -c $(dep_args) $(ALL_CFLAGS) $(EXTRA_CPPFLAGS) $< |
Jonathan Nieder | f2fabbf | 2010-01-26 09:57:15 -0600 | [diff] [blame] | 1951 | $(ASM_OBJ): %.o: %.S GIT-CFLAGS $(missing_dep_dirs) |
Jonathan Nieder | a673cfe | 2010-03-19 22:20:12 -0500 | [diff] [blame] | 1952 | $(QUIET_CC)$(CC) -o $*.o -c $(dep_args) $(ALL_CFLAGS) $(EXTRA_CPPFLAGS) $< |
Jonathan Nieder | f2fabbf | 2010-01-26 09:57:15 -0600 | [diff] [blame] | 1953 | endif |
| 1954 | |
Jonathan Nieder | 13fca9f | 2010-01-06 02:06:58 -0600 | [diff] [blame] | 1955 | %.s: %.c GIT-CFLAGS FORCE |
Jonathan Nieder | 1015cc4 | 2012-07-22 18:47:26 -0500 | [diff] [blame] | 1956 | $(QUIET_CC)$(CC) -o $@ -S $(ALL_CFLAGS) $(EXTRA_CPPFLAGS) $< |
Jonathan Nieder | f2fabbf | 2010-01-26 09:57:15 -0600 | [diff] [blame] | 1957 | |
| 1958 | ifdef USE_COMPUTED_HEADER_DEPENDENCIES |
| 1959 | # Take advantage of gcc's on-the-fly dependency generation |
| 1960 | # See <http://gcc.gnu.org/gcc-3.0/features.html>. |
| 1961 | dep_files_present := $(wildcard $(dep_files)) |
| 1962 | ifneq ($(dep_files_present),) |
| 1963 | include $(dep_files_present) |
| 1964 | endif |
| 1965 | else |
Jonathan Nieder | dfea575 | 2010-01-26 09:52:49 -0600 | [diff] [blame] | 1966 | # Dependencies on header files, for platforms that do not support |
| 1967 | # the gcc -MMD option. |
| 1968 | # |
| 1969 | # Dependencies on automatically generated headers such as common-cmds.h |
| 1970 | # should _not_ be included here, since they are necessary even when |
| 1971 | # building an object for the first time. |
Pavel Roskin | b05701c | 2005-08-06 01:36:15 -0400 | [diff] [blame] | 1972 | |
Jonathan Nieder | 60d24dd | 2012-07-06 22:39:18 -0500 | [diff] [blame] | 1973 | $(OBJECTS): $(LIB_H) |
Jonathan Nieder | dfea575 | 2010-01-26 09:52:49 -0600 | [diff] [blame] | 1974 | endif |
Junio C Hamano | 7a59013 | 2005-08-06 13:10:43 -0700 | [diff] [blame] | 1975 | |
Jeff King | be1dbd0 | 2012-06-20 14:31:55 -0400 | [diff] [blame] | 1976 | exec_cmd.sp exec_cmd.s exec_cmd.o: GIT-PREFIX |
Ramsay Jones | 0bcd9ae | 2011-04-21 20:14:42 +0100 | [diff] [blame] | 1977 | exec_cmd.sp exec_cmd.s exec_cmd.o: EXTRA_CPPFLAGS = \ |
Jonathan Nieder | 373a5ed | 2010-01-06 02:05:04 -0600 | [diff] [blame] | 1978 | '-DGIT_EXEC_PATH="$(gitexecdir_SQ)"' \ |
| 1979 | '-DBINDIR="$(bindir_relative_SQ)"' \ |
| 1980 | '-DPREFIX="$(prefix_SQ)"' |
Steffen Prohaska | 026fa0d | 2009-01-18 13:00:09 +0100 | [diff] [blame] | 1981 | |
Jeff King | be1dbd0 | 2012-06-20 14:31:55 -0400 | [diff] [blame] | 1982 | builtin/init-db.sp builtin/init-db.s builtin/init-db.o: GIT-PREFIX |
Ramsay Jones | 0bcd9ae | 2011-04-21 20:14:42 +0100 | [diff] [blame] | 1983 | builtin/init-db.sp builtin/init-db.s builtin/init-db.o: EXTRA_CPPFLAGS = \ |
Jonathan Nieder | 373a5ed | 2010-01-06 02:05:04 -0600 | [diff] [blame] | 1984 | -DDEFAULT_GIT_TEMPLATE_DIR='"$(template_dir_SQ)"' |
Michal Ostrowski | 77cb17e | 2006-01-10 21:12:17 -0500 | [diff] [blame] | 1985 | |
Jeff King | be1dbd0 | 2012-06-20 14:31:55 -0400 | [diff] [blame] | 1986 | config.sp config.s config.o: GIT-PREFIX |
Ramsay Jones | 0bcd9ae | 2011-04-21 20:14:42 +0100 | [diff] [blame] | 1987 | config.sp config.s config.o: EXTRA_CPPFLAGS = \ |
| 1988 | -DETC_GITCONFIG='"$(ETC_GITCONFIG_SQ)"' |
Johannes Sixt | 506b17b | 2007-11-13 21:05:05 +0100 | [diff] [blame] | 1989 | |
Jeff King | be1dbd0 | 2012-06-20 14:31:55 -0400 | [diff] [blame] | 1990 | attr.sp attr.s attr.o: GIT-PREFIX |
Ramsay Jones | 0bcd9ae | 2011-04-21 20:14:42 +0100 | [diff] [blame] | 1991 | attr.sp attr.s attr.o: EXTRA_CPPFLAGS = \ |
| 1992 | -DETC_GITATTRIBUTES='"$(ETC_GITATTRIBUTES_SQ)"' |
Petr Onderka | 6df42ab | 2010-09-01 00:42:43 +0200 | [diff] [blame] | 1993 | |
Jeff King | be1dbd0 | 2012-06-20 14:31:55 -0400 | [diff] [blame] | 1994 | gettext.sp gettext.s gettext.o: GIT-PREFIX |
Ævar Arnfjörð Bjarmason | 5e9637c | 2011-11-18 00:14:42 +0100 | [diff] [blame] | 1995 | gettext.sp gettext.s gettext.o: EXTRA_CPPFLAGS = \ |
| 1996 | -DGIT_LOCALE_PATH='"$(localedir_SQ)"' |
| 1997 | |
Nick Hengeveld | 8d9fbe5 | 2006-04-04 05:33:18 -0700 | [diff] [blame] | 1998 | ifdef NO_EXPAT |
Ramsay Jones | 0bcd9ae | 2011-04-21 20:14:42 +0100 | [diff] [blame] | 1999 | http-walker.sp http-walker.s http-walker.o: EXTRA_CPPFLAGS = -DNO_EXPAT |
Nick Hengeveld | 8d9fbe5 | 2006-04-04 05:33:18 -0700 | [diff] [blame] | 2000 | endif |
| 2001 | |
Ævar Arnfjörð Bjarmason | a997bf4 | 2010-08-17 09:24:39 +0000 | [diff] [blame] | 2002 | ifdef NO_REGEX |
Ramsay Jones | 0bcd9ae | 2011-04-21 20:14:42 +0100 | [diff] [blame] | 2003 | compat/regex/regex.sp compat/regex/regex.o: EXTRA_CPPFLAGS = \ |
| 2004 | -DGAWK -DNO_MBSUPPORT |
Ævar Arnfjörð Bjarmason | a997bf4 | 2010-08-17 09:24:39 +0000 | [diff] [blame] | 2005 | endif |
| 2006 | |
René Scharfe | d555ff5 | 2010-09-11 11:59:18 +0200 | [diff] [blame] | 2007 | ifdef USE_NED_ALLOCATOR |
Ramsay Jones | 0bcd9ae | 2011-04-21 20:14:42 +0100 | [diff] [blame] | 2008 | compat/nedmalloc/nedmalloc.sp compat/nedmalloc/nedmalloc.o: EXTRA_CPPFLAGS = \ |
René Scharfe | d555ff5 | 2010-09-11 11:59:18 +0200 | [diff] [blame] | 2009 | -DNDEBUG -DOVERRIDE_STRDUP -DREPLACE_SYSTEM_ALLOCATOR |
| 2010 | endif |
| 2011 | |
Fredrik Kuivinen | d9a25fc | 2011-06-22 12:50:56 +0200 | [diff] [blame] | 2012 | git-%$X: %.o GIT-LDFLAGS $(GITLIBS) |
Shawn O. Pearce | 74f2b2a | 2007-03-06 01:35:01 -0500 | [diff] [blame] | 2013 | $(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) $(LIBS) |
Daniel Barkalow | 6eb7ed5 | 2005-04-23 18:47:23 -0700 | [diff] [blame] | 2014 | |
Fredrik Kuivinen | d9a25fc | 2011-06-22 12:50:56 +0200 | [diff] [blame] | 2015 | git-imap-send$X: imap-send.o GIT-LDFLAGS $(GITLIBS) |
Robert Shearman | 684ec6c | 2008-07-09 22:29:00 +0100 | [diff] [blame] | 2016 | $(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) \ |
Diego Elio Pettenò | 401857c | 2010-11-24 21:03:53 +0100 | [diff] [blame] | 2017 | $(LIBS) $(OPENSSL_LINK) $(OPENSSL_LIBSSL) $(LIB_4_CRYPTO) |
Mike McCormack | f2561fd | 2006-03-10 14:32:50 +0900 | [diff] [blame] | 2018 | |
Fredrik Kuivinen | d9a25fc | 2011-06-22 12:50:56 +0200 | [diff] [blame] | 2019 | git-http-fetch$X: revision.o http.o http-walker.o http-fetch.o GIT-LDFLAGS $(GITLIBS) |
Linus Torvalds | 1088261 | 2009-08-05 01:01:59 -0400 | [diff] [blame] | 2020 | $(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) \ |
Jeff King | 17fd9f5 | 2009-08-07 00:21:33 -0400 | [diff] [blame] | 2021 | $(LIBS) $(CURL_LIBCURL) |
Fredrik Kuivinen | d9a25fc | 2011-06-22 12:50:56 +0200 | [diff] [blame] | 2022 | git-http-push$X: revision.o http.o http-push.o GIT-LDFLAGS $(GITLIBS) |
Shawn O. Pearce | 74f2b2a | 2007-03-06 01:35:01 -0500 | [diff] [blame] | 2023 | $(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) \ |
Johannes Schindelin | 39c015c | 2006-02-18 12:40:22 +0100 | [diff] [blame] | 2024 | $(LIBS) $(CURL_LIBCURL) $(EXPAT_LIBEXPAT) |
| 2025 | |
Florian Achleitner | 48ea9f9 | 2012-09-19 17:21:16 +0200 | [diff] [blame] | 2026 | git-remote-testsvn$X: remote-testsvn.o GIT-LDFLAGS $(GITLIBS) $(VCSSVN_LIB) |
| 2027 | $(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) $(LIBS) \ |
| 2028 | $(VCSSVN_LIB) |
| 2029 | |
Ilari Liusvaara | 28ca0c9 | 2009-12-09 17:26:34 +0200 | [diff] [blame] | 2030 | $(REMOTE_CURL_ALIASES): $(REMOTE_CURL_PRIMARY) |
| 2031 | $(QUIET_LNCP)$(RM) $@ && \ |
| 2032 | ln $< $@ 2>/dev/null || \ |
| 2033 | ln -s $< $@ 2>/dev/null || \ |
| 2034 | cp $< $@ |
| 2035 | |
Fredrik Kuivinen | d9a25fc | 2011-06-22 12:50:56 +0200 | [diff] [blame] | 2036 | $(REMOTE_CURL_PRIMARY): remote-curl.o http.o http-walker.o GIT-LDFLAGS $(GITLIBS) |
Daniel Barkalow | a2d725b | 2009-08-05 01:01:56 -0400 | [diff] [blame] | 2037 | $(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) \ |
| 2038 | $(LIBS) $(CURL_LIBCURL) $(EXPAT_LIBEXPAT) |
| 2039 | |
Petr Baudis | 28818ff | 2005-07-29 17:50:24 +0200 | [diff] [blame] | 2040 | $(LIB_FILE): $(LIB_OBJS) |
Emil Medve | 4cb08df | 2007-07-14 12:51:44 -0500 | [diff] [blame] | 2041 | $(QUIET_AR)$(RM) $@ && $(AR) rcs $@ $(LIB_OBJS) |
Petr Baudis | 28818ff | 2005-07-29 17:50:24 +0200 | [diff] [blame] | 2042 | |
Linus Torvalds | 3443546 | 2006-03-24 20:13:22 -0800 | [diff] [blame] | 2043 | $(XDIFF_LIB): $(XDIFF_OBJS) |
Emil Medve | 4cb08df | 2007-07-14 12:51:44 -0500 | [diff] [blame] | 2044 | $(QUIET_AR)$(RM) $@ && $(AR) rcs $@ $(XDIFF_OBJS) |
Linus Torvalds | 3443546 | 2006-03-24 20:13:22 -0800 | [diff] [blame] | 2045 | |
Jonathan Nieder | 3f52737 | 2010-08-09 17:04:29 -0500 | [diff] [blame] | 2046 | $(VCSSVN_LIB): $(VCSSVN_OBJS) |
| 2047 | $(QUIET_AR)$(RM) $@ && $(AR) rcs $@ $(VCSSVN_OBJS) |
Linus Torvalds | 3443546 | 2006-03-24 20:13:22 -0800 | [diff] [blame] | 2048 | |
Jonathan Nieder | 5b58619 | 2012-03-31 03:44:53 -0500 | [diff] [blame] | 2049 | export DEFAULT_EDITOR DEFAULT_PAGER |
| 2050 | |
Petr Baudis | 28818ff | 2005-07-29 17:50:24 +0200 | [diff] [blame] | 2051 | doc: |
| 2052 | $(MAKE) -C Documentation all |
| 2053 | |
Michael J Gruber | 414851a | 2008-09-10 10:19:34 +0200 | [diff] [blame] | 2054 | man: |
| 2055 | $(MAKE) -C Documentation man |
| 2056 | |
| 2057 | html: |
| 2058 | $(MAKE) -C Documentation html |
| 2059 | |
David Kastrup | 4739809 | 2007-08-06 12:22:57 +0200 | [diff] [blame] | 2060 | info: |
| 2061 | $(MAKE) -C Documentation info |
| 2062 | |
Miklos Vajna | a325a1a | 2008-12-10 23:44:50 +0100 | [diff] [blame] | 2063 | pdf: |
| 2064 | $(MAKE) -C Documentation pdf |
| 2065 | |
Ævar Arnfjörð Bjarmason | cd5513a | 2011-02-22 23:41:23 +0000 | [diff] [blame] | 2066 | XGETTEXT_FLAGS = \ |
| 2067 | --force-po \ |
| 2068 | --add-comments \ |
| 2069 | --msgid-bugs-address="Git Mailing List <git@vger.kernel.org>" \ |
| 2070 | --from-code=UTF-8 |
Ævar Arnfjörð Bjarmason | ff46a49 | 2011-04-10 19:37:01 +0000 | [diff] [blame] | 2071 | XGETTEXT_FLAGS_C = $(XGETTEXT_FLAGS) --language=C \ |
| 2072 | --keyword=_ --keyword=N_ --keyword="Q_:1,2" |
Jiang Xin | c2d140d | 2012-07-25 22:53:07 +0800 | [diff] [blame] | 2073 | XGETTEXT_FLAGS_SH = $(XGETTEXT_FLAGS) --language=Shell \ |
| 2074 | --keyword=gettextln --keyword=eval_gettextln |
Ævar Arnfjörð Bjarmason | 5e9637c | 2011-11-18 00:14:42 +0100 | [diff] [blame] | 2075 | XGETTEXT_FLAGS_PERL = $(XGETTEXT_FLAGS) --keyword=__ --language=Perl |
Jonathan Nieder | 60d24dd | 2012-07-06 22:39:18 -0500 | [diff] [blame] | 2076 | LOCALIZED_C := $(C_OBJ:o=c) $(LIB_H) $(GENERATED_H) |
Ævar Arnfjörð Bjarmason | adc3b2b | 2011-05-14 13:47:45 +0000 | [diff] [blame] | 2077 | LOCALIZED_SH := $(SCRIPT_SH) |
Ævar Arnfjörð Bjarmason | 5e9637c | 2011-11-18 00:14:42 +0100 | [diff] [blame] | 2078 | LOCALIZED_PERL := $(SCRIPT_PERL) |
| 2079 | |
| 2080 | ifdef XGETTEXT_INCLUDE_TESTS |
| 2081 | LOCALIZED_C += t/t0200/test.c |
| 2082 | LOCALIZED_SH += t/t0200/test.sh |
| 2083 | LOCALIZED_PERL += t/t0200/test.perl |
| 2084 | endif |
Ævar Arnfjörð Bjarmason | cd5513a | 2011-02-22 23:41:23 +0000 | [diff] [blame] | 2085 | |
| 2086 | po/git.pot: $(LOCALIZED_C) |
Ævar Arnfjörð Bjarmason | adc3b2b | 2011-05-14 13:47:45 +0000 | [diff] [blame] | 2087 | $(QUIET_XGETTEXT)$(XGETTEXT) -o$@+ $(XGETTEXT_FLAGS_C) $(LOCALIZED_C) |
| 2088 | $(QUIET_XGETTEXT)$(XGETTEXT) -o$@+ --join-existing $(XGETTEXT_FLAGS_SH) \ |
| 2089 | $(LOCALIZED_SH) |
Ævar Arnfjörð Bjarmason | 5e9637c | 2011-11-18 00:14:42 +0100 | [diff] [blame] | 2090 | $(QUIET_XGETTEXT)$(XGETTEXT) -o$@+ --join-existing $(XGETTEXT_FLAGS_PERL) \ |
| 2091 | $(LOCALIZED_PERL) |
Ævar Arnfjörð Bjarmason | cd5513a | 2011-02-22 23:41:23 +0000 | [diff] [blame] | 2092 | mv $@+ $@ |
| 2093 | |
| 2094 | pot: po/git.pot |
| 2095 | |
Ævar Arnfjörð Bjarmason | 5e9637c | 2011-11-18 00:14:42 +0100 | [diff] [blame] | 2096 | POFILES := $(wildcard po/*.po) |
| 2097 | MOFILES := $(patsubst po/%.po,po/build/locale/%/LC_MESSAGES/git.mo,$(POFILES)) |
| 2098 | |
| 2099 | ifndef NO_GETTEXT |
| 2100 | all:: $(MOFILES) |
| 2101 | endif |
| 2102 | |
| 2103 | po/build/locale/%/LC_MESSAGES/git.mo: po/%.po |
| 2104 | $(QUIET_MSGFMT)mkdir -p $(dir $@) && $(MSGFMT) -o $@ $< |
| 2105 | |
Junio C Hamano | 3353397 | 2011-10-18 00:26:18 -0700 | [diff] [blame] | 2106 | FIND_SOURCE_FILES = ( git ls-files '*.[hcS]' 2>/dev/null || \ |
| 2107 | $(FIND) . \( -name .git -type d -prune \) \ |
| 2108 | -o \( -name '*.[hcS]' -type f -print \) ) |
| 2109 | |
Junio C Hamano | 2f76919 | 2010-09-28 16:08:38 -0500 | [diff] [blame] | 2110 | $(ETAGS_TARGET): FORCE |
| 2111 | $(RM) $(ETAGS_TARGET) |
Junio C Hamano | 3353397 | 2011-10-18 00:26:18 -0700 | [diff] [blame] | 2112 | $(FIND_SOURCE_FILES) | xargs etags -a -o $(ETAGS_TARGET) |
Fredrik Kuivinen | f81e7c6 | 2006-03-18 11:07:12 +0100 | [diff] [blame] | 2113 | |
Junio C Hamano | 2f76919 | 2010-09-28 16:08:38 -0500 | [diff] [blame] | 2114 | tags: FORCE |
Emil Medve | 4cb08df | 2007-07-14 12:51:44 -0500 | [diff] [blame] | 2115 | $(RM) tags |
Junio C Hamano | 3353397 | 2011-10-18 00:26:18 -0700 | [diff] [blame] | 2116 | $(FIND_SOURCE_FILES) | xargs ctags -a |
Petr Baudis | 28818ff | 2005-07-29 17:50:24 +0200 | [diff] [blame] | 2117 | |
Kristof Provost | a2a9150 | 2007-10-06 16:24:42 +0200 | [diff] [blame] | 2118 | cscope: |
| 2119 | $(RM) cscope* |
Junio C Hamano | 3353397 | 2011-10-18 00:26:18 -0700 | [diff] [blame] | 2120 | $(FIND_SOURCE_FILES) | xargs cscope -b |
Kristof Provost | a2a9150 | 2007-10-06 16:24:42 +0200 | [diff] [blame] | 2121 | |
Yakov Lerner | ca3bcab | 2006-06-15 01:36:00 +0300 | [diff] [blame] | 2122 | ### Detect prefix changes |
Jeff King | be1dbd0 | 2012-06-20 14:31:55 -0400 | [diff] [blame] | 2123 | TRACK_PREFIX = $(bindir_SQ):$(gitexecdir_SQ):$(template_dir_SQ):$(prefix_SQ):\ |
| 2124 | $(localedir_SQ) |
| 2125 | |
| 2126 | GIT-PREFIX: FORCE |
| 2127 | @FLAGS='$(TRACK_PREFIX)'; \ |
| 2128 | if test x"$$FLAGS" != x"`cat GIT-PREFIX 2>/dev/null`" ; then \ |
Christian Couder | 1a59d88 | 2012-12-18 16:26:39 +0100 | [diff] [blame] | 2129 | echo >&2 " * new prefix flags"; \ |
Jeff King | be1dbd0 | 2012-06-20 14:31:55 -0400 | [diff] [blame] | 2130 | echo "$$FLAGS" >GIT-PREFIX; \ |
| 2131 | fi |
| 2132 | |
| 2133 | TRACK_CFLAGS = $(CC):$(subst ','\'',$(ALL_CFLAGS)):$(USE_GETTEXT_SCHEME) |
Yakov Lerner | ca3bcab | 2006-06-15 01:36:00 +0300 | [diff] [blame] | 2134 | |
Jonathan Nieder | 13fca9f | 2010-01-06 02:06:58 -0600 | [diff] [blame] | 2135 | GIT-CFLAGS: FORCE |
Yakov Lerner | ca3bcab | 2006-06-15 01:36:00 +0300 | [diff] [blame] | 2136 | @FLAGS='$(TRACK_CFLAGS)'; \ |
| 2137 | if test x"$$FLAGS" != x"`cat GIT-CFLAGS 2>/dev/null`" ; then \ |
Christian Couder | 1a59d88 | 2012-12-18 16:26:39 +0100 | [diff] [blame] | 2138 | echo >&2 " * new build flags"; \ |
Yakov Lerner | ca3bcab | 2006-06-15 01:36:00 +0300 | [diff] [blame] | 2139 | echo "$$FLAGS" >GIT-CFLAGS; \ |
| 2140 | fi |
| 2141 | |
Fredrik Kuivinen | d9a25fc | 2011-06-22 12:50:56 +0200 | [diff] [blame] | 2142 | TRACK_LDFLAGS = $(subst ','\'',$(ALL_LDFLAGS)) |
| 2143 | |
| 2144 | GIT-LDFLAGS: FORCE |
| 2145 | @FLAGS='$(TRACK_LDFLAGS)'; \ |
| 2146 | if test x"$$FLAGS" != x"`cat GIT-LDFLAGS 2>/dev/null`" ; then \ |
Christian Couder | 1a59d88 | 2012-12-18 16:26:39 +0100 | [diff] [blame] | 2147 | echo >&2 " * new link flags"; \ |
Fredrik Kuivinen | d9a25fc | 2011-06-22 12:50:56 +0200 | [diff] [blame] | 2148 | echo "$$FLAGS" >GIT-LDFLAGS; \ |
| 2149 | fi |
| 2150 | |
Junio C Hamano | bfce508 | 2008-07-25 12:35:10 -0700 | [diff] [blame] | 2151 | # We need to apply sq twice, once to protect from the shell |
| 2152 | # that runs GIT-BUILD-OPTIONS, and then again to protect it |
| 2153 | # and the first level quoting from the shell that runs "echo". |
Jonathan Nieder | 13fca9f | 2010-01-06 02:06:58 -0600 | [diff] [blame] | 2154 | GIT-BUILD-OPTIONS: FORCE |
Junio C Hamano | bfce508 | 2008-07-25 12:35:10 -0700 | [diff] [blame] | 2155 | @echo SHELL_PATH=\''$(subst ','\'',$(SHELL_PATH_SQ))'\' >$@ |
Philippe Bruhat (BooK) | be38ca3 | 2009-11-17 09:42:39 +0100 | [diff] [blame] | 2156 | @echo PERL_PATH=\''$(subst ','\'',$(PERL_PATH_SQ))'\' >>$@ |
Gary V. Vaughan | d1b1a91 | 2010-05-14 09:31:36 +0000 | [diff] [blame] | 2157 | @echo DIFF=\''$(subst ','\'',$(subst ','\'',$(DIFF)))'\' >>$@ |
Brandon Casey | ae45732 | 2010-06-09 16:23:59 -0500 | [diff] [blame] | 2158 | @echo PYTHON_PATH=\''$(subst ','\'',$(PYTHON_PATH_SQ))'\' >>$@ |
Junio C Hamano | bfce508 | 2008-07-25 12:35:10 -0700 | [diff] [blame] | 2159 | @echo TAR=\''$(subst ','\'',$(subst ','\'',$(TAR)))'\' >>$@ |
Jeff King | 119c8ee | 2009-02-25 03:32:09 -0500 | [diff] [blame] | 2160 | @echo NO_CURL=\''$(subst ','\'',$(subst ','\'',$(NO_CURL)))'\' >>$@ |
Junio C Hamano | a80dff2 | 2011-05-16 00:11:53 -0700 | [diff] [blame] | 2161 | @echo USE_LIBPCRE=\''$(subst ','\'',$(subst ','\'',$(USE_LIBPCRE)))'\' >>$@ |
Jeff King | 1b19ccd | 2009-04-03 15:33:59 -0400 | [diff] [blame] | 2162 | @echo NO_PERL=\''$(subst ','\'',$(subst ','\'',$(NO_PERL)))'\' >>$@ |
Jeff King | ac10a85 | 2009-12-07 00:32:50 -0500 | [diff] [blame] | 2163 | @echo NO_PYTHON=\''$(subst ','\'',$(subst ','\'',$(NO_PYTHON)))'\' >>$@ |
Thomas Rast | 342e9ef | 2012-02-17 11:25:09 +0100 | [diff] [blame] | 2164 | @echo NO_UNIX_SOCKETS=\''$(subst ','\'',$(subst ','\'',$(NO_UNIX_SOCKETS)))'\' >>$@ |
| 2165 | ifdef GIT_TEST_OPTS |
| 2166 | @echo GIT_TEST_OPTS=\''$(subst ','\'',$(subst ','\'',$(GIT_TEST_OPTS)))'\' >>$@ |
| 2167 | endif |
Junio C Hamano | 5e87eae | 2010-06-11 09:40:25 -0700 | [diff] [blame] | 2168 | ifdef GIT_TEST_CMP |
| 2169 | @echo GIT_TEST_CMP=\''$(subst ','\'',$(subst ','\'',$(GIT_TEST_CMP)))'\' >>$@ |
| 2170 | endif |
| 2171 | ifdef GIT_TEST_CMP_USE_COPIED_CONTEXT |
| 2172 | @echo GIT_TEST_CMP_USE_COPIED_CONTEXT=YesPlease >>$@ |
| 2173 | endif |
Ævar Arnfjörð Bjarmason | 5e9637c | 2011-11-18 00:14:42 +0100 | [diff] [blame] | 2174 | @echo NO_GETTEXT=\''$(subst ','\'',$(subst ','\'',$(NO_GETTEXT)))'\' >>$@ |
Ævar Arnfjörð Bjarmason | bb946bb | 2011-02-22 23:41:21 +0000 | [diff] [blame] | 2175 | @echo GETTEXT_POISON=\''$(subst ','\'',$(subst ','\'',$(GETTEXT_POISON)))'\' >>$@ |
Thomas Rast | 342e9ef | 2012-02-17 11:25:09 +0100 | [diff] [blame] | 2176 | ifdef GIT_PERF_REPEAT_COUNT |
| 2177 | @echo GIT_PERF_REPEAT_COUNT=\''$(subst ','\'',$(subst ','\'',$(GIT_PERF_REPEAT_COUNT)))'\' >>$@ |
| 2178 | endif |
| 2179 | ifdef GIT_PERF_REPO |
| 2180 | @echo GIT_PERF_REPO=\''$(subst ','\'',$(subst ','\'',$(GIT_PERF_REPO)))'\' >>$@ |
| 2181 | endif |
| 2182 | ifdef GIT_PERF_LARGE_REPO |
| 2183 | @echo GIT_PERF_LARGE_REPO=\''$(subst ','\'',$(subst ','\'',$(GIT_PERF_LARGE_REPO)))'\' >>$@ |
| 2184 | endif |
| 2185 | ifdef GIT_PERF_MAKE_OPTS |
| 2186 | @echo GIT_PERF_MAKE_OPTS=\''$(subst ','\'',$(subst ','\'',$(GIT_PERF_MAKE_OPTS)))'\' >>$@ |
| 2187 | endif |
Jeff King | 7cf7f54 | 2008-02-24 14:40:45 -0500 | [diff] [blame] | 2188 | |
Christian Couder | 96a4647 | 2012-12-18 16:26:38 +0100 | [diff] [blame] | 2189 | ### Detect Python interpreter path changes |
| 2190 | ifndef NO_PYTHON |
| 2191 | TRACK_PYTHON = $(subst ','\'',-DPYTHON_PATH='$(PYTHON_PATH_SQ)') |
Eygene Ryabinkin | 6bdb18a | 2007-03-28 04:22:02 -0700 | [diff] [blame] | 2192 | |
Christian Couder | 96a4647 | 2012-12-18 16:26:38 +0100 | [diff] [blame] | 2193 | GIT-PYTHON-VARS: FORCE |
| 2194 | @VARS='$(TRACK_PYTHON)'; \ |
Eygene Ryabinkin | 6bdb18a | 2007-03-28 04:22:02 -0700 | [diff] [blame] | 2195 | if test x"$$VARS" != x"`cat $@ 2>/dev/null`" ; then \ |
Christian Couder | 1a59d88 | 2012-12-18 16:26:39 +0100 | [diff] [blame] | 2196 | echo >&2 " * new Python interpreter location"; \ |
Eygene Ryabinkin | 6bdb18a | 2007-03-28 04:22:02 -0700 | [diff] [blame] | 2197 | echo "$$VARS" >$@; \ |
| 2198 | fi |
Eygene Ryabinkin | 6bdb18a | 2007-03-28 04:22:02 -0700 | [diff] [blame] | 2199 | endif |
| 2200 | |
Matthew Ogilvie | ea92519 | 2009-12-02 22:14:05 -0700 | [diff] [blame] | 2201 | test_bindir_programs := $(patsubst %,bin-wrappers/%,$(BINDIR_PROGRAMS_NEED_X) $(BINDIR_PROGRAMS_NO_X) $(TEST_PROGRAMS_NEED_X)) |
| 2202 | |
| 2203 | all:: $(TEST_PROGRAMS) $(test_bindir_programs) |
| 2204 | |
| 2205 | bin-wrappers/%: wrap-for-bin.sh |
| 2206 | @mkdir -p bin-wrappers |
| 2207 | $(QUIET_GEN)sed -e '1s|#!.*/sh|#!$(SHELL_PATH_SQ)|' \ |
| 2208 | -e 's|@@BUILD_DIR@@|$(shell pwd)|' \ |
| 2209 | -e 's|@@PROG@@|$(@F)|' < $< > $@ && \ |
| 2210 | chmod +x $@ |
Junio C Hamano | 96651ef | 2007-04-28 15:32:49 -0700 | [diff] [blame] | 2211 | |
Johannes Schindelin | abb7c7b | 2006-02-18 13:01:18 +0100 | [diff] [blame] | 2212 | # GNU make supports exporting all variables by "export" without parameters. |
| 2213 | # However, the environment gets quite big, and some programs have problems |
| 2214 | # with that. |
| 2215 | |
Johannes Schindelin | 140245b | 2006-07-07 13:26:31 +0200 | [diff] [blame] | 2216 | export NO_SVN_TESTS |
Ramsay Jones | 1266686 | 2012-10-06 18:33:08 +0100 | [diff] [blame] | 2217 | export TEST_NO_MALLOC_CHECK |
Johannes Schindelin | abb7c7b | 2006-02-18 13:01:18 +0100 | [diff] [blame] | 2218 | |
Jonathan Nieder | 225f78c | 2010-01-26 10:08:44 -0600 | [diff] [blame] | 2219 | ### Testing rules |
| 2220 | |
Junio C Hamano | 96651ef | 2007-04-28 15:32:49 -0700 | [diff] [blame] | 2221 | test: all |
Petr Baudis | 28818ff | 2005-07-29 17:50:24 +0200 | [diff] [blame] | 2222 | $(MAKE) -C t/ all |
| 2223 | |
Thomas Rast | 342e9ef | 2012-02-17 11:25:09 +0100 | [diff] [blame] | 2224 | perf: all |
| 2225 | $(MAKE) -C t/perf/ all |
| 2226 | |
| 2227 | .PHONY: test perf |
| 2228 | |
René Scharfe | b4285c7 | 2009-01-17 16:50:13 +0100 | [diff] [blame] | 2229 | test-ctype$X: ctype.o |
| 2230 | |
Julian Phillips | 5c5ba73 | 2007-05-31 00:18:24 +0100 | [diff] [blame] | 2231 | test-date$X: date.o ctype.o |
Petr Baudis | 28818ff | 2005-07-29 17:50:24 +0200 | [diff] [blame] | 2232 | |
Julian Phillips | 5c5ba73 | 2007-05-31 00:18:24 +0100 | [diff] [blame] | 2233 | test-delta$X: diff-delta.o patch-delta.o |
Petr Baudis | 28818ff | 2005-07-29 17:50:24 +0200 | [diff] [blame] | 2234 | |
David Barr | 3bbaec0 | 2010-08-09 17:39:43 -0500 | [diff] [blame] | 2235 | test-line-buffer$X: vcs-svn/lib.a |
| 2236 | |
Dmitry Ivankov | 0687628 | 2011-08-11 15:15:38 +0600 | [diff] [blame] | 2237 | test-parse-options$X: parse-options.o parse-options-cb.o |
Alex Riesen | 481424e | 2007-11-14 00:16:36 +0100 | [diff] [blame] | 2238 | |
David Barr | 21746aa | 2010-08-09 17:55:00 -0500 | [diff] [blame] | 2239 | test-svn-fe$X: vcs-svn/lib.a |
| 2240 | |
Jonathan Nieder | daa99a9 | 2010-01-26 09:45:54 -0600 | [diff] [blame] | 2241 | .PRECIOUS: $(TEST_OBJS) |
Junio C Hamano | fa8fe28 | 2007-08-30 19:14:31 -0700 | [diff] [blame] | 2242 | |
Fredrik Kuivinen | d9a25fc | 2011-06-22 12:50:56 +0200 | [diff] [blame] | 2243 | test-%$X: test-%.o GIT-LDFLAGS $(GITLIBS) |
David Barr | 1d73b52 | 2010-08-09 17:34:42 -0500 | [diff] [blame] | 2244 | $(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) $(filter %.a,$^) $(LIBS) |
Nicolas Pitre | 2dca1af | 2007-04-11 13:59:51 -0400 | [diff] [blame] | 2245 | |
Junio C Hamano | b65bc21 | 2006-06-24 00:59:49 -0700 | [diff] [blame] | 2246 | check-sha1:: test-sha1$X |
| 2247 | ./test-sha1.sh |
| 2248 | |
Ramsay Jones | 0bcd9ae | 2011-04-21 20:14:42 +0100 | [diff] [blame] | 2249 | SP_OBJ = $(patsubst %.o,%.sp,$(C_OBJ)) |
| 2250 | |
| 2251 | $(SP_OBJ): %.sp: %.c GIT-CFLAGS FORCE |
| 2252 | $(QUIET_SP)cgcc -no-compile $(ALL_CFLAGS) $(EXTRA_CPPFLAGS) \ |
| 2253 | $(SPARSE_FLAGS) $< |
| 2254 | |
| 2255 | .PHONY: sparse $(SP_OBJ) |
| 2256 | sparse: $(SP_OBJ) |
| 2257 | |
René Scharfe | 7c4c9f4 | 2007-01-04 19:33:48 +0100 | [diff] [blame] | 2258 | check: common-cmds.h |
Ramsay Jones | f228d1f | 2011-04-07 19:22:18 +0100 | [diff] [blame] | 2259 | @if sparse; \ |
Junio C Hamano | 912f998 | 2008-11-11 13:12:17 -0800 | [diff] [blame] | 2260 | then \ |
Ramsay Jones | 0bcd9ae | 2011-04-21 20:14:42 +0100 | [diff] [blame] | 2261 | echo 2>&1 "Use 'make sparse' instead"; \ |
| 2262 | $(MAKE) --no-print-directory sparse; \ |
Junio C Hamano | 912f998 | 2008-11-11 13:12:17 -0800 | [diff] [blame] | 2263 | else \ |
| 2264 | echo 2>&1 "Did you mean 'make test'?"; \ |
| 2265 | exit 1; \ |
| 2266 | fi |
Petr Baudis | 28818ff | 2005-07-29 17:50:24 +0200 | [diff] [blame] | 2267 | |
Linus Torvalds | 36e5e70 | 2007-06-30 11:49:17 -0700 | [diff] [blame] | 2268 | remove-dashes: |
Miklos Vajna | b4f02d3 | 2008-07-11 02:12:06 +0200 | [diff] [blame] | 2269 | ./fixup-builtins $(BUILT_INS) $(PROGRAMS) $(SCRIPTS) |
Petr Baudis | 28818ff | 2005-07-29 17:50:24 +0200 | [diff] [blame] | 2270 | |
| 2271 | ### Installation rules |
| 2272 | |
Junio C Hamano | 0c0ead7 | 2009-02-05 00:04:17 -0800 | [diff] [blame] | 2273 | ifneq ($(filter /%,$(firstword $(template_dir))),) |
Johannes Sixt | 0b50b86 | 2008-01-01 22:15:21 +0100 | [diff] [blame] | 2274 | template_instdir = $(template_dir) |
Steffen Prohaska | 026fa0d | 2009-01-18 13:00:09 +0100 | [diff] [blame] | 2275 | else |
| 2276 | template_instdir = $(prefix)/$(template_dir) |
Johannes Sixt | 0b50b86 | 2008-01-01 22:15:21 +0100 | [diff] [blame] | 2277 | endif |
| 2278 | export template_instdir |
| 2279 | |
Junio C Hamano | 0c0ead7 | 2009-02-05 00:04:17 -0800 | [diff] [blame] | 2280 | ifneq ($(filter /%,$(firstword $(gitexecdir))),) |
Johannes Sixt | 49fa65a | 2008-07-23 21:12:18 +0200 | [diff] [blame] | 2281 | gitexec_instdir = $(gitexecdir) |
Steffen Prohaska | 026fa0d | 2009-01-18 13:00:09 +0100 | [diff] [blame] | 2282 | else |
| 2283 | gitexec_instdir = $(prefix)/$(gitexecdir) |
Johannes Sixt | 49fa65a | 2008-07-23 21:12:18 +0200 | [diff] [blame] | 2284 | endif |
| 2285 | gitexec_instdir_SQ = $(subst ','\'',$(gitexec_instdir)) |
| 2286 | export gitexec_instdir |
| 2287 | |
David Aguilar | bc7a96a | 2011-08-18 00:23:46 -0700 | [diff] [blame] | 2288 | ifneq ($(filter /%,$(firstword $(mergetoolsdir))),) |
| 2289 | mergetools_instdir = $(mergetoolsdir) |
| 2290 | else |
| 2291 | mergetools_instdir = $(prefix)/$(mergetoolsdir) |
| 2292 | endif |
| 2293 | mergetools_instdir_SQ = $(subst ','\'',$(mergetools_instdir)) |
| 2294 | |
Matthew Ogilvie | ea92519 | 2009-12-02 22:14:05 -0700 | [diff] [blame] | 2295 | install_bindir_programs := $(patsubst %,%$X,$(BINDIR_PROGRAMS_NEED_X)) $(BINDIR_PROGRAMS_NO_X) |
| 2296 | |
Andreas Ericsson | d6ebd25 | 2005-11-22 00:44:15 +0100 | [diff] [blame] | 2297 | install: all |
Robert Schiele | 4165076 | 2007-12-01 18:05:40 +0100 | [diff] [blame] | 2298 | $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(bindir_SQ)' |
Johannes Sixt | 49fa65a | 2008-07-23 21:12:18 +0200 | [diff] [blame] | 2299 | $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(gitexec_instdir_SQ)' |
| 2300 | $(INSTALL) $(ALL_PROGRAMS) '$(DESTDIR_SQ)$(gitexec_instdir_SQ)' |
Jonathan Nieder | 46bac90 | 2010-01-31 11:46:53 -0800 | [diff] [blame] | 2301 | $(INSTALL) -m 644 $(SCRIPT_LIB) '$(DESTDIR_SQ)$(gitexec_instdir_SQ)' |
Matthew Ogilvie | ea92519 | 2009-12-02 22:14:05 -0700 | [diff] [blame] | 2302 | $(INSTALL) $(install_bindir_programs) '$(DESTDIR_SQ)$(bindir_SQ)' |
Ramsay Allan Jones | 7ffe709 | 2006-07-29 17:25:03 +0100 | [diff] [blame] | 2303 | $(MAKE) -C templates DESTDIR='$(DESTDIR_SQ)' install |
David Aguilar | bc7a96a | 2011-08-18 00:23:46 -0700 | [diff] [blame] | 2304 | $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(mergetools_instdir_SQ)' |
Jonathan Nieder | 53b7425 | 2011-10-09 04:17:07 -0500 | [diff] [blame] | 2305 | $(INSTALL) -m 644 mergetools/* '$(DESTDIR_SQ)$(mergetools_instdir_SQ)' |
Ævar Arnfjörð Bjarmason | 5e9637c | 2011-11-18 00:14:42 +0100 | [diff] [blame] | 2306 | ifndef NO_GETTEXT |
| 2307 | $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(localedir_SQ)' |
| 2308 | (cd po/build/locale && $(TAR) cf - .) | \ |
| 2309 | (cd '$(DESTDIR_SQ)$(localedir_SQ)' && umask 022 && $(TAR) xof -) |
| 2310 | endif |
Junio C Hamano | 5be3b17 | 2009-04-22 22:42:28 -0700 | [diff] [blame] | 2311 | ifndef NO_PERL |
Gerrit Pape | 28072a5 | 2007-12-10 09:31:02 +0000 | [diff] [blame] | 2312 | $(MAKE) -C perl prefix='$(prefix_SQ)' DESTDIR='$(DESTDIR_SQ)' install |
Junio C Hamano | 8d676d8 | 2010-06-21 06:02:44 -0700 | [diff] [blame] | 2313 | $(MAKE) -C gitweb install |
Junio C Hamano | 5be3b17 | 2009-04-22 22:42:28 -0700 | [diff] [blame] | 2314 | endif |
Sverre Rabbelier | 2fe40b6 | 2009-11-18 02:42:32 +0100 | [diff] [blame] | 2315 | ifndef NO_PYTHON |
| 2316 | $(MAKE) -C git_remote_helpers prefix='$(prefix_SQ)' DESTDIR='$(DESTDIR_SQ)' install |
| 2317 | endif |
Eygene Ryabinkin | 3cfaf11 | 2007-03-28 04:00:23 -0700 | [diff] [blame] | 2318 | ifndef NO_TCLTK |
Junio C Hamano | 62ba514 | 2007-11-17 10:51:16 -0800 | [diff] [blame] | 2319 | $(MAKE) -C gitk-git install |
Johannes Sixt | 49fa65a | 2008-07-23 21:12:18 +0200 | [diff] [blame] | 2320 | $(MAKE) -C git-gui gitexecdir='$(gitexec_instdir_SQ)' install |
Eygene Ryabinkin | 3cfaf11 | 2007-03-28 04:00:23 -0700 | [diff] [blame] | 2321 | endif |
Junio C Hamano | 6fc301b | 2007-01-10 12:24:54 -0800 | [diff] [blame] | 2322 | ifneq (,$X) |
Eric Blake | d4b1902 | 2009-04-28 06:28:31 -0600 | [diff] [blame] | 2323 | $(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] | 2324 | endif |
Ilari Liusvaara | 28ca0c9 | 2009-12-09 17:26:34 +0200 | [diff] [blame] | 2325 | |
Johannes Sixt | 46beb55 | 2008-07-21 21:19:51 +0200 | [diff] [blame] | 2326 | bindir=$$(cd '$(DESTDIR_SQ)$(bindir_SQ)' && pwd) && \ |
Johannes Sixt | 49fa65a | 2008-07-23 21:12:18 +0200 | [diff] [blame] | 2327 | execdir=$$(cd '$(DESTDIR_SQ)$(gitexec_instdir_SQ)' && pwd) && \ |
Junio C Hamano | 6edd149 | 2009-07-10 20:17:33 -0700 | [diff] [blame] | 2328 | { test "$$bindir/" = "$$execdir/" || \ |
Brandon Casey | 76d079a | 2010-07-23 12:50:45 -0500 | [diff] [blame] | 2329 | for p in git$X $(filter $(install_bindir_programs),$(ALL_PROGRAMS)); do \ |
| 2330 | $(RM) "$$execdir/$$p" && \ |
Junio C Hamano | 70de5e6 | 2012-05-02 15:12:10 -0700 | [diff] [blame] | 2331 | test -z "$(NO_INSTALL_HARDLINKS)$(NO_CROSS_DIRECTORY_HARDLINKS)" && \ |
Brandon Casey | 76d079a | 2010-07-23 12:50:45 -0500 | [diff] [blame] | 2332 | ln "$$bindir/$$p" "$$execdir/$$p" 2>/dev/null || \ |
| 2333 | cp "$$bindir/$$p" "$$execdir/$$p" || exit; \ |
| 2334 | done; \ |
| 2335 | } && \ |
Brandon Casey | 40919c4 | 2010-07-23 12:50:44 -0500 | [diff] [blame] | 2336 | for p in $(filter $(install_bindir_programs),$(BUILT_INS)); do \ |
| 2337 | $(RM) "$$bindir/$$p" && \ |
Junio C Hamano | 70de5e6 | 2012-05-02 15:12:10 -0700 | [diff] [blame] | 2338 | test -z "$(NO_INSTALL_HARDLINKS)" && \ |
Brandon Casey | 40919c4 | 2010-07-23 12:50:44 -0500 | [diff] [blame] | 2339 | ln "$$bindir/git$X" "$$bindir/$$p" 2>/dev/null || \ |
| 2340 | ln -s "git$X" "$$bindir/$$p" 2>/dev/null || \ |
| 2341 | cp "$$bindir/git$X" "$$bindir/$$p" || exit; \ |
| 2342 | done && \ |
Brandon Casey | ba2b4d7 | 2010-07-02 11:50:28 -0700 | [diff] [blame] | 2343 | for p in $(BUILT_INS); do \ |
Brandon Casey | b56c79c | 2009-01-19 19:44:03 -0600 | [diff] [blame] | 2344 | $(RM) "$$execdir/$$p" && \ |
Junio C Hamano | 70de5e6 | 2012-05-02 15:12:10 -0700 | [diff] [blame] | 2345 | test -z "$(NO_INSTALL_HARDLINKS)" && \ |
Jeff King | 4ecbc17 | 2009-07-09 02:37:35 -0400 | [diff] [blame] | 2346 | ln "$$execdir/git$X" "$$execdir/$$p" 2>/dev/null || \ |
| 2347 | ln -s "git$X" "$$execdir/$$p" 2>/dev/null || \ |
| 2348 | cp "$$execdir/git$X" "$$execdir/$$p" || exit; \ |
Brandon Casey | ba2b4d7 | 2010-07-02 11:50:28 -0700 | [diff] [blame] | 2349 | done && \ |
Brandon Casey | 49a43f5 | 2010-07-06 14:56:51 -0700 | [diff] [blame] | 2350 | remote_curl_aliases="$(REMOTE_CURL_ALIASES)" && \ |
| 2351 | for p in $$remote_curl_aliases; do \ |
Ilari Liusvaara | 28ca0c9 | 2009-12-09 17:26:34 +0200 | [diff] [blame] | 2352 | $(RM) "$$execdir/$$p" && \ |
Junio C Hamano | 70de5e6 | 2012-05-02 15:12:10 -0700 | [diff] [blame] | 2353 | test -z "$(NO_INSTALL_HARDLINKS)" && \ |
Ilari Liusvaara | 28ca0c9 | 2009-12-09 17:26:34 +0200 | [diff] [blame] | 2354 | ln "$$execdir/git-remote-http$X" "$$execdir/$$p" 2>/dev/null || \ |
| 2355 | ln -s "git-remote-http$X" "$$execdir/$$p" 2>/dev/null || \ |
| 2356 | cp "$$execdir/git-remote-http$X" "$$execdir/$$p" || exit; \ |
Brandon Casey | 49a43f5 | 2010-07-06 14:56:51 -0700 | [diff] [blame] | 2357 | done && \ |
Johannes Sixt | 7b4b59a | 2008-07-21 21:19:58 +0200 | [diff] [blame] | 2358 | ./check_bindir "z$$bindir" "z$$execdir" "$$bindir/git-add$X" |
Petr Baudis | 28818ff | 2005-07-29 17:50:24 +0200 | [diff] [blame] | 2359 | |
Jakub Narebski | 152d943 | 2010-05-01 22:36:15 +0200 | [diff] [blame] | 2360 | install-gitweb: |
| 2361 | $(MAKE) -C gitweb install |
| 2362 | |
Petr Baudis | 28818ff | 2005-07-29 17:50:24 +0200 | [diff] [blame] | 2363 | install-doc: |
| 2364 | $(MAKE) -C Documentation install |
| 2365 | |
Markus Heidelberg | b1a46b7 | 2008-11-02 18:53:03 +0100 | [diff] [blame] | 2366 | install-man: |
| 2367 | $(MAKE) -C Documentation install-man |
| 2368 | |
Teemu Likonen | ae081f3 | 2008-06-10 11:34:25 +0300 | [diff] [blame] | 2369 | install-html: |
| 2370 | $(MAKE) -C Documentation install-html |
| 2371 | |
David Kastrup | 4739809 | 2007-08-06 12:22:57 +0200 | [diff] [blame] | 2372 | install-info: |
| 2373 | $(MAKE) -C Documentation install-info |
| 2374 | |
Miklos Vajna | a325a1a | 2008-12-10 23:44:50 +0100 | [diff] [blame] | 2375 | install-pdf: |
| 2376 | $(MAKE) -C Documentation install-pdf |
| 2377 | |
Eric Wong | 6538d1e | 2006-12-23 08:26:09 -0800 | [diff] [blame] | 2378 | quick-install-doc: |
| 2379 | $(MAKE) -C Documentation quick-install |
Petr Baudis | 28818ff | 2005-07-29 17:50:24 +0200 | [diff] [blame] | 2380 | |
Markus Heidelberg | b1a46b7 | 2008-11-02 18:53:03 +0100 | [diff] [blame] | 2381 | quick-install-man: |
| 2382 | $(MAKE) -C Documentation quick-install-man |
| 2383 | |
Michael J Gruber | 6fe570d | 2008-09-09 22:44:17 +0200 | [diff] [blame] | 2384 | quick-install-html: |
| 2385 | $(MAKE) -C Documentation quick-install-html |
| 2386 | |
Petr Baudis | 28818ff | 2005-07-29 17:50:24 +0200 | [diff] [blame] | 2387 | |
| 2388 | |
| 2389 | ### Maintainer's dist rules |
| 2390 | |
Jeff King | 520a6cd | 2012-06-20 14:32:22 -0400 | [diff] [blame] | 2391 | git.spec: git.spec.in GIT-VERSION-FILE |
Jim Meyering | fc36f6a | 2006-05-25 18:52:01 +0200 | [diff] [blame] | 2392 | sed -e 's/@@VERSION@@/$(GIT_VERSION)/g' < $< > $@+ |
| 2393 | mv $@+ $@ |
Chris Wright | a9db297 | 2005-07-07 13:09:50 -0700 | [diff] [blame] | 2394 | |
Stefano Lattarini | dd6fc7c | 2012-12-09 11:36:17 +0100 | [diff] [blame] | 2395 | GIT_TARNAME = git-$(GIT_VERSION) |
Shawn O. Pearce | 6c0f869 | 2008-02-24 00:38:04 -0500 | [diff] [blame] | 2396 | dist: git.spec git-archive$(X) configure |
Junio C Hamano | 9ccb64c | 2006-10-05 02:26:12 -0700 | [diff] [blame] | 2397 | ./git-archive --format=tar \ |
| 2398 | --prefix=$(GIT_TARNAME)/ HEAD^{tree} > $(GIT_TARNAME).tar |
Chris Wright | a9db297 | 2005-07-07 13:09:50 -0700 | [diff] [blame] | 2399 | @mkdir -p $(GIT_TARNAME) |
Matthias Lederhofer | f58494b | 2007-06-18 23:30:36 +0200 | [diff] [blame] | 2400 | @cp git.spec configure $(GIT_TARNAME) |
H. Peter Anvin | 181129d | 2006-01-09 18:07:01 -0800 | [diff] [blame] | 2401 | @echo $(GIT_VERSION) > $(GIT_TARNAME)/version |
Shawn O. Pearce | d647c2e | 2007-02-12 18:20:34 -0500 | [diff] [blame] | 2402 | @$(MAKE) -C git-gui TARDIR=../$(GIT_TARNAME)/git-gui dist-version |
H. Peter Anvin | 181129d | 2006-01-09 18:07:01 -0800 | [diff] [blame] | 2403 | $(TAR) rf $(GIT_TARNAME).tar \ |
Shawn O. Pearce | d647c2e | 2007-02-12 18:20:34 -0500 | [diff] [blame] | 2404 | $(GIT_TARNAME)/git.spec \ |
Matthias Lederhofer | f58494b | 2007-06-18 23:30:36 +0200 | [diff] [blame] | 2405 | $(GIT_TARNAME)/configure \ |
Shawn O. Pearce | d647c2e | 2007-02-12 18:20:34 -0500 | [diff] [blame] | 2406 | $(GIT_TARNAME)/version \ |
Shawn O. Pearce | 115f0fe | 2007-03-12 13:40:31 -0400 | [diff] [blame] | 2407 | $(GIT_TARNAME)/git-gui/version |
Emil Medve | 4cb08df | 2007-07-14 12:51:44 -0500 | [diff] [blame] | 2408 | @$(RM) -r $(GIT_TARNAME) |
Eric W. Biederman | 9dce3c0 | 2005-07-14 19:20:50 -0600 | [diff] [blame] | 2409 | gzip -f -9 $(GIT_TARNAME).tar |
Chris Wright | a9db297 | 2005-07-07 13:09:50 -0700 | [diff] [blame] | 2410 | |
| 2411 | rpm: dist |
Todd Zullinger | a96e9c2 | 2009-11-11 16:59:52 -0500 | [diff] [blame] | 2412 | $(RPMBUILD) \ |
| 2413 | --define "_source_filedigest_algorithm md5" \ |
| 2414 | --define "_binary_filedigest_algorithm md5" \ |
| 2415 | -ta $(GIT_TARNAME).tar.gz |
Chris Wright | a9db297 | 2005-07-07 13:09:50 -0700 | [diff] [blame] | 2416 | |
Tilman Sauerbeck | 52db049 | 2006-05-18 12:57:04 +0200 | [diff] [blame] | 2417 | htmldocs = git-htmldocs-$(GIT_VERSION) |
| 2418 | manpages = git-manpages-$(GIT_VERSION) |
| 2419 | dist-doc: |
Emil Medve | 4cb08df | 2007-07-14 12:51:44 -0500 | [diff] [blame] | 2420 | $(RM) -r .doc-tmp-dir |
Tilman Sauerbeck | 52db049 | 2006-05-18 12:57:04 +0200 | [diff] [blame] | 2421 | mkdir .doc-tmp-dir |
| 2422 | $(MAKE) -C Documentation WEBDOC_DEST=../.doc-tmp-dir install-webdoc |
| 2423 | cd .doc-tmp-dir && $(TAR) cf ../$(htmldocs).tar . |
| 2424 | gzip -n -9 -f $(htmldocs).tar |
| 2425 | : |
Emil Medve | 4cb08df | 2007-07-14 12:51:44 -0500 | [diff] [blame] | 2426 | $(RM) -r .doc-tmp-dir |
Junio C Hamano | 4392da4 | 2007-04-19 20:47:04 -0700 | [diff] [blame] | 2427 | 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] | 2428 | $(MAKE) -C Documentation DESTDIR=./ \ |
Jakub Narebski | 7b8cf0c | 2006-06-29 23:26:54 +0200 | [diff] [blame] | 2429 | man1dir=../.doc-tmp-dir/man1 \ |
Junio C Hamano | 4392da4 | 2007-04-19 20:47:04 -0700 | [diff] [blame] | 2430 | man5dir=../.doc-tmp-dir/man5 \ |
Jakub Narebski | 7b8cf0c | 2006-06-29 23:26:54 +0200 | [diff] [blame] | 2431 | man7dir=../.doc-tmp-dir/man7 \ |
Tilman Sauerbeck | 52db049 | 2006-05-18 12:57:04 +0200 | [diff] [blame] | 2432 | install |
| 2433 | cd .doc-tmp-dir && $(TAR) cf ../$(manpages).tar . |
| 2434 | gzip -n -9 -f $(manpages).tar |
Emil Medve | 4cb08df | 2007-07-14 12:51:44 -0500 | [diff] [blame] | 2435 | $(RM) -r .doc-tmp-dir |
Tilman Sauerbeck | 52db049 | 2006-05-18 12:57:04 +0200 | [diff] [blame] | 2436 | |
Petr Baudis | 28818ff | 2005-07-29 17:50:24 +0200 | [diff] [blame] | 2437 | ### Cleaning rules |
Eric W. Biederman | 87a81c8 | 2005-07-14 19:21:57 -0600 | [diff] [blame] | 2438 | |
Mathias Megyei | 922aa80 | 2007-10-04 23:49:19 +0200 | [diff] [blame] | 2439 | distclean: clean |
| 2440 | $(RM) configure |
Stefano Lattarini | dc7ace5 | 2012-07-19 09:50:01 +0200 | [diff] [blame] | 2441 | $(RM) config.log config.status config.cache |
| 2442 | $(RM) config.mak.autogen config.mak.append |
| 2443 | $(RM) -r autom4te.cache |
Mathias Megyei | 922aa80 | 2007-10-04 23:49:19 +0200 | [diff] [blame] | 2444 | |
Theodore Ts'o | f2d713f | 2012-02-06 01:00:17 -0500 | [diff] [blame] | 2445 | profile-clean: |
| 2446 | $(RM) $(addsuffix *.gcda,$(addprefix $(PROFILE_DIR)/, $(object_dirs))) |
| 2447 | $(RM) $(addsuffix *.gcno,$(addprefix $(PROFILE_DIR)/, $(object_dirs))) |
| 2448 | |
| 2449 | clean: profile-clean |
Jonathan Nieder | be47d5a | 2010-08-12 16:30:47 -0500 | [diff] [blame] | 2450 | $(RM) *.o block-sha1/*.o ppc/*.o compat/*.o compat/*/*.o xdiff/*.o vcs-svn/*.o \ |
| 2451 | builtin/*.o $(LIB_FILE) $(XDIFF_LIB) $(VCSSVN_LIB) |
Jonathan Nieder | 46bac90 | 2010-01-31 11:46:53 -0800 | [diff] [blame] | 2452 | $(RM) $(ALL_PROGRAMS) $(SCRIPT_LIB) $(BUILT_INS) git$X |
Emil Medve | 4cb08df | 2007-07-14 12:51:44 -0500 | [diff] [blame] | 2453 | $(RM) $(TEST_PROGRAMS) |
Matt Kraai | 61564ca | 2013-02-13 07:57:48 -0800 | [diff] [blame] | 2454 | $(RM) -r bin-wrappers $(dep_dirs) |
Ævar Arnfjörð Bjarmason | 5e9637c | 2011-11-18 00:14:42 +0100 | [diff] [blame] | 2455 | $(RM) -r po/build/ |
Junio C Hamano | 2f76919 | 2010-09-28 16:08:38 -0500 | [diff] [blame] | 2456 | $(RM) *.spec *.pyc *.pyo */*.pyc */*.pyo common-cmds.h $(ETAGS_TARGET) tags cscope* |
Emil Medve | 4cb08df | 2007-07-14 12:51:44 -0500 | [diff] [blame] | 2457 | $(RM) -r $(GIT_TARNAME) .doc-tmp-dir |
| 2458 | $(RM) $(GIT_TARNAME).tar.gz git-core_$(GIT_VERSION)-*.tar.gz |
| 2459 | $(RM) $(htmldocs).tar.gz $(manpages).tar.gz |
Thomas Glanzmann | ca67f00 | 2005-05-22 20:27:28 +0200 | [diff] [blame] | 2460 | $(MAKE) -C Documentation/ clean |
Jeff King | 499c293 | 2009-04-03 15:32:20 -0400 | [diff] [blame] | 2461 | ifndef NO_PERL |
Ramsay Jones | e5bd0a1 | 2010-05-08 18:36:15 +0100 | [diff] [blame] | 2462 | $(MAKE) -C gitweb clean |
Alex Riesen | f848718 | 2006-12-04 10:50:04 +0100 | [diff] [blame] | 2463 | $(MAKE) -C perl clean |
Jeff King | 499c293 | 2009-04-03 15:32:20 -0400 | [diff] [blame] | 2464 | endif |
Sverre Rabbelier | 2fe40b6 | 2009-11-18 02:42:32 +0100 | [diff] [blame] | 2465 | ifndef NO_PYTHON |
| 2466 | $(MAKE) -C git_remote_helpers clean |
| 2467 | endif |
Petr Baudis | b1edc53 | 2006-06-24 04:34:29 +0200 | [diff] [blame] | 2468 | $(MAKE) -C templates/ clean |
Junio C Hamano | 4b7581f | 2005-08-02 17:24:11 -0700 | [diff] [blame] | 2469 | $(MAKE) -C t/ clean |
Eygene Ryabinkin | 3cfaf11 | 2007-03-28 04:00:23 -0700 | [diff] [blame] | 2470 | ifndef NO_TCLTK |
Junio C Hamano | 62ba514 | 2007-11-17 10:51:16 -0800 | [diff] [blame] | 2471 | $(MAKE) -C gitk-git clean |
Eygene Ryabinkin | 3cfaf11 | 2007-03-28 04:00:23 -0700 | [diff] [blame] | 2472 | $(MAKE) -C git-gui clean |
| 2473 | endif |
Christian Couder | 8f26aa4 | 2012-12-18 16:26:37 +0100 | [diff] [blame] | 2474 | $(RM) GIT-VERSION-FILE GIT-CFLAGS GIT-LDFLAGS GIT-BUILD-OPTIONS |
Christian Couder | 96a4647 | 2012-12-18 16:26:38 +0100 | [diff] [blame] | 2475 | $(RM) GIT-USER-AGENT GIT-PREFIX GIT-SCRIPT-DEFINES GIT-PYTHON-VARS |
Junio C Hamano | 9b88fce | 2005-12-27 14:40:17 -0800 | [diff] [blame] | 2476 | |
Theodore Ts'o | f2d713f | 2012-02-06 01:00:17 -0500 | [diff] [blame] | 2477 | .PHONY: all install profile-clean clean strip |
Brandon Casey | 6dc4627 | 2008-08-07 14:06:26 -0500 | [diff] [blame] | 2478 | .PHONY: shell_compatibility_test please_set_SHELL_PATH_to_a_more_modern_shell |
Junio C Hamano | 2f76919 | 2010-09-28 16:08:38 -0500 | [diff] [blame] | 2479 | .PHONY: FORCE cscope |
Junio C Hamano | d89056c | 2005-12-19 17:59:58 -0800 | [diff] [blame] | 2480 | |
Junio C Hamano | 8c989ec | 2006-04-13 00:17:19 -0700 | [diff] [blame] | 2481 | ### Check documentation |
| 2482 | # |
Jeff King | cf6aaff | 2012-08-08 16:56:04 -0400 | [diff] [blame] | 2483 | ALL_COMMANDS = $(ALL_PROGRAMS) $(SCRIPT_LIB) $(BUILT_INS) |
| 2484 | ALL_COMMANDS += git |
| 2485 | ALL_COMMANDS += gitk |
| 2486 | ALL_COMMANDS += gitweb |
Jeff King | eb28501 | 2012-08-08 16:56:42 -0400 | [diff] [blame] | 2487 | ALL_COMMANDS += git-gui git-citool |
Junio C Hamano | 8c989ec | 2006-04-13 00:17:19 -0700 | [diff] [blame] | 2488 | check-docs:: |
Jeff King | cf6aaff | 2012-08-08 16:56:04 -0400 | [diff] [blame] | 2489 | @(for v in $(ALL_COMMANDS); \ |
Junio C Hamano | 8c989ec | 2006-04-13 00:17:19 -0700 | [diff] [blame] | 2490 | do \ |
| 2491 | case "$$v" in \ |
Junio C Hamano | 8c989ec | 2006-04-13 00:17:19 -0700 | [diff] [blame] | 2492 | git-merge-octopus | git-merge-ours | git-merge-recursive | \ |
Miklos Vajna | 51add76 | 2008-07-05 16:43:51 +0200 | [diff] [blame] | 2493 | git-merge-resolve | git-merge-subtree | \ |
Junio C Hamano | 5c66d0d | 2008-01-17 22:52:40 -0800 | [diff] [blame] | 2494 | git-fsck-objects | git-init-db | \ |
Junio C Hamano | c88cd03 | 2010-03-10 15:31:34 -0800 | [diff] [blame] | 2495 | git-remote-* | git-stage | \ |
Junio C Hamano | 5b4617c | 2007-12-14 22:02:57 -0800 | [diff] [blame] | 2496 | git-?*--?* ) continue ;; \ |
Junio C Hamano | 8c989ec | 2006-04-13 00:17:19 -0700 | [diff] [blame] | 2497 | esac ; \ |
| 2498 | test -f "Documentation/$$v.txt" || \ |
| 2499 | echo "no doc: $$v"; \ |
Junio C Hamano | 79d3066 | 2007-12-01 23:39:19 -0800 | [diff] [blame] | 2500 | sed -e '/^#/d' command-list.txt | \ |
Junio C Hamano | 4b02c52 | 2007-02-13 22:45:22 -0800 | [diff] [blame] | 2501 | grep -q "^$$v[ ]" || \ |
Junio C Hamano | 8c989ec | 2006-04-13 00:17:19 -0700 | [diff] [blame] | 2502 | case "$$v" in \ |
| 2503 | git) ;; \ |
| 2504 | *) echo "no link: $$v";; \ |
| 2505 | esac ; \ |
Junio C Hamano | 3f7ce64 | 2007-11-08 18:38:27 -0800 | [diff] [blame] | 2506 | done; \ |
| 2507 | ( \ |
Junio C Hamano | 79d3066 | 2007-12-01 23:39:19 -0800 | [diff] [blame] | 2508 | sed -e '/^#/d' \ |
Junio C Hamano | 3f7ce64 | 2007-11-08 18:38:27 -0800 | [diff] [blame] | 2509 | -e 's/[ ].*//' \ |
Junio C Hamano | 79d3066 | 2007-12-01 23:39:19 -0800 | [diff] [blame] | 2510 | -e 's/^/listed /' command-list.txt; \ |
Jeff King | 5fafce0 | 2012-08-08 16:57:52 -0400 | [diff] [blame] | 2511 | $(MAKE) -C Documentation print-man1 | \ |
| 2512 | grep '\.txt$$' | \ |
Junio C Hamano | 3f7ce64 | 2007-11-08 18:38:27 -0800 | [diff] [blame] | 2513 | sed -e 's|Documentation/|documented |' \ |
| 2514 | -e 's/\.txt//'; \ |
| 2515 | ) | while read how cmd; \ |
| 2516 | do \ |
Jeff King | cf6aaff | 2012-08-08 16:56:04 -0400 | [diff] [blame] | 2517 | case " $(ALL_COMMANDS) " in \ |
Junio C Hamano | 3f7ce64 | 2007-11-08 18:38:27 -0800 | [diff] [blame] | 2518 | *" $$cmd "*) ;; \ |
| 2519 | *) echo "removed but $$how: $$cmd" ;; \ |
| 2520 | esac; \ |
| 2521 | done ) | sort |
Junio C Hamano | c74390e | 2006-11-05 11:26:21 -0800 | [diff] [blame] | 2522 | |
| 2523 | ### Make sure built-ins do not have dups and listed in git.c |
| 2524 | # |
| 2525 | check-builtins:: |
| 2526 | ./check-builtins.sh |
Junio C Hamano | 11c57e6 | 2008-01-14 15:10:38 -0800 | [diff] [blame] | 2527 | |
Thomas Rast | 901c369 | 2009-02-19 12:13:35 +0100 | [diff] [blame] | 2528 | ### Test suite coverage testing |
| 2529 | # |
| 2530 | .PHONY: coverage coverage-clean coverage-build coverage-report |
| 2531 | |
| 2532 | coverage: |
| 2533 | $(MAKE) coverage-build |
| 2534 | $(MAKE) coverage-report |
| 2535 | |
Ævar Arnfjörð Bjarmason | bc548ef | 2010-07-25 19:52:40 +0000 | [diff] [blame] | 2536 | object_dirs := $(sort $(dir $(OBJECTS))) |
Thomas Rast | 901c369 | 2009-02-19 12:13:35 +0100 | [diff] [blame] | 2537 | coverage-clean: |
Ævar Arnfjörð Bjarmason | bc548ef | 2010-07-25 19:52:40 +0000 | [diff] [blame] | 2538 | $(RM) $(addsuffix *.gcov,$(object_dirs)) |
| 2539 | $(RM) $(addsuffix *.gcda,$(object_dirs)) |
| 2540 | $(RM) $(addsuffix *.gcno,$(object_dirs)) |
| 2541 | $(RM) coverage-untested-functions |
Ævar Arnfjörð Bjarmason | 7432bd5 | 2010-07-25 19:52:42 +0000 | [diff] [blame] | 2542 | $(RM) -r cover_db/ |
Ævar Arnfjörð Bjarmason | df07acf | 2010-07-25 19:52:43 +0000 | [diff] [blame] | 2543 | $(RM) -r cover_db_html/ |
Thomas Rast | 901c369 | 2009-02-19 12:13:35 +0100 | [diff] [blame] | 2544 | |
| 2545 | COVERAGE_CFLAGS = $(CFLAGS) -O0 -ftest-coverage -fprofile-arcs |
| 2546 | COVERAGE_LDFLAGS = $(CFLAGS) -O0 -lgcov |
Ævar Arnfjörð Bjarmason | bc548ef | 2010-07-25 19:52:40 +0000 | [diff] [blame] | 2547 | GCOVFLAGS = --preserve-paths --branch-probabilities --all-blocks |
Thomas Rast | 901c369 | 2009-02-19 12:13:35 +0100 | [diff] [blame] | 2548 | |
| 2549 | coverage-build: coverage-clean |
| 2550 | $(MAKE) CFLAGS="$(COVERAGE_CFLAGS)" LDFLAGS="$(COVERAGE_LDFLAGS)" all |
| 2551 | $(MAKE) CFLAGS="$(COVERAGE_CFLAGS)" LDFLAGS="$(COVERAGE_LDFLAGS)" \ |
| 2552 | -j1 test |
| 2553 | |
| 2554 | coverage-report: |
Ævar Arnfjörð Bjarmason | bc548ef | 2010-07-25 19:52:40 +0000 | [diff] [blame] | 2555 | $(QUIET_GCOV)for dir in $(object_dirs); do \ |
Thomas Rast | e146d17 | 2010-07-26 09:43:41 +0200 | [diff] [blame] | 2556 | $(GCOV) $(GCOVFLAGS) --object-directory=$$dir $$dir*.c || exit; \ |
Ævar Arnfjörð Bjarmason | bc548ef | 2010-07-25 19:52:40 +0000 | [diff] [blame] | 2557 | done |
Ævar Arnfjörð Bjarmason | b5eed98 | 2010-07-25 19:52:41 +0000 | [diff] [blame] | 2558 | |
| 2559 | coverage-untested-functions: coverage-report |
Thomas Rast | 901c369 | 2009-02-19 12:13:35 +0100 | [diff] [blame] | 2560 | grep '^function.*called 0 ' *.c.gcov \ |
| 2561 | | sed -e 's/\([^:]*\)\.gcov: *function \([^ ]*\) called.*/\1: \2/' \ |
Ævar Arnfjörð Bjarmason | bc548ef | 2010-07-25 19:52:40 +0000 | [diff] [blame] | 2562 | > coverage-untested-functions |
Ævar Arnfjörð Bjarmason | 7432bd5 | 2010-07-25 19:52:42 +0000 | [diff] [blame] | 2563 | |
| 2564 | cover_db: coverage-report |
| 2565 | gcov2perl -db cover_db *.gcov |
Ævar Arnfjörð Bjarmason | df07acf | 2010-07-25 19:52:43 +0000 | [diff] [blame] | 2566 | |
| 2567 | cover_db_html: cover_db |
| 2568 | cover -report html -outputdir cover_db_html cover_db |
Andi Kleen | 7ddc271 | 2011-06-18 18:07:05 -0700 | [diff] [blame] | 2569 | |