Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 1 | # Platform specific Makefile tweaks based on uname detection |
| 2 | |
Jeff Hostetler | dce7d29 | 2019-06-25 07:49:39 -0700 | [diff] [blame] | 3 | # Define NO_SAFESEH if you need MSVC/Visual Studio to ignore the lack of |
| 4 | # Microsoft's Safe Exception Handling in libraries (such as zlib). |
| 5 | # Typically required for VS2013+/32-bit compilation on Vista+ versions. |
| 6 | |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 7 | uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo not') |
| 8 | uname_M := $(shell sh -c 'uname -m 2>/dev/null || echo not') |
| 9 | uname_O := $(shell sh -c 'uname -o 2>/dev/null || echo not') |
| 10 | uname_R := $(shell sh -c 'uname -r 2>/dev/null || echo not') |
| 11 | uname_P := $(shell sh -c 'uname -p 2>/dev/null || echo not') |
| 12 | uname_V := $(shell sh -c 'uname -v 2>/dev/null || echo not') |
| 13 | |
Carlo Marcelo Arenas Belón | ebd2e4a | 2021-09-28 20:19:40 -0700 | [diff] [blame] | 14 | ifneq ($(findstring MINGW,$(uname_S)),) |
| 15 | uname_S := MINGW |
| 16 | endif |
| 17 | |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 18 | ifdef MSVC |
| 19 | # avoid the MingW and Cygwin configuration sections |
| 20 | uname_S := Windows |
| 21 | uname_O := Windows |
Jeff Hostetler | dce7d29 | 2019-06-25 07:49:39 -0700 | [diff] [blame] | 22 | |
| 23 | # Generate and include makefile variables that point to the |
| 24 | # currently installed set of MSVC command line tools. |
| 25 | compat/vcbuild/MSVC-DEFS-GEN: compat/vcbuild/find_vs_env.bat |
| 26 | @"$<" | tr '\\' / >"$@" |
| 27 | include compat/vcbuild/MSVC-DEFS-GEN |
| 28 | |
| 29 | # See if vcpkg and the vcpkg-build versions of the third-party |
| 30 | # libraries that we use are installed. We include the result |
| 31 | # to get $(vcpkg_*) variables defined for the Makefile. |
Johannes Schindelin | 976aaed | 2019-07-29 13:08:12 -0700 | [diff] [blame] | 32 | ifeq (,$(SKIP_VCPKG)) |
Jeff Hostetler | dce7d29 | 2019-06-25 07:49:39 -0700 | [diff] [blame] | 33 | compat/vcbuild/VCPKG-DEFS: compat/vcbuild/vcpkg_install.bat |
| 34 | @"$<" |
| 35 | include compat/vcbuild/VCPKG-DEFS |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 36 | endif |
Johannes Schindelin | 976aaed | 2019-07-29 13:08:12 -0700 | [diff] [blame] | 37 | endif |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 38 | |
| 39 | # We choose to avoid "if .. else if .. else .. endif endif" |
| 40 | # because maintaining the nesting to match is a pain. If |
| 41 | # we had "elif" things would have been much nicer... |
| 42 | |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 43 | ifeq ($(uname_S),OSF1) |
| 44 | # Need this for u_short definitions et al |
| 45 | BASIC_CFLAGS += -D_OSF_SOURCE |
| 46 | SOCKLEN_T = int |
| 47 | NO_STRTOULL = YesPlease |
| 48 | NO_NSEC = YesPlease |
| 49 | endif |
| 50 | ifeq ($(uname_S),Linux) |
Kirill Smelkov | 61f76a3 | 2014-03-27 18:22:50 +0400 | [diff] [blame] | 51 | HAVE_ALLOCA_H = YesPlease |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 52 | NO_STRLCPY = YesPlease |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 53 | HAVE_PATHS_H = YesPlease |
| 54 | LIBC_CONTAINS_LIBINTL = YesPlease |
| 55 | HAVE_DEV_TTY = YesPlease |
Karsten Blees | 148d677 | 2014-07-12 02:05:42 +0200 | [diff] [blame] | 56 | HAVE_CLOCK_GETTIME = YesPlease |
Reuben Hawkins | a6c3c63 | 2015-01-08 12:00:56 -0800 | [diff] [blame] | 57 | HAVE_CLOCK_MONOTONIC = YesPlease |
Eric Wong | 52fcec7 | 2016-07-10 22:16:44 +0000 | [diff] [blame] | 58 | # -lrt is needed for clock_gettime on glibc <= 2.16 |
| 59 | NEEDS_LIBRT = YesPlease |
Neeraj Singh | abf38ab | 2022-03-10 22:43:20 +0000 | [diff] [blame] | 60 | HAVE_SYNC_FILE_RANGE = YesPlease |
Jeff King | 0cc30e0 | 2015-04-16 05:01:38 -0400 | [diff] [blame] | 61 | HAVE_GETDELIM = YesPlease |
Nguyễn Thái Ngọc Duy | e2d90fd | 2017-05-03 17:16:48 +0700 | [diff] [blame] | 62 | FREAD_READS_DIRECTORIES = UnfortunatelyYes |
Nguyễn Thái Ngọc Duy | 9806f5a | 2018-04-15 17:36:17 +0200 | [diff] [blame] | 63 | BASIC_CFLAGS += -DHAVE_SYSINFO |
Dan Jacques | 226c0dd | 2018-04-10 11:05:44 -0400 | [diff] [blame] | 64 | PROCFS_EXECUTABLE_PATH = /proc/self/exe |
Emily Shaffer | 2f732bf | 2021-07-21 18:27:07 -0700 | [diff] [blame] | 65 | HAVE_PLATFORM_PROCINFO = YesPlease |
| 66 | COMPAT_OBJS += compat/linux/procinfo.o |
David Aguilar | ffb9f29 | 2022-01-15 18:05:20 -0800 | [diff] [blame] | 67 | # centos7/rhel7 provides gcc 4.8.5 and zlib 1.2.7. |
| 68 | ifneq ($(findstring .el7.,$(uname_R)),) |
| 69 | BASIC_CFLAGS += -std=c99 |
David Aguilar | ffb9f29 | 2022-01-15 18:05:20 -0800 | [diff] [blame] | 70 | endif |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 71 | endif |
| 72 | ifeq ($(uname_S),GNU/kFreeBSD) |
Kirill Smelkov | 61f76a3 | 2014-03-27 18:22:50 +0400 | [diff] [blame] | 73 | HAVE_ALLOCA_H = YesPlease |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 74 | NO_STRLCPY = YesPlease |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 75 | HAVE_PATHS_H = YesPlease |
| 76 | DIR_HAS_BSD_GROUP_SEMANTICS = YesPlease |
| 77 | LIBC_CONTAINS_LIBINTL = YesPlease |
Nguyễn Thái Ngọc Duy | e2d90fd | 2017-05-03 17:16:48 +0700 | [diff] [blame] | 78 | FREAD_READS_DIRECTORIES = UnfortunatelyYes |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 79 | endif |
| 80 | ifeq ($(uname_S),UnixWare) |
| 81 | CC = cc |
| 82 | NEEDS_SOCKET = YesPlease |
| 83 | NEEDS_NSL = YesPlease |
| 84 | NEEDS_SSL_WITH_CRYPTO = YesPlease |
| 85 | NEEDS_LIBICONV = YesPlease |
| 86 | SHELL_PATH = /usr/local/bin/bash |
| 87 | NO_IPV6 = YesPlease |
| 88 | NO_HSTRERROR = YesPlease |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 89 | BASIC_CFLAGS += -Kthread |
| 90 | BASIC_CFLAGS += -I/usr/local/include |
| 91 | BASIC_LDFLAGS += -L/usr/local/lib |
| 92 | INSTALL = ginstall |
| 93 | TAR = gtar |
| 94 | NO_STRCASESTR = YesPlease |
| 95 | NO_MEMMEM = YesPlease |
| 96 | endif |
| 97 | ifeq ($(uname_S),SCO_SV) |
| 98 | ifeq ($(uname_R),3.2) |
| 99 | CFLAGS = -O2 |
| 100 | endif |
| 101 | ifeq ($(uname_R),5) |
| 102 | CC = cc |
| 103 | BASIC_CFLAGS += -Kthread |
| 104 | endif |
| 105 | NEEDS_SOCKET = YesPlease |
| 106 | NEEDS_NSL = YesPlease |
| 107 | NEEDS_SSL_WITH_CRYPTO = YesPlease |
| 108 | NEEDS_LIBICONV = YesPlease |
| 109 | SHELL_PATH = /usr/bin/bash |
| 110 | NO_IPV6 = YesPlease |
| 111 | NO_HSTRERROR = YesPlease |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 112 | BASIC_CFLAGS += -I/usr/local/include |
| 113 | BASIC_LDFLAGS += -L/usr/local/lib |
| 114 | NO_STRCASESTR = YesPlease |
| 115 | NO_MEMMEM = YesPlease |
| 116 | INSTALL = ginstall |
| 117 | TAR = gtar |
| 118 | endif |
| 119 | ifeq ($(uname_S),Darwin) |
| 120 | NEEDS_CRYPTO_WITH_SSL = YesPlease |
| 121 | NEEDS_SSL_WITH_CRYPTO = YesPlease |
| 122 | NEEDS_LIBICONV = YesPlease |
Junio C Hamano | 9eeff2f | 2014-08-15 10:02:46 -0700 | [diff] [blame] | 123 | # Note: $(uname_R) gives us the underlying Darwin version. |
| 124 | # - MacOS 10.0.* and MacOS 10.1.0 = Darwin 1.* |
| 125 | # - MacOS 10.x.* = Darwin (x+4).* for (1 <= x) |
| 126 | # i.e. "begins with [15678] and a dot" means "10.4.* or older". |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 127 | ifeq ($(shell expr "$(uname_R)" : '[15678]\.'),2) |
| 128 | OLD_ICONV = UnfortunatelyYes |
Kyle J. McKay | 9c7a0be | 2014-08-15 00:46:11 -0700 | [diff] [blame] | 129 | NO_APPLE_COMMON_CRYPTO = YesPlease |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 130 | endif |
| 131 | ifeq ($(shell expr "$(uname_R)" : '[15]\.'),2) |
| 132 | NO_STRLCPY = YesPlease |
| 133 | endif |
Eric Sunshine | 4e36878 | 2015-06-02 17:15:43 -0400 | [diff] [blame] | 134 | ifeq ($(shell test "`expr "$(uname_R)" : '\([0-9][0-9]*\)\.'`" -ge 11 && echo 1),1) |
| 135 | HAVE_GETDELIM = YesPlease |
| 136 | endif |
Jeff King | bbabaad | 2021-03-01 04:29:47 -0500 | [diff] [blame] | 137 | ifeq ($(shell test "`expr "$(uname_R)" : '\([0-9][0-9]*\)\.'`" -ge 20 && echo 1),1) |
| 138 | OPEN_RETURNS_EINTR = UnfortunatelyYes |
| 139 | endif |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 140 | NO_MEMMEM = YesPlease |
| 141 | USE_ST_TIMESPEC = YesPlease |
| 142 | HAVE_DEV_TTY = YesPlease |
| 143 | COMPAT_OBJS += compat/precompose_utf8.o |
| 144 | BASIC_CFLAGS += -DPRECOMPOSE_UNICODE |
Jeff King | a42643a | 2014-12-15 18:15:20 -0500 | [diff] [blame] | 145 | BASIC_CFLAGS += -DPROTECT_HFS_DEFAULT=1 |
Kyle J. McKay | 9529080 | 2015-03-07 23:14:36 -0800 | [diff] [blame] | 146 | HAVE_BSD_SYSCTL = YesPlease |
Junio C Hamano | 8e178ec | 2017-05-09 21:44:33 -0700 | [diff] [blame] | 147 | FREAD_READS_DIRECTORIES = UnfortunatelyYes |
Dan Jacques | 226c0dd | 2018-04-10 11:05:44 -0400 | [diff] [blame] | 148 | HAVE_NS_GET_EXECUTABLE_PATH = YesPlease |
brian m. carlson | 05cd988 | 2022-01-17 21:56:16 +0000 | [diff] [blame] | 149 | CSPRNG_METHOD = arc4random |
René Scharfe | 54463d3 | 2023-01-08 01:42:04 +0100 | [diff] [blame] | 150 | USE_ENHANCED_BASIC_REGULAR_EXPRESSIONS = YesPlease |
Johannes Schindelin | a0b3108 | 2020-04-26 22:09:32 +0200 | [diff] [blame] | 151 | |
| 152 | # Workaround for `gettext` being keg-only and not even being linked via |
| 153 | # `brew link --force gettext`, should be obsolete as of |
| 154 | # https://github.com/Homebrew/homebrew-core/pull/53489 |
| 155 | ifeq ($(shell test -d /usr/local/opt/gettext/ && echo y),y) |
| 156 | BASIC_CFLAGS += -I/usr/local/include -I/usr/local/opt/gettext/include |
| 157 | BASIC_LDFLAGS += -L/usr/local/lib -L/usr/local/opt/gettext/lib |
| 158 | ifeq ($(shell test -x /usr/local/opt/gettext/bin/msgfmt && echo y),y) |
| 159 | MSGFMT = /usr/local/opt/gettext/bin/msgfmt |
| 160 | endif |
| 161 | endif |
Jeff Hostetler | f67df25 | 2022-03-25 18:02:52 +0000 | [diff] [blame] | 162 | |
| 163 | # The builtin FSMonitor on MacOS builds upon Simple-IPC. Both require |
| 164 | # Unix domain sockets and PThreads. |
| 165 | ifndef NO_PTHREADS |
| 166 | ifndef NO_UNIX_SOCKETS |
| 167 | FSMONITOR_DAEMON_BACKEND = darwin |
Jeff Hostetler | a85ad67 | 2022-05-26 21:47:01 +0000 | [diff] [blame] | 168 | FSMONITOR_OS_SETTINGS = darwin |
Jeff Hostetler | f67df25 | 2022-03-25 18:02:52 +0000 | [diff] [blame] | 169 | endif |
| 170 | endif |
| 171 | |
| 172 | BASIC_LDFLAGS += -framework CoreServices |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 173 | endif |
| 174 | ifeq ($(uname_S),SunOS) |
| 175 | NEEDS_SOCKET = YesPlease |
| 176 | NEEDS_NSL = YesPlease |
| 177 | SHELL_PATH = /bin/bash |
| 178 | SANE_TOOL_PATH = /usr/xpg6/bin:/usr/xpg4/bin |
Kirill Smelkov | 61f76a3 | 2014-03-27 18:22:50 +0400 | [diff] [blame] | 179 | HAVE_ALLOCA_H = YesPlease |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 180 | NO_STRCASESTR = YesPlease |
| 181 | NO_MEMMEM = YesPlease |
| 182 | NO_MKDTEMP = YesPlease |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 183 | NO_REGEX = YesPlease |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 184 | NO_MSGFMT_EXTENDED_OPTIONS = YesPlease |
| 185 | HAVE_DEV_TTY = YesPlease |
| 186 | ifeq ($(uname_R),5.6) |
| 187 | SOCKLEN_T = int |
| 188 | NO_HSTRERROR = YesPlease |
| 189 | NO_IPV6 = YesPlease |
| 190 | NO_SOCKADDR_STORAGE = YesPlease |
| 191 | NO_UNSETENV = YesPlease |
| 192 | NO_SETENV = YesPlease |
| 193 | NO_STRLCPY = YesPlease |
| 194 | NO_STRTOUMAX = YesPlease |
| 195 | GIT_TEST_CMP = cmp |
| 196 | endif |
| 197 | ifeq ($(uname_R),5.7) |
| 198 | NEEDS_RESOLV = YesPlease |
| 199 | NO_IPV6 = YesPlease |
| 200 | NO_SOCKADDR_STORAGE = YesPlease |
| 201 | NO_UNSETENV = YesPlease |
| 202 | NO_SETENV = YesPlease |
| 203 | NO_STRLCPY = YesPlease |
| 204 | NO_STRTOUMAX = YesPlease |
| 205 | GIT_TEST_CMP = cmp |
| 206 | endif |
| 207 | ifeq ($(uname_R),5.8) |
| 208 | NO_UNSETENV = YesPlease |
| 209 | NO_SETENV = YesPlease |
| 210 | NO_STRTOUMAX = YesPlease |
| 211 | GIT_TEST_CMP = cmp |
| 212 | endif |
| 213 | ifeq ($(uname_R),5.9) |
| 214 | NO_UNSETENV = YesPlease |
| 215 | NO_SETENV = YesPlease |
| 216 | NO_STRTOUMAX = YesPlease |
| 217 | GIT_TEST_CMP = cmp |
| 218 | endif |
| 219 | INSTALL = /usr/ucb/install |
| 220 | TAR = gtar |
Kirill Smelkov | 61f76a3 | 2014-03-27 18:22:50 +0400 | [diff] [blame] | 221 | BASIC_CFLAGS += -D__EXTENSIONS__ -D__sun__ |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 222 | endif |
| 223 | ifeq ($(uname_O),Cygwin) |
| 224 | ifeq ($(shell expr "$(uname_R)" : '1\.[1-6]\.'),4) |
| 225 | NO_D_TYPE_IN_DIRENT = YesPlease |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 226 | NO_STRCASESTR = YesPlease |
| 227 | NO_MEMMEM = YesPlease |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 228 | NO_SYMLINK_HEAD = YesPlease |
| 229 | NO_IPV6 = YesPlease |
| 230 | OLD_ICONV = UnfortunatelyYes |
Mark Levedahl | f593ef7 | 2013-07-19 19:08:30 -0400 | [diff] [blame] | 231 | # There are conflicting reports about this. |
| 232 | # On some boxes NO_MMAP is needed, and not so elsewhere. |
| 233 | # Try commenting this out if you suspect MMAP is more efficient |
| 234 | NO_MMAP = YesPlease |
Mark Levedahl | 92f63d2 | 2013-07-19 19:08:28 -0400 | [diff] [blame] | 235 | else |
| 236 | NO_REGEX = UnfortunatelyYes |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 237 | endif |
Kirill Smelkov | 61f76a3 | 2014-03-27 18:22:50 +0400 | [diff] [blame] | 238 | HAVE_ALLOCA_H = YesPlease |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 239 | NEEDS_LIBICONV = YesPlease |
| 240 | NO_FAST_WORKING_DIRECTORY = UnfortunatelyYes |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 241 | NO_ST_BLOCKS_IN_STRUCT_STAT = YesPlease |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 242 | X = .exe |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 243 | UNRELIABLE_FSTAT = UnfortunatelyYes |
Adam Dinwoodie | e53a64b | 2015-08-07 21:30:28 +0100 | [diff] [blame] | 244 | OBJECT_CREATION_USES_RENAMES = UnfortunatelyNeedsTo |
Michael Haggerty | 5b63361 | 2017-09-25 10:00:10 +0200 | [diff] [blame] | 245 | MMAP_PREVENTS_DELETE = UnfortunatelyYes |
Torsten Bögershausen | 1cadad6 | 2018-12-15 05:33:30 +0100 | [diff] [blame] | 246 | COMPAT_OBJS += compat/win32/path-utils.o |
Ramsay Jones | a5956d6 | 2017-07-21 19:43:17 +0100 | [diff] [blame] | 247 | FREAD_READS_DIRECTORIES = UnfortunatelyYes |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 248 | endif |
| 249 | ifeq ($(uname_S),FreeBSD) |
| 250 | NEEDS_LIBICONV = YesPlease |
Eric Sunshine | 6c6ce21 | 2018-08-31 04:33:42 -0400 | [diff] [blame] | 251 | # Versions up to 10.1 require OLD_ICONV; 10.2 and beyond don't. |
| 252 | # A typical version string looks like "10.2-RELEASE". |
| 253 | ifeq ($(shell expr "$(uname_R)" : '[1-9]\.'),2) |
| 254 | OLD_ICONV = YesPlease |
| 255 | endif |
| 256 | ifeq ($(firstword $(subst -, ,$(uname_R))),10.0) |
| 257 | OLD_ICONV = YesPlease |
| 258 | endif |
| 259 | ifeq ($(firstword $(subst -, ,$(uname_R))),10.1) |
| 260 | OLD_ICONV = YesPlease |
| 261 | endif |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 262 | NO_MEMMEM = YesPlease |
| 263 | BASIC_CFLAGS += -I/usr/local/include |
| 264 | BASIC_LDFLAGS += -L/usr/local/lib |
| 265 | DIR_HAS_BSD_GROUP_SEMANTICS = YesPlease |
| 266 | USE_ST_TIMESPEC = YesPlease |
| 267 | ifeq ($(shell expr "$(uname_R)" : '4\.'),2) |
| 268 | PTHREAD_LIBS = -pthread |
| 269 | NO_UINTMAX_T = YesPlease |
| 270 | NO_STRTOUMAX = YesPlease |
| 271 | endif |
| 272 | PYTHON_PATH = /usr/local/bin/python |
Nguyễn Thái Ngọc Duy | 259f22a | 2016-07-25 18:21:25 +0200 | [diff] [blame] | 273 | PERL_PATH = /usr/local/bin/perl |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 274 | HAVE_PATHS_H = YesPlease |
Kyle J. McKay | 9529080 | 2015-03-07 23:14:36 -0800 | [diff] [blame] | 275 | HAVE_BSD_SYSCTL = YesPlease |
Dan Jacques | 226c0dd | 2018-04-10 11:05:44 -0400 | [diff] [blame] | 276 | HAVE_BSD_KERN_PROC_SYSCTL = YesPlease |
brian m. carlson | 05cd988 | 2022-01-17 21:56:16 +0000 | [diff] [blame] | 277 | CSPRNG_METHOD = arc4random |
Eric Wong | 995bc22 | 2016-08-04 11:40:25 +0000 | [diff] [blame] | 278 | PAGER_ENV = LESS=FRX LV=-c MORE=FRX |
Nguyễn Thái Ngọc Duy | e2d90fd | 2017-05-03 17:16:48 +0700 | [diff] [blame] | 279 | FREAD_READS_DIRECTORIES = UnfortunatelyYes |
Duy Nguyen | 18a4f6b | 2019-02-12 21:14:41 +0700 | [diff] [blame] | 280 | FILENO_IS_A_MACRO = UnfortunatelyYes |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 281 | endif |
| 282 | ifeq ($(uname_S),OpenBSD) |
| 283 | NO_STRCASESTR = YesPlease |
| 284 | NO_MEMMEM = YesPlease |
| 285 | USE_ST_TIMESPEC = YesPlease |
| 286 | NEEDS_LIBICONV = YesPlease |
| 287 | BASIC_CFLAGS += -I/usr/local/include |
| 288 | BASIC_LDFLAGS += -L/usr/local/lib |
| 289 | HAVE_PATHS_H = YesPlease |
Kyle J. McKay | 9529080 | 2015-03-07 23:14:36 -0800 | [diff] [blame] | 290 | HAVE_BSD_SYSCTL = YesPlease |
Dan Jacques | 226c0dd | 2018-04-10 11:05:44 -0400 | [diff] [blame] | 291 | HAVE_BSD_KERN_PROC_SYSCTL = YesPlease |
brian m. carlson | 05cd988 | 2022-01-17 21:56:16 +0000 | [diff] [blame] | 292 | CSPRNG_METHOD = arc4random |
Dan Jacques | 226c0dd | 2018-04-10 11:05:44 -0400 | [diff] [blame] | 293 | PROCFS_EXECUTABLE_PATH = /proc/curproc/file |
Carlo Marcelo Arenas Belón | 4e3ecbd | 2018-12-01 18:43:20 -0800 | [diff] [blame] | 294 | FREAD_READS_DIRECTORIES = UnfortunatelyYes |
Duy Nguyen | 18a4f6b | 2019-02-12 21:14:41 +0700 | [diff] [blame] | 295 | FILENO_IS_A_MACRO = UnfortunatelyYes |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 296 | endif |
Benny Siegert | 92164af | 2013-12-31 14:36:45 +0000 | [diff] [blame] | 297 | ifeq ($(uname_S),MirBSD) |
| 298 | NO_STRCASESTR = YesPlease |
| 299 | NO_MEMMEM = YesPlease |
| 300 | USE_ST_TIMESPEC = YesPlease |
| 301 | NEEDS_LIBICONV = YesPlease |
| 302 | HAVE_PATHS_H = YesPlease |
Kyle J. McKay | 9529080 | 2015-03-07 23:14:36 -0800 | [diff] [blame] | 303 | HAVE_BSD_SYSCTL = YesPlease |
brian m. carlson | 05cd988 | 2022-01-17 21:56:16 +0000 | [diff] [blame] | 304 | CSPRNG_METHOD = arc4random |
Benny Siegert | 92164af | 2013-12-31 14:36:45 +0000 | [diff] [blame] | 305 | endif |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 306 | ifeq ($(uname_S),NetBSD) |
| 307 | ifeq ($(shell expr "$(uname_R)" : '[01]\.'),2) |
| 308 | NEEDS_LIBICONV = YesPlease |
| 309 | endif |
| 310 | BASIC_CFLAGS += -I/usr/pkg/include |
| 311 | BASIC_LDFLAGS += -L/usr/pkg/lib $(CC_LD_DYNPATH)/usr/pkg/lib |
| 312 | USE_ST_TIMESPEC = YesPlease |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 313 | HAVE_PATHS_H = YesPlease |
Kyle J. McKay | 9529080 | 2015-03-07 23:14:36 -0800 | [diff] [blame] | 314 | HAVE_BSD_SYSCTL = YesPlease |
Dan Jacques | 226c0dd | 2018-04-10 11:05:44 -0400 | [diff] [blame] | 315 | HAVE_BSD_KERN_PROC_SYSCTL = YesPlease |
brian m. carlson | 05cd988 | 2022-01-17 21:56:16 +0000 | [diff] [blame] | 316 | CSPRNG_METHOD = arc4random |
Dan Jacques | 226c0dd | 2018-04-10 11:05:44 -0400 | [diff] [blame] | 317 | PROCFS_EXECUTABLE_PATH = /proc/curproc/exe |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 318 | endif |
| 319 | ifeq ($(uname_S),AIX) |
| 320 | DEFAULT_PAGER = more |
| 321 | NO_STRCASESTR = YesPlease |
| 322 | NO_MEMMEM = YesPlease |
| 323 | NO_MKDTEMP = YesPlease |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 324 | NO_STRLCPY = YesPlease |
| 325 | NO_NSEC = YesPlease |
Ævar Arnfjörð Bjarmason | 0e6d899 | 2017-05-03 13:54:30 +0000 | [diff] [blame] | 326 | NO_REGEX = NeedsStartEnd |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 327 | FREAD_READS_DIRECTORIES = UnfortunatelyYes |
| 328 | INTERNAL_QSORT = UnfortunatelyYes |
| 329 | NEEDS_LIBICONV = YesPlease |
| 330 | BASIC_CFLAGS += -D_LARGE_FILES |
Clément Chigot | ee662bf | 2019-04-18 08:55:09 +0000 | [diff] [blame] | 331 | FILENO_IS_A_MACRO = UnfortunatelyYes |
Clément Chigot | 400caaf | 2019-04-25 07:01:56 +0000 | [diff] [blame] | 332 | NEED_ACCESS_ROOT_HANDLER = UnfortunatelyYes |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 333 | ifeq ($(shell expr "$(uname_V)" : '[1234]'),1) |
| 334 | NO_PTHREADS = YesPlease |
| 335 | else |
| 336 | PTHREAD_LIBS = -lpthread |
| 337 | endif |
| 338 | ifeq ($(shell expr "$(uname_V).$(uname_R)" : '5\.1'),3) |
| 339 | INLINE = '' |
| 340 | endif |
| 341 | GIT_TEST_CMP = cmp |
| 342 | endif |
| 343 | ifeq ($(uname_S),GNU) |
| 344 | # GNU/Hurd |
Kirill Smelkov | 61f76a3 | 2014-03-27 18:22:50 +0400 | [diff] [blame] | 345 | HAVE_ALLOCA_H = YesPlease |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 346 | NO_STRLCPY = YesPlease |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 347 | HAVE_PATHS_H = YesPlease |
| 348 | LIBC_CONTAINS_LIBINTL = YesPlease |
Jessica Clarke | 274a132 | 2020-04-22 16:33:47 +0100 | [diff] [blame] | 349 | FREAD_READS_DIRECTORIES = UnfortunatelyYes |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 350 | endif |
| 351 | ifeq ($(uname_S),IRIX) |
| 352 | NO_SETENV = YesPlease |
| 353 | NO_UNSETENV = YesPlease |
| 354 | NO_STRCASESTR = YesPlease |
| 355 | NO_MEMMEM = YesPlease |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 356 | NO_MKDTEMP = YesPlease |
| 357 | # When compiled with the MIPSpro 7.4.4m compiler, and without pthreads |
| 358 | # (i.e. NO_PTHREADS is set), and _with_ MMAP (i.e. NO_MMAP is not set), |
| 359 | # git dies with a segmentation fault when trying to access the first |
| 360 | # entry of a reflog. The conservative choice is made to always set |
| 361 | # NO_MMAP. If you suspect that your compiler is not affected by this |
| 362 | # issue, comment out the NO_MMAP statement. |
| 363 | NO_MMAP = YesPlease |
| 364 | NO_REGEX = YesPlease |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 365 | SNPRINTF_RETURNS_BOGUS = YesPlease |
| 366 | SHELL_PATH = /usr/gnu/bin/bash |
| 367 | NEEDS_LIBGEN = YesPlease |
| 368 | endif |
| 369 | ifeq ($(uname_S),IRIX64) |
| 370 | NO_SETENV = YesPlease |
| 371 | NO_UNSETENV = YesPlease |
| 372 | NO_STRCASESTR = YesPlease |
| 373 | NO_MEMMEM = YesPlease |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 374 | NO_MKDTEMP = YesPlease |
| 375 | # When compiled with the MIPSpro 7.4.4m compiler, and without pthreads |
| 376 | # (i.e. NO_PTHREADS is set), and _with_ MMAP (i.e. NO_MMAP is not set), |
| 377 | # git dies with a segmentation fault when trying to access the first |
| 378 | # entry of a reflog. The conservative choice is made to always set |
| 379 | # NO_MMAP. If you suspect that your compiler is not affected by this |
| 380 | # issue, comment out the NO_MMAP statement. |
| 381 | NO_MMAP = YesPlease |
| 382 | NO_REGEX = YesPlease |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 383 | SNPRINTF_RETURNS_BOGUS = YesPlease |
| 384 | SHELL_PATH = /usr/gnu/bin/bash |
| 385 | NEEDS_LIBGEN = YesPlease |
| 386 | endif |
| 387 | ifeq ($(uname_S),HP-UX) |
| 388 | INLINE = __inline |
| 389 | NO_IPV6 = YesPlease |
| 390 | NO_SETENV = YesPlease |
| 391 | NO_STRCASESTR = YesPlease |
| 392 | NO_MEMMEM = YesPlease |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 393 | NO_STRLCPY = YesPlease |
| 394 | NO_MKDTEMP = YesPlease |
| 395 | NO_UNSETENV = YesPlease |
| 396 | NO_HSTRERROR = YesPlease |
| 397 | NO_SYS_SELECT_H = YesPlease |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 398 | SNPRINTF_RETURNS_BOGUS = YesPlease |
| 399 | NO_NSEC = YesPlease |
| 400 | ifeq ($(uname_R),B.11.00) |
| 401 | NO_INET_NTOP = YesPlease |
| 402 | NO_INET_PTON = YesPlease |
| 403 | endif |
| 404 | ifeq ($(uname_R),B.10.20) |
| 405 | # Override HP-UX 11.x setting: |
| 406 | INLINE = |
| 407 | SOCKLEN_T = size_t |
| 408 | NO_PREAD = YesPlease |
| 409 | NO_INET_NTOP = YesPlease |
| 410 | NO_INET_PTON = YesPlease |
| 411 | endif |
| 412 | GIT_TEST_CMP = cmp |
| 413 | endif |
| 414 | ifeq ($(uname_S),Windows) |
| 415 | GIT_VERSION := $(GIT_VERSION).MSVC |
| 416 | pathsep = ; |
Jeff Hostetler | dce7d29 | 2019-06-25 07:49:39 -0700 | [diff] [blame] | 417 | # Assume that this is built in Git for Windows' SDK |
| 418 | ifeq (MINGW32,$(MSYSTEM)) |
| 419 | prefix = /mingw32 |
| 420 | else |
| 421 | prefix = /mingw64 |
| 422 | endif |
| 423 | # Prepend MSVC 64-bit tool-chain to PATH. |
| 424 | # |
| 425 | # A regular Git Bash *does not* have cl.exe in its $PATH. As there is a |
| 426 | # link.exe next to, and required by, cl.exe, we have to prepend this |
| 427 | # onto the existing $PATH. |
| 428 | # |
| 429 | SANE_TOOL_PATH ?= $(msvc_bin_dir_msys) |
Kirill Smelkov | 61f76a3 | 2014-03-27 18:22:50 +0400 | [diff] [blame] | 430 | HAVE_ALLOCA_H = YesPlease |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 431 | NO_PREAD = YesPlease |
| 432 | NEEDS_CRYPTO_WITH_SSL = YesPlease |
| 433 | NO_LIBGEN_H = YesPlease |
| 434 | NO_POLL = YesPlease |
| 435 | NO_SYMLINK_HEAD = YesPlease |
| 436 | NO_IPV6 = YesPlease |
| 437 | NO_UNIX_SOCKETS = YesPlease |
| 438 | NO_SETENV = YesPlease |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 439 | NO_STRCASESTR = YesPlease |
| 440 | NO_STRLCPY = YesPlease |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 441 | NO_MEMMEM = YesPlease |
Jeff Hostetler | dce7d29 | 2019-06-25 07:49:39 -0700 | [diff] [blame] | 442 | NEEDS_LIBICONV = YesPlease |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 443 | NO_STRTOUMAX = YesPlease |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 444 | NO_MKDTEMP = YesPlease |
Jeff Hostetler | dce7d29 | 2019-06-25 07:49:39 -0700 | [diff] [blame] | 445 | NO_INTTYPES_H = YesPlease |
brian m. carlson | 05cd988 | 2022-01-17 21:56:16 +0000 | [diff] [blame] | 446 | CSPRNG_METHOD = rtlgenrandom |
Jeff Hostetler | dce7d29 | 2019-06-25 07:49:39 -0700 | [diff] [blame] | 447 | # VS2015 with UCRT claims that snprintf and friends are C99 compliant, |
| 448 | # so we don't need this: |
| 449 | # |
| 450 | # SNPRINTF_RETURNS_BOGUS = YesPlease |
Jeff Hostetler | 62c7367 | 2022-03-25 18:02:51 +0000 | [diff] [blame] | 451 | |
| 452 | # The builtin FSMonitor requires Named Pipes and Threads on Windows. |
| 453 | # These are always available, so we do not have to conditionally |
| 454 | # support it. |
| 455 | FSMONITOR_DAEMON_BACKEND = win32 |
Jeff Hostetler | d33c804 | 2022-05-26 21:46:59 +0000 | [diff] [blame] | 456 | FSMONITOR_OS_SETTINGS = win32 |
| 457 | |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 458 | NO_SVN_TESTS = YesPlease |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 459 | RUNTIME_PREFIX = YesPlease |
Johannes Schindelin | 86e2545 | 2018-04-10 11:05:46 -0400 | [diff] [blame] | 460 | HAVE_WPGMPTR = YesWeDo |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 461 | NO_ST_BLOCKS_IN_STRUCT_STAT = YesPlease |
Jeff Hostetler | 59c7b88 | 2021-03-15 21:08:23 +0000 | [diff] [blame] | 462 | USE_WIN32_IPC = YesPlease |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 463 | USE_WIN32_MMAP = YesPlease |
Michael Haggerty | 5b63361 | 2017-09-25 10:00:10 +0200 | [diff] [blame] | 464 | MMAP_PREVENTS_DELETE = UnfortunatelyYes |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 465 | # USE_NED_ALLOCATOR = YesPlease |
| 466 | UNRELIABLE_FSTAT = UnfortunatelyYes |
| 467 | OBJECT_CREATION_USES_RENAMES = UnfortunatelyNeedsTo |
| 468 | NO_REGEX = YesPlease |
Karsten Blees | bad866a | 2013-09-11 01:21:53 +0200 | [diff] [blame] | 469 | NO_GETTEXT = YesPlease |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 470 | NO_PYTHON = YesPlease |
Ramsay Jones | e0492c5 | 2013-01-31 18:33:57 +0000 | [diff] [blame] | 471 | ETAGS_TARGET = ETAGS |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 472 | NO_POSIX_GOODIES = UnfortunatelyYes |
| 473 | NATIVE_CRLF = YesPlease |
| 474 | DEFAULT_HELP_FORMAT = html |
Johannes Schindelin | fb5e337 | 2021-06-22 10:46:46 +0000 | [diff] [blame] | 475 | ifeq (/mingw64,$(subst 32,64,$(prefix))) |
| 476 | # Move system config into top-level /etc/ |
| 477 | ETC_GITCONFIG = ../etc/gitconfig |
| 478 | ETC_GITATTRIBUTES = ../etc/gitattributes |
| 479 | endif |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 480 | |
| 481 | CC = compat/vcbuild/scripts/clink.pl |
| 482 | AR = compat/vcbuild/scripts/lib.pl |
| 483 | CFLAGS = |
Jeff Hostetler | dce7d29 | 2019-06-25 07:49:39 -0700 | [diff] [blame] | 484 | BASIC_CFLAGS = -nologo -I. -Icompat/vcbuild/include -DWIN32 -D_CONSOLE -DHAVE_STRING_H -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 485 | COMPAT_OBJS = compat/msvc.o compat/winansi.o \ |
Neeraj Singh | abf38ab | 2022-03-10 22:43:20 +0000 | [diff] [blame] | 486 | compat/win32/flush.o \ |
Sven Strickroth | 22c3634 | 2019-04-08 13:26:16 +0200 | [diff] [blame] | 487 | compat/win32/path-utils.o \ |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 488 | compat/win32/pthread.o compat/win32/syslog.o \ |
Jeff Hostetler | 353d3d7 | 2019-02-22 14:25:02 -0800 | [diff] [blame] | 489 | compat/win32/trace2_win32_process_info.o \ |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 490 | compat/win32/dirent.o |
Jeff Hostetler | dce7d29 | 2019-06-25 07:49:39 -0700 | [diff] [blame] | 491 | COMPAT_CFLAGS = -D__USE_MINGW_ACCESS -DDETECT_MSYS_TTY -DNOGDI -DHAVE_STRING_H -Icompat -Icompat/regex -Icompat/win32 -DSTRIP_EXTENSION=\".exe\" |
Johannes Schindelin | 396ff75 | 2019-06-19 14:05:59 -0700 | [diff] [blame] | 492 | BASIC_LDFLAGS = -IGNORE:4217 -IGNORE:4049 -NOLOGO -ENTRY:wmainCRTStartup -SUBSYSTEM:CONSOLE |
Jeff Hostetler | dce7d29 | 2019-06-25 07:49:39 -0700 | [diff] [blame] | 493 | # invalidcontinue.obj allows Git's source code to close the same file |
| 494 | # handle twice, or to access the osfhandle of an already-closed stdout |
| 495 | # See https://msdn.microsoft.com/en-us/library/ms235330.aspx |
| 496 | EXTLIBS = user32.lib advapi32.lib shell32.lib wininet.lib ws2_32.lib invalidcontinue.obj kernel32.lib ntdll.lib |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 497 | PTHREAD_LIBS = |
| 498 | lib = |
Jeff Hostetler | dce7d29 | 2019-06-25 07:49:39 -0700 | [diff] [blame] | 499 | BASIC_CFLAGS += $(vcpkg_inc) $(sdk_includes) $(msvc_includes) |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 500 | ifndef DEBUG |
Jeff Hostetler | dce7d29 | 2019-06-25 07:49:39 -0700 | [diff] [blame] | 501 | BASIC_CFLAGS += $(vcpkg_rel_lib) |
| 502 | else |
| 503 | BASIC_CFLAGS += $(vcpkg_dbg_lib) |
| 504 | endif |
| 505 | BASIC_CFLAGS += $(sdk_libs) $(msvc_libs) |
| 506 | |
Jeff Hostetler | 556702f | 2019-06-25 07:49:40 -0700 | [diff] [blame] | 507 | ifneq ($(USE_MSVC_CRTDBG),) |
| 508 | # Optionally enable memory leak reporting. |
| 509 | BASIC_CFLAGS += -DUSE_MSVC_CRTDBG |
| 510 | endif |
Jeff Hostetler | dce7d29 | 2019-06-25 07:49:39 -0700 | [diff] [blame] | 511 | # Always give "-Zi" to the compiler and "-debug" to linker (even in |
| 512 | # release mode) to force a PDB to be generated (like RelWithDebInfo). |
| 513 | BASIC_CFLAGS += -Zi |
| 514 | BASIC_LDFLAGS += -debug -Zf |
| 515 | |
| 516 | ifdef NO_SAFESEH |
| 517 | LDFLAGS += -SAFESEH:NO |
| 518 | endif |
| 519 | |
| 520 | ifndef DEBUG |
| 521 | BASIC_CFLAGS += -GL -Gy -O2 -Oy- -MD -DNDEBUG |
| 522 | BASIC_LDFLAGS += -release -LTCG /OPT:REF /OPT:ICF /INCREMENTAL:NO /DEBUGTYPE:CV,FIXUP |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 523 | AR += -LTCG |
| 524 | else |
Jeff Hostetler | dce7d29 | 2019-06-25 07:49:39 -0700 | [diff] [blame] | 525 | BASIC_CFLAGS += -MDd -DDEBUG -D_DEBUG |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 526 | endif |
| 527 | X = .exe |
Johannes Schindelin | 963e154 | 2019-06-19 14:06:00 -0700 | [diff] [blame] | 528 | |
Johannes Schindelin | 4b8a271 | 2023-08-09 16:54:46 +0000 | [diff] [blame] | 529 | EXTRA_PROGRAMS += headless-git$X |
| 530 | |
Johannes Schindelin | 963e154 | 2019-06-19 14:06:00 -0700 | [diff] [blame] | 531 | compat/msvc.o: compat/msvc.c compat/mingw.c GIT-CFLAGS |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 532 | endif |
| 533 | ifeq ($(uname_S),Interix) |
| 534 | NO_INITGROUPS = YesPlease |
| 535 | NO_IPV6 = YesPlease |
| 536 | NO_MEMMEM = YesPlease |
| 537 | NO_MKDTEMP = YesPlease |
| 538 | NO_STRTOUMAX = YesPlease |
| 539 | NO_NSEC = YesPlease |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 540 | ifeq ($(uname_R),3.5) |
| 541 | NO_INET_NTOP = YesPlease |
| 542 | NO_INET_PTON = YesPlease |
| 543 | NO_SOCKADDR_STORAGE = YesPlease |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 544 | endif |
| 545 | ifeq ($(uname_R),5.2) |
| 546 | NO_INET_NTOP = YesPlease |
| 547 | NO_INET_PTON = YesPlease |
| 548 | NO_SOCKADDR_STORAGE = YesPlease |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 549 | endif |
| 550 | endif |
| 551 | ifeq ($(uname_S),Minix) |
| 552 | NO_IPV6 = YesPlease |
| 553 | NO_ST_BLOCKS_IN_STRUCT_STAT = YesPlease |
| 554 | NO_NSEC = YesPlease |
| 555 | NEEDS_LIBGEN = |
| 556 | NEEDS_CRYPTO_WITH_SSL = YesPlease |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 557 | NEEDS_RESOLV = |
| 558 | NO_HSTRERROR = YesPlease |
| 559 | NO_MMAP = YesPlease |
| 560 | NO_CURL = |
| 561 | NO_EXPAT = |
| 562 | endif |
| 563 | ifeq ($(uname_S),NONSTOP_KERNEL) |
| 564 | # Needs some C99 features, "inline" is just one of them. |
| 565 | # INLINE='' would just replace one set of warnings with another and |
| 566 | # still not compile in c89 mode, due to non-const array initializations. |
| 567 | CC = cc -c99 |
Randall S. Becker | 71fb089 | 2019-01-03 16:03:49 -0500 | [diff] [blame] | 568 | # Build down-rev compatible objects that don't use our new getopt_long. |
| 569 | ifeq ($(uname_R).$(uname_V),J06.21) |
| 570 | CC += -WRVU=J06.20 |
| 571 | endif |
| 572 | ifeq ($(uname_R).$(uname_V),L17.02) |
| 573 | CC += -WRVU=L16.05 |
| 574 | endif |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 575 | # Disable all optimization, seems to result in bad code, with -O or -O2 |
| 576 | # or even -O1 (default), /usr/local/libexec/git-core/git-pack-objects |
| 577 | # abends on "git push". Needs more investigation. |
Randall S. Becker | 71fb089 | 2019-01-03 16:03:49 -0500 | [diff] [blame] | 578 | CFLAGS = -g -O0 -Winline |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 579 | # We'd want it to be here. |
| 580 | prefix = /usr/local |
Randall S. Becker | 71fb089 | 2019-01-03 16:03:49 -0500 | [diff] [blame] | 581 | # perl and python must be in /usr/bin on NonStop - supplied by HPE |
| 582 | # with operating system in that managed directory. |
| 583 | PERL_PATH = /usr/bin/perl |
| 584 | PYTHON_PATH = /usr/bin/python |
| 585 | # The current /usr/coreutils/rm at lowest support level does not work |
| 586 | # with the git test structure. Long paths as in |
| 587 | # 'trash directory...' cause rm to terminate prematurely without fully |
| 588 | # removing the directory at OS releases J06.21 and L17.02. |
| 589 | # Default to the older rm until those two releases are deprecated. |
| 590 | RM = /bin/rm -f |
Randall S. Becker | 71fb089 | 2019-01-03 16:03:49 -0500 | [diff] [blame] | 591 | NEEDS_CRYPTO_WITH_SSL = YesPlease |
| 592 | HAVE_DEV_TTY = YesPlease |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 593 | HAVE_LIBCHARSET_H = YesPlease |
| 594 | HAVE_STRINGS_H = YesPlease |
| 595 | NEEDS_LIBICONV = YesPlease |
| 596 | NEEDS_LIBINTL_BEFORE_LIBICONV = YesPlease |
| 597 | NO_SYS_SELECT_H = UnfortunatelyYes |
| 598 | NO_D_TYPE_IN_DIRENT = YesPlease |
Randall S. Becker | 71fb089 | 2019-01-03 16:03:49 -0500 | [diff] [blame] | 599 | NO_GETTEXT = YesPlease |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 600 | NO_HSTRERROR = YesPlease |
| 601 | NO_STRCASESTR = YesPlease |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 602 | NO_MEMMEM = YesPlease |
| 603 | NO_STRLCPY = YesPlease |
| 604 | NO_SETENV = YesPlease |
| 605 | NO_UNSETENV = YesPlease |
| 606 | NO_MKDTEMP = YesPlease |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 607 | # Currently libiconv-1.9.1. |
| 608 | OLD_ICONV = UnfortunatelyYes |
Randall S. Becker | 71fb089 | 2019-01-03 16:03:49 -0500 | [diff] [blame] | 609 | NO_REGEX = NeedsStartEnd |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 610 | NO_PTHREADS = UnfortunatelyYes |
Randall S. Becker | 243a4c7 | 2019-02-09 19:20:16 -0500 | [diff] [blame] | 611 | FREAD_READS_DIRECTORIES = UnfortunatelyYes |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 612 | |
| 613 | # Not detected (nor checked for) by './configure'. |
| 614 | # We don't have SA_RESTART on NonStop, unfortunalety. |
| 615 | COMPAT_CFLAGS += -DSA_RESTART=0 |
| 616 | # Apparently needed in compat/fnmatch/fnmatch.c. |
| 617 | COMPAT_CFLAGS += -DHAVE_STRING_H=1 |
| 618 | NO_ST_BLOCKS_IN_STRUCT_STAT = YesPlease |
| 619 | NO_NSEC = YesPlease |
| 620 | NO_PREAD = YesPlease |
| 621 | NO_MMAP = YesPlease |
| 622 | NO_POLL = YesPlease |
| 623 | NO_INTPTR_T = UnfortunatelyYes |
brian m. carlson | 05cd988 | 2022-01-17 21:56:16 +0000 | [diff] [blame] | 624 | CSPRNG_METHOD = openssl |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 625 | SANE_TOOL_PATH = /usr/coreutils/bin:/usr/local/bin |
Randall S. Becker | f0ec22b | 2019-02-09 12:26:11 -0500 | [diff] [blame] | 626 | SHELL_PATH = /usr/coreutils/bin/bash |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 627 | endif |
Carlo Marcelo Arenas Belón | ebd2e4a | 2021-09-28 20:19:40 -0700 | [diff] [blame] | 628 | ifeq ($(uname_S),MINGW) |
Harshil-Jani | 2987407 | 2023-02-02 03:51:38 +0000 | [diff] [blame] | 629 | ifeq ($(shell expr "$(uname_R)" : '1\.'),2) |
| 630 | $(error "Building with MSys is no longer supported") |
| 631 | endif |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 632 | pathsep = ; |
Kirill Smelkov | 22f4c27 | 2014-04-09 16:48:27 +0400 | [diff] [blame] | 633 | HAVE_ALLOCA_H = YesPlease |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 634 | NO_PREAD = YesPlease |
| 635 | NEEDS_CRYPTO_WITH_SSL = YesPlease |
| 636 | NO_LIBGEN_H = YesPlease |
| 637 | NO_POLL = YesPlease |
| 638 | NO_SYMLINK_HEAD = YesPlease |
| 639 | NO_UNIX_SOCKETS = YesPlease |
| 640 | NO_SETENV = YesPlease |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 641 | NO_STRCASESTR = YesPlease |
| 642 | NO_STRLCPY = YesPlease |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 643 | NO_MEMMEM = YesPlease |
| 644 | NEEDS_LIBICONV = YesPlease |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 645 | NO_STRTOUMAX = YesPlease |
| 646 | NO_MKDTEMP = YesPlease |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 647 | NO_SVN_TESTS = YesPlease |
Jeff Hostetler | 62c7367 | 2022-03-25 18:02:51 +0000 | [diff] [blame] | 648 | |
| 649 | # The builtin FSMonitor requires Named Pipes and Threads on Windows. |
| 650 | # These are always available, so we do not have to conditionally |
| 651 | # support it. |
| 652 | FSMONITOR_DAEMON_BACKEND = win32 |
Jeff Hostetler | d33c804 | 2022-05-26 21:46:59 +0000 | [diff] [blame] | 653 | FSMONITOR_OS_SETTINGS = win32 |
| 654 | |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 655 | RUNTIME_PREFIX = YesPlease |
Johannes Schindelin | 86e2545 | 2018-04-10 11:05:46 -0400 | [diff] [blame] | 656 | HAVE_WPGMPTR = YesWeDo |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 657 | NO_ST_BLOCKS_IN_STRUCT_STAT = YesPlease |
Jeff Hostetler | 59c7b88 | 2021-03-15 21:08:23 +0000 | [diff] [blame] | 658 | USE_WIN32_IPC = YesPlease |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 659 | USE_WIN32_MMAP = YesPlease |
Michael Haggerty | 5b63361 | 2017-09-25 10:00:10 +0200 | [diff] [blame] | 660 | MMAP_PREVENTS_DELETE = UnfortunatelyYes |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 661 | UNRELIABLE_FSTAT = UnfortunatelyYes |
| 662 | OBJECT_CREATION_USES_RENAMES = UnfortunatelyNeedsTo |
| 663 | NO_REGEX = YesPlease |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 664 | ETAGS_TARGET = ETAGS |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 665 | NO_POSIX_GOODIES = UnfortunatelyYes |
Pat Thoyts | 65db044 | 2012-06-21 12:24:14 +0100 | [diff] [blame] | 666 | DEFAULT_HELP_FORMAT = html |
Emily Shaffer | b7e6a41 | 2021-07-21 18:27:06 -0700 | [diff] [blame] | 667 | HAVE_PLATFORM_PROCINFO = YesPlease |
brian m. carlson | 05cd988 | 2022-01-17 21:56:16 +0000 | [diff] [blame] | 668 | CSPRNG_METHOD = rtlgenrandom |
Johannes Schindelin | 396ff75 | 2019-06-19 14:05:59 -0700 | [diff] [blame] | 669 | BASIC_LDFLAGS += -municode |
Johannes Schindelin | 7b40ae8 | 2016-01-13 14:31:01 +0100 | [diff] [blame] | 670 | COMPAT_CFLAGS += -DNOGDI -Icompat -Icompat/win32 |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 671 | COMPAT_CFLAGS += -DSTRIP_EXTENSION=\".exe\" |
| 672 | COMPAT_OBJS += compat/mingw.o compat/winansi.o \ |
Jeff Hostetler | 353d3d7 | 2019-02-22 14:25:02 -0800 | [diff] [blame] | 673 | compat/win32/trace2_win32_process_info.o \ |
Neeraj Singh | abf38ab | 2022-03-10 22:43:20 +0000 | [diff] [blame] | 674 | compat/win32/flush.o \ |
Torsten Bögershausen | 1cadad6 | 2018-12-15 05:33:30 +0100 | [diff] [blame] | 675 | compat/win32/path-utils.o \ |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 676 | compat/win32/pthread.o compat/win32/syslog.o \ |
| 677 | compat/win32/dirent.o |
Johannes Schindelin | 7c9fbda | 2019-12-04 22:27:04 +0100 | [diff] [blame] | 678 | BASIC_CFLAGS += -DWIN32 |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 679 | EXTLIBS += -lws2_32 |
Pat Thoyts | ce39c2e | 2012-05-24 00:56:24 +0100 | [diff] [blame] | 680 | GITLIBS += git.res |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 681 | PTHREAD_LIBS = |
Pat Thoyts | ce39c2e | 2012-05-24 00:56:24 +0100 | [diff] [blame] | 682 | RC = windres -O coff |
Jonathan Nieder | 95f31e9 | 2010-09-04 03:25:09 -0500 | [diff] [blame] | 683 | NATIVE_CRLF = YesPlease |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 684 | X = .exe |
Harshil-Jani | 2987407 | 2023-02-02 03:51:38 +0000 | [diff] [blame] | 685 | # MSys2 |
| 686 | prefix = /usr/ |
| 687 | # Enable DEP |
| 688 | BASIC_LDFLAGS += -Wl,--nxcompat |
| 689 | # Enable ASLR (unless debugging) |
| 690 | ifneq (,$(findstring -O,$(filter-out -O0 -Og,$(CFLAGS)))) |
| 691 | BASIC_LDFLAGS += -Wl,--dynamicbase |
| 692 | endif |
| 693 | ifeq (MINGW32,$(MSYSTEM)) |
| 694 | prefix = /mingw32 |
| 695 | HOST_CPU = i686 |
| 696 | BASIC_LDFLAGS += -Wl,--pic-executable,-e,_mainCRTStartup |
| 697 | endif |
| 698 | ifeq (MINGW64,$(MSYSTEM)) |
| 699 | prefix = /mingw64 |
| 700 | HOST_CPU = x86_64 |
| 701 | BASIC_LDFLAGS += -Wl,--pic-executable,-e,mainCRTStartup |
| 702 | else |
| 703 | COMPAT_CFLAGS += -D_USE_32BIT_TIME_T |
| 704 | BASIC_LDFLAGS += -Wl,--large-address-aware |
| 705 | endif |
| 706 | CC = gcc |
| 707 | COMPAT_CFLAGS += -D__USE_MINGW_ANSI_STDIO=0 -DDETECT_MSYS_TTY \ |
| 708 | -fstack-protector-strong |
| 709 | EXTLIBS += -lntdll |
Johannes Schindelin | 4b8a271 | 2023-08-09 16:54:46 +0000 | [diff] [blame] | 710 | EXTRA_PROGRAMS += headless-git$X |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 711 | INSTALL = /bin/install |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 712 | INTERNAL_QSORT = YesPlease |
| 713 | HAVE_LIBCHARSET_H = YesPlease |
Harshil-Jani | 2987407 | 2023-02-02 03:51:38 +0000 | [diff] [blame] | 714 | USE_GETTEXT_SCHEME = fallthrough |
| 715 | USE_LIBPCRE = YesPlease |
| 716 | USE_NED_ALLOCATOR = YesPlease |
| 717 | ifeq (/mingw64,$(subst 32,64,$(prefix))) |
| 718 | # Move system config into top-level /etc/ |
| 719 | ETC_GITCONFIG = ../etc/gitconfig |
| 720 | ETC_GITATTRIBUTES = ../etc/gitattributes |
Johannes Schindelin | df5218b | 2016-01-13 14:30:53 +0100 | [diff] [blame] | 721 | endif |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 722 | endif |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 723 | ifeq ($(uname_S),QNX) |
| 724 | COMPAT_CFLAGS += -DSA_RESTART=0 |
Matt Kraai | 081fd8d | 2013-02-11 14:03:45 -0800 | [diff] [blame] | 725 | EXPAT_NEEDS_XMLPARSE_H = YesPlease |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 726 | HAVE_STRINGS_H = YesPlease |
| 727 | NEEDS_SOCKET = YesPlease |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 728 | NO_GETPAGESIZE = YesPlease |
| 729 | NO_ICONV = YesPlease |
| 730 | NO_MEMMEM = YesPlease |
| 731 | NO_MKDTEMP = YesPlease |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 732 | NO_NSEC = YesPlease |
| 733 | NO_PTHREADS = YesPlease |
Jeff King | e1b6dbb | 2013-01-03 16:05:41 -0500 | [diff] [blame] | 734 | NO_STRCASESTR = YesPlease |
| 735 | NO_STRLCPY = YesPlease |
| 736 | endif |
Johannes Schindelin | 976aaed | 2019-07-29 13:08:12 -0700 | [diff] [blame] | 737 | |
| 738 | vcxproj: |
| 739 | # Require clean work tree |
| 740 | git update-index -q --refresh && \ |
| 741 | git diff-files --quiet && \ |
| 742 | git diff-index --cached --quiet HEAD -- |
| 743 | |
| 744 | # Make .vcxproj files and add them |
Johannes Schindelin | 976aaed | 2019-07-29 13:08:12 -0700 | [diff] [blame] | 745 | perl contrib/buildsystems/generate -g Vcxproj |
| 746 | git add -f git.sln {*,*/lib,t/helper/*}/*.vcxproj |
| 747 | |
Johannes Schindelin | 030a628 | 2019-10-04 08:09:31 -0700 | [diff] [blame] | 748 | # Generate the LinkOrCopyBuiltins.targets and LinkOrCopyRemoteHttp.targets file |
Johannes Schindelin | b18ae14 | 2019-07-29 13:08:13 -0700 | [diff] [blame] | 749 | (echo '<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">' && \ |
| 750 | echo ' <Target Name="CopyBuiltins_AfterBuild" AfterTargets="AfterBuild">' && \ |
| 751 | for name in $(BUILT_INS);\ |
| 752 | do \ |
| 753 | echo ' <Copy SourceFiles="$$(OutDir)\git.exe" DestinationFiles="$$(OutDir)\'"$$name"'" SkipUnchangedFiles="true" UseHardlinksIfPossible="true" />'; \ |
| 754 | done && \ |
Johannes Schindelin | 030a628 | 2019-10-04 08:09:31 -0700 | [diff] [blame] | 755 | echo ' </Target>' && \ |
| 756 | echo '</Project>') >git/LinkOrCopyBuiltins.targets |
| 757 | (echo '<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">' && \ |
| 758 | echo ' <Target Name="CopyBuiltins_AfterBuild" AfterTargets="AfterBuild">' && \ |
Johannes Schindelin | b18ae14 | 2019-07-29 13:08:13 -0700 | [diff] [blame] | 759 | for name in $(REMOTE_CURL_ALIASES); \ |
| 760 | do \ |
| 761 | echo ' <Copy SourceFiles="$$(OutDir)\'"$(REMOTE_CURL_PRIMARY)"'" DestinationFiles="$$(OutDir)\'"$$name"'" SkipUnchangedFiles="true" UseHardlinksIfPossible="true" />'; \ |
| 762 | done && \ |
| 763 | echo ' </Target>' && \ |
Johannes Schindelin | 030a628 | 2019-10-04 08:09:31 -0700 | [diff] [blame] | 764 | echo '</Project>') >git-remote-http/LinkOrCopyRemoteHttp.targets |
| 765 | git add -f git/LinkOrCopyBuiltins.targets git-remote-http/LinkOrCopyRemoteHttp.targets |
Johannes Schindelin | b18ae14 | 2019-07-29 13:08:13 -0700 | [diff] [blame] | 766 | |
Ævar Arnfjörð Bjarmason | 7c3c0a9 | 2021-09-23 12:29:57 +0200 | [diff] [blame] | 767 | # Add generated headers |
| 768 | $(MAKE) MSVC=1 SKIP_VCPKG=1 prefix=/mingw64 $(GENERATED_H) |
| 769 | git add -f $(GENERATED_H) |
Johannes Schindelin | 976aaed | 2019-07-29 13:08:12 -0700 | [diff] [blame] | 770 | |
| 771 | # Add scripts |
| 772 | rm -f perl/perl.mak |
Johannes Schindelin | 5d65ad1 | 2019-10-04 08:09:32 -0700 | [diff] [blame] | 773 | $(MAKE) MSVC=1 SKIP_VCPKG=1 prefix=/mingw64 $(SCRIPT_LIB) $(SCRIPTS) |
Johannes Schindelin | 976aaed | 2019-07-29 13:08:12 -0700 | [diff] [blame] | 774 | # Strip out the sane tool path, needed only for building |
| 775 | sed -i '/^git_broken_path_fix ".*/d' git-sh-setup |
Johannes Schindelin | 5d65ad1 | 2019-10-04 08:09:32 -0700 | [diff] [blame] | 776 | git add -f $(SCRIPT_LIB) $(SCRIPTS) |
Johannes Schindelin | 976aaed | 2019-07-29 13:08:12 -0700 | [diff] [blame] | 777 | |
| 778 | # Add Perl module |
| 779 | $(MAKE) $(LIB_PERL_GEN) |
| 780 | git add -f perl/build |
| 781 | |
| 782 | # Add bin-wrappers, for testing |
| 783 | rm -rf bin-wrappers/ |
| 784 | $(MAKE) MSVC=1 SKIP_VCPKG=1 prefix=/mingw64 $(test_bindir_programs) |
| 785 | # Ensure that the GIT_EXEC_PATH is a Unix-y one, and that the absolute |
| 786 | # path of the repository is not hard-coded (GIT_EXEC_PATH will be set |
| 787 | # by test-lib.sh according to the current setup) |
| 788 | sed -i -e 's/^\(GIT_EXEC_PATH\)=.*/test -n "$${\1##*:*}" ||\ |
| 789 | \1="$$(cygpath -u "$$\1")"/' \ |
| 790 | -e "s|'$$(pwd)|\"\$$GIT_EXEC_PATH\"'|g" bin-wrappers/* |
| 791 | # Ensure that test-* helpers find the .dll files copied to top-level |
| 792 | sed -i 's|^PATH=.*|&:"$$GIT_EXEC_PATH"|' bin-wrappers/test-* |
| 793 | # We do not want to force hard-linking builtins |
| 794 | sed -i 's|\(git\)-\([-a-z]*\)\.exe"|\1.exe" \2|g' \ |
| 795 | bin-wrappers/git-{receive-pack,upload-archive} |
| 796 | git add -f $(test_bindir_programs) |
| 797 | # remote-ext is a builtin, but invoked as if it were external |
| 798 | sed 's|receive-pack|remote-ext|g' \ |
| 799 | <bin-wrappers/git-receive-pack >bin-wrappers/git-remote-ext |
| 800 | git add -f bin-wrappers/git-remote-ext |
| 801 | |
| 802 | # Add templates |
| 803 | $(MAKE) -C templates |
| 804 | git add -f templates/boilerplates.made templates/blt/ |
| 805 | |
Johannes Schindelin | 5d65ad1 | 2019-10-04 08:09:32 -0700 | [diff] [blame] | 806 | # Add the translated messages |
| 807 | make MSVC=1 SKIP_VCPKG=1 prefix=/mingw64 $(MOFILES) |
| 808 | git add -f $(MOFILES) |
| 809 | |
Johannes Schindelin | 976aaed | 2019-07-29 13:08:12 -0700 | [diff] [blame] | 810 | # Add build options |
| 811 | $(MAKE) MSVC=1 SKIP_VCPKG=1 prefix=/mingw64 GIT-BUILD-OPTIONS |
| 812 | git add -f GIT-BUILD-OPTIONS |
| 813 | |
| 814 | # Commit the whole shebang |
| 815 | git commit -m "Generate Visual Studio solution" \ |
| 816 | -m "Auto-generated by \`$(MAKE)$(MAKEFLAGS) $@\`" |