]>
Commit | Line | Data |
---|---|---|
e1b6dbb5 JK |
1 | # Platform specific Makefile tweaks based on uname detection |
2 | ||
dce7d295 JH |
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 | ||
e1b6dbb5 JK |
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 | ||
14 | ifdef MSVC | |
15 | # avoid the MingW and Cygwin configuration sections | |
16 | uname_S := Windows | |
17 | uname_O := Windows | |
dce7d295 JH |
18 | |
19 | # Generate and include makefile variables that point to the | |
20 | # currently installed set of MSVC command line tools. | |
21 | compat/vcbuild/MSVC-DEFS-GEN: compat/vcbuild/find_vs_env.bat | |
22 | @"$<" | tr '\\' / >"$@" | |
23 | include compat/vcbuild/MSVC-DEFS-GEN | |
24 | ||
25 | # See if vcpkg and the vcpkg-build versions of the third-party | |
26 | # libraries that we use are installed. We include the result | |
27 | # to get $(vcpkg_*) variables defined for the Makefile. | |
976aaedc | 28 | ifeq (,$(SKIP_VCPKG)) |
dce7d295 JH |
29 | compat/vcbuild/VCPKG-DEFS: compat/vcbuild/vcpkg_install.bat |
30 | @"$<" | |
31 | include compat/vcbuild/VCPKG-DEFS | |
e1b6dbb5 | 32 | endif |
976aaedc | 33 | endif |
e1b6dbb5 JK |
34 | |
35 | # We choose to avoid "if .. else if .. else .. endif endif" | |
36 | # because maintaining the nesting to match is a pain. If | |
37 | # we had "elif" things would have been much nicer... | |
38 | ||
e1b6dbb5 JK |
39 | ifeq ($(uname_S),OSF1) |
40 | # Need this for u_short definitions et al | |
41 | BASIC_CFLAGS += -D_OSF_SOURCE | |
42 | SOCKLEN_T = int | |
43 | NO_STRTOULL = YesPlease | |
44 | NO_NSEC = YesPlease | |
45 | endif | |
46 | ifeq ($(uname_S),Linux) | |
61f76a36 | 47 | HAVE_ALLOCA_H = YesPlease |
e1b6dbb5 | 48 | NO_STRLCPY = YesPlease |
e1b6dbb5 JK |
49 | HAVE_PATHS_H = YesPlease |
50 | LIBC_CONTAINS_LIBINTL = YesPlease | |
51 | HAVE_DEV_TTY = YesPlease | |
148d6771 | 52 | HAVE_CLOCK_GETTIME = YesPlease |
a6c3c638 | 53 | HAVE_CLOCK_MONOTONIC = YesPlease |
52fcec75 EW |
54 | # -lrt is needed for clock_gettime on glibc <= 2.16 |
55 | NEEDS_LIBRT = YesPlease | |
0cc30e0e | 56 | HAVE_GETDELIM = YesPlease |
71b40103 | 57 | SANE_TEXT_GREP=-a |
e2d90fd1 | 58 | FREAD_READS_DIRECTORIES = UnfortunatelyYes |
9806f5a7 | 59 | BASIC_CFLAGS += -DHAVE_SYSINFO |
226c0ddd | 60 | PROCFS_EXECUTABLE_PATH = /proc/self/exe |
e1b6dbb5 JK |
61 | endif |
62 | ifeq ($(uname_S),GNU/kFreeBSD) | |
61f76a36 | 63 | HAVE_ALLOCA_H = YesPlease |
e1b6dbb5 | 64 | NO_STRLCPY = YesPlease |
e1b6dbb5 JK |
65 | HAVE_PATHS_H = YesPlease |
66 | DIR_HAS_BSD_GROUP_SEMANTICS = YesPlease | |
67 | LIBC_CONTAINS_LIBINTL = YesPlease | |
e2d90fd1 | 68 | FREAD_READS_DIRECTORIES = UnfortunatelyYes |
e1b6dbb5 JK |
69 | endif |
70 | ifeq ($(uname_S),UnixWare) | |
71 | CC = cc | |
72 | NEEDS_SOCKET = YesPlease | |
73 | NEEDS_NSL = YesPlease | |
74 | NEEDS_SSL_WITH_CRYPTO = YesPlease | |
75 | NEEDS_LIBICONV = YesPlease | |
76 | SHELL_PATH = /usr/local/bin/bash | |
77 | NO_IPV6 = YesPlease | |
78 | NO_HSTRERROR = YesPlease | |
e1b6dbb5 JK |
79 | BASIC_CFLAGS += -Kthread |
80 | BASIC_CFLAGS += -I/usr/local/include | |
81 | BASIC_LDFLAGS += -L/usr/local/lib | |
82 | INSTALL = ginstall | |
83 | TAR = gtar | |
84 | NO_STRCASESTR = YesPlease | |
85 | NO_MEMMEM = YesPlease | |
86 | endif | |
87 | ifeq ($(uname_S),SCO_SV) | |
88 | ifeq ($(uname_R),3.2) | |
89 | CFLAGS = -O2 | |
90 | endif | |
91 | ifeq ($(uname_R),5) | |
92 | CC = cc | |
93 | BASIC_CFLAGS += -Kthread | |
94 | endif | |
95 | NEEDS_SOCKET = YesPlease | |
96 | NEEDS_NSL = YesPlease | |
97 | NEEDS_SSL_WITH_CRYPTO = YesPlease | |
98 | NEEDS_LIBICONV = YesPlease | |
99 | SHELL_PATH = /usr/bin/bash | |
100 | NO_IPV6 = YesPlease | |
101 | NO_HSTRERROR = YesPlease | |
e1b6dbb5 JK |
102 | BASIC_CFLAGS += -I/usr/local/include |
103 | BASIC_LDFLAGS += -L/usr/local/lib | |
104 | NO_STRCASESTR = YesPlease | |
105 | NO_MEMMEM = YesPlease | |
106 | INSTALL = ginstall | |
107 | TAR = gtar | |
108 | endif | |
109 | ifeq ($(uname_S),Darwin) | |
110 | NEEDS_CRYPTO_WITH_SSL = YesPlease | |
111 | NEEDS_SSL_WITH_CRYPTO = YesPlease | |
112 | NEEDS_LIBICONV = YesPlease | |
9eeff2f6 JH |
113 | # Note: $(uname_R) gives us the underlying Darwin version. |
114 | # - MacOS 10.0.* and MacOS 10.1.0 = Darwin 1.* | |
115 | # - MacOS 10.x.* = Darwin (x+4).* for (1 <= x) | |
116 | # i.e. "begins with [15678] and a dot" means "10.4.* or older". | |
e1b6dbb5 JK |
117 | ifeq ($(shell expr "$(uname_R)" : '[15678]\.'),2) |
118 | OLD_ICONV = UnfortunatelyYes | |
9c7a0bee | 119 | NO_APPLE_COMMON_CRYPTO = YesPlease |
e1b6dbb5 JK |
120 | endif |
121 | ifeq ($(shell expr "$(uname_R)" : '[15]\.'),2) | |
122 | NO_STRLCPY = YesPlease | |
123 | endif | |
4e368785 ES |
124 | ifeq ($(shell test "`expr "$(uname_R)" : '\([0-9][0-9]*\)\.'`" -ge 11 && echo 1),1) |
125 | HAVE_GETDELIM = YesPlease | |
126 | endif | |
e1b6dbb5 JK |
127 | NO_MEMMEM = YesPlease |
128 | USE_ST_TIMESPEC = YesPlease | |
129 | HAVE_DEV_TTY = YesPlease | |
130 | COMPAT_OBJS += compat/precompose_utf8.o | |
131 | BASIC_CFLAGS += -DPRECOMPOSE_UNICODE | |
a42643aa | 132 | BASIC_CFLAGS += -DPROTECT_HFS_DEFAULT=1 |
9529080d | 133 | HAVE_BSD_SYSCTL = YesPlease |
8e178ec4 | 134 | FREAD_READS_DIRECTORIES = UnfortunatelyYes |
226c0ddd | 135 | HAVE_NS_GET_EXECUTABLE_PATH = YesPlease |
a0b31086 JS |
136 | |
137 | # Workaround for `gettext` being keg-only and not even being linked via | |
138 | # `brew link --force gettext`, should be obsolete as of | |
139 | # https://github.com/Homebrew/homebrew-core/pull/53489 | |
140 | ifeq ($(shell test -d /usr/local/opt/gettext/ && echo y),y) | |
141 | BASIC_CFLAGS += -I/usr/local/include -I/usr/local/opt/gettext/include | |
142 | BASIC_LDFLAGS += -L/usr/local/lib -L/usr/local/opt/gettext/lib | |
143 | ifeq ($(shell test -x /usr/local/opt/gettext/bin/msgfmt && echo y),y) | |
144 | MSGFMT = /usr/local/opt/gettext/bin/msgfmt | |
145 | endif | |
146 | endif | |
e1b6dbb5 JK |
147 | endif |
148 | ifeq ($(uname_S),SunOS) | |
149 | NEEDS_SOCKET = YesPlease | |
150 | NEEDS_NSL = YesPlease | |
151 | SHELL_PATH = /bin/bash | |
152 | SANE_TOOL_PATH = /usr/xpg6/bin:/usr/xpg4/bin | |
61f76a36 | 153 | HAVE_ALLOCA_H = YesPlease |
e1b6dbb5 JK |
154 | NO_STRCASESTR = YesPlease |
155 | NO_MEMMEM = YesPlease | |
156 | NO_MKDTEMP = YesPlease | |
e1b6dbb5 | 157 | NO_REGEX = YesPlease |
e1b6dbb5 JK |
158 | NO_MSGFMT_EXTENDED_OPTIONS = YesPlease |
159 | HAVE_DEV_TTY = YesPlease | |
160 | ifeq ($(uname_R),5.6) | |
161 | SOCKLEN_T = int | |
162 | NO_HSTRERROR = YesPlease | |
163 | NO_IPV6 = YesPlease | |
164 | NO_SOCKADDR_STORAGE = YesPlease | |
165 | NO_UNSETENV = YesPlease | |
166 | NO_SETENV = YesPlease | |
167 | NO_STRLCPY = YesPlease | |
168 | NO_STRTOUMAX = YesPlease | |
169 | GIT_TEST_CMP = cmp | |
170 | endif | |
171 | ifeq ($(uname_R),5.7) | |
172 | NEEDS_RESOLV = YesPlease | |
173 | NO_IPV6 = YesPlease | |
174 | NO_SOCKADDR_STORAGE = YesPlease | |
175 | NO_UNSETENV = YesPlease | |
176 | NO_SETENV = YesPlease | |
177 | NO_STRLCPY = YesPlease | |
178 | NO_STRTOUMAX = YesPlease | |
179 | GIT_TEST_CMP = cmp | |
180 | endif | |
181 | ifeq ($(uname_R),5.8) | |
182 | NO_UNSETENV = YesPlease | |
183 | NO_SETENV = YesPlease | |
184 | NO_STRTOUMAX = YesPlease | |
185 | GIT_TEST_CMP = cmp | |
186 | endif | |
187 | ifeq ($(uname_R),5.9) | |
188 | NO_UNSETENV = YesPlease | |
189 | NO_SETENV = YesPlease | |
190 | NO_STRTOUMAX = YesPlease | |
191 | GIT_TEST_CMP = cmp | |
192 | endif | |
193 | INSTALL = /usr/ucb/install | |
194 | TAR = gtar | |
61f76a36 | 195 | BASIC_CFLAGS += -D__EXTENSIONS__ -D__sun__ |
e1b6dbb5 JK |
196 | endif |
197 | ifeq ($(uname_O),Cygwin) | |
198 | ifeq ($(shell expr "$(uname_R)" : '1\.[1-6]\.'),4) | |
199 | NO_D_TYPE_IN_DIRENT = YesPlease | |
e1b6dbb5 JK |
200 | NO_STRCASESTR = YesPlease |
201 | NO_MEMMEM = YesPlease | |
e1b6dbb5 JK |
202 | NO_SYMLINK_HEAD = YesPlease |
203 | NO_IPV6 = YesPlease | |
204 | OLD_ICONV = UnfortunatelyYes | |
f593ef77 ML |
205 | # There are conflicting reports about this. |
206 | # On some boxes NO_MMAP is needed, and not so elsewhere. | |
207 | # Try commenting this out if you suspect MMAP is more efficient | |
208 | NO_MMAP = YesPlease | |
92f63d2b ML |
209 | else |
210 | NO_REGEX = UnfortunatelyYes | |
e1b6dbb5 | 211 | endif |
61f76a36 | 212 | HAVE_ALLOCA_H = YesPlease |
e1b6dbb5 JK |
213 | NEEDS_LIBICONV = YesPlease |
214 | NO_FAST_WORKING_DIRECTORY = UnfortunatelyYes | |
e1b6dbb5 | 215 | NO_ST_BLOCKS_IN_STRUCT_STAT = YesPlease |
e1b6dbb5 | 216 | X = .exe |
e1b6dbb5 | 217 | UNRELIABLE_FSTAT = UnfortunatelyYes |
e53a64b9 | 218 | OBJECT_CREATION_USES_RENAMES = UnfortunatelyNeedsTo |
5b633610 | 219 | MMAP_PREVENTS_DELETE = UnfortunatelyYes |
1cadad6f | 220 | COMPAT_OBJS += compat/win32/path-utils.o |
a5956d6a | 221 | FREAD_READS_DIRECTORIES = UnfortunatelyYes |
e1b6dbb5 JK |
222 | endif |
223 | ifeq ($(uname_S),FreeBSD) | |
224 | NEEDS_LIBICONV = YesPlease | |
6c6ce21b ES |
225 | # Versions up to 10.1 require OLD_ICONV; 10.2 and beyond don't. |
226 | # A typical version string looks like "10.2-RELEASE". | |
227 | ifeq ($(shell expr "$(uname_R)" : '[1-9]\.'),2) | |
228 | OLD_ICONV = YesPlease | |
229 | endif | |
230 | ifeq ($(firstword $(subst -, ,$(uname_R))),10.0) | |
231 | OLD_ICONV = YesPlease | |
232 | endif | |
233 | ifeq ($(firstword $(subst -, ,$(uname_R))),10.1) | |
234 | OLD_ICONV = YesPlease | |
235 | endif | |
e1b6dbb5 JK |
236 | NO_MEMMEM = YesPlease |
237 | BASIC_CFLAGS += -I/usr/local/include | |
238 | BASIC_LDFLAGS += -L/usr/local/lib | |
239 | DIR_HAS_BSD_GROUP_SEMANTICS = YesPlease | |
240 | USE_ST_TIMESPEC = YesPlease | |
241 | ifeq ($(shell expr "$(uname_R)" : '4\.'),2) | |
242 | PTHREAD_LIBS = -pthread | |
243 | NO_UINTMAX_T = YesPlease | |
244 | NO_STRTOUMAX = YesPlease | |
245 | endif | |
246 | PYTHON_PATH = /usr/local/bin/python | |
259f22af | 247 | PERL_PATH = /usr/local/bin/perl |
e1b6dbb5 | 248 | HAVE_PATHS_H = YesPlease |
9529080d | 249 | HAVE_BSD_SYSCTL = YesPlease |
226c0ddd | 250 | HAVE_BSD_KERN_PROC_SYSCTL = YesPlease |
995bc22d | 251 | PAGER_ENV = LESS=FRX LV=-c MORE=FRX |
e2d90fd1 | 252 | FREAD_READS_DIRECTORIES = UnfortunatelyYes |
18a4f6be | 253 | FILENO_IS_A_MACRO = UnfortunatelyYes |
e1b6dbb5 JK |
254 | endif |
255 | ifeq ($(uname_S),OpenBSD) | |
256 | NO_STRCASESTR = YesPlease | |
257 | NO_MEMMEM = YesPlease | |
258 | USE_ST_TIMESPEC = YesPlease | |
259 | NEEDS_LIBICONV = YesPlease | |
260 | BASIC_CFLAGS += -I/usr/local/include | |
261 | BASIC_LDFLAGS += -L/usr/local/lib | |
262 | HAVE_PATHS_H = YesPlease | |
9529080d | 263 | HAVE_BSD_SYSCTL = YesPlease |
226c0ddd DJ |
264 | HAVE_BSD_KERN_PROC_SYSCTL = YesPlease |
265 | PROCFS_EXECUTABLE_PATH = /proc/curproc/file | |
4e3ecbd4 | 266 | FREAD_READS_DIRECTORIES = UnfortunatelyYes |
18a4f6be | 267 | FILENO_IS_A_MACRO = UnfortunatelyYes |
92164af9 BS |
268 | endif |
269 | ifeq ($(uname_S),MirBSD) | |
270 | NO_STRCASESTR = YesPlease | |
271 | NO_MEMMEM = YesPlease | |
272 | USE_ST_TIMESPEC = YesPlease | |
273 | NEEDS_LIBICONV = YesPlease | |
274 | HAVE_PATHS_H = YesPlease | |
9529080d | 275 | HAVE_BSD_SYSCTL = YesPlease |
e1b6dbb5 JK |
276 | endif |
277 | ifeq ($(uname_S),NetBSD) | |
278 | ifeq ($(shell expr "$(uname_R)" : '[01]\.'),2) | |
279 | NEEDS_LIBICONV = YesPlease | |
280 | endif | |
281 | BASIC_CFLAGS += -I/usr/pkg/include | |
282 | BASIC_LDFLAGS += -L/usr/pkg/lib $(CC_LD_DYNPATH)/usr/pkg/lib | |
283 | USE_ST_TIMESPEC = YesPlease | |
e1b6dbb5 | 284 | HAVE_PATHS_H = YesPlease |
9529080d | 285 | HAVE_BSD_SYSCTL = YesPlease |
226c0ddd DJ |
286 | HAVE_BSD_KERN_PROC_SYSCTL = YesPlease |
287 | PROCFS_EXECUTABLE_PATH = /proc/curproc/exe | |
e1b6dbb5 JK |
288 | endif |
289 | ifeq ($(uname_S),AIX) | |
290 | DEFAULT_PAGER = more | |
291 | NO_STRCASESTR = YesPlease | |
292 | NO_MEMMEM = YesPlease | |
293 | NO_MKDTEMP = YesPlease | |
e1b6dbb5 JK |
294 | NO_STRLCPY = YesPlease |
295 | NO_NSEC = YesPlease | |
0e6d899f | 296 | NO_REGEX = NeedsStartEnd |
e1b6dbb5 JK |
297 | FREAD_READS_DIRECTORIES = UnfortunatelyYes |
298 | INTERNAL_QSORT = UnfortunatelyYes | |
299 | NEEDS_LIBICONV = YesPlease | |
300 | BASIC_CFLAGS += -D_LARGE_FILES | |
ee662bf5 | 301 | FILENO_IS_A_MACRO = UnfortunatelyYes |
400caafb | 302 | NEED_ACCESS_ROOT_HANDLER = UnfortunatelyYes |
e1b6dbb5 JK |
303 | ifeq ($(shell expr "$(uname_V)" : '[1234]'),1) |
304 | NO_PTHREADS = YesPlease | |
305 | else | |
306 | PTHREAD_LIBS = -lpthread | |
307 | endif | |
308 | ifeq ($(shell expr "$(uname_V).$(uname_R)" : '5\.1'),3) | |
309 | INLINE = '' | |
310 | endif | |
311 | GIT_TEST_CMP = cmp | |
312 | endif | |
313 | ifeq ($(uname_S),GNU) | |
314 | # GNU/Hurd | |
61f76a36 | 315 | HAVE_ALLOCA_H = YesPlease |
e1b6dbb5 | 316 | NO_STRLCPY = YesPlease |
e1b6dbb5 JK |
317 | HAVE_PATHS_H = YesPlease |
318 | LIBC_CONTAINS_LIBINTL = YesPlease | |
274a1328 | 319 | FREAD_READS_DIRECTORIES = UnfortunatelyYes |
e1b6dbb5 JK |
320 | endif |
321 | ifeq ($(uname_S),IRIX) | |
322 | NO_SETENV = YesPlease | |
323 | NO_UNSETENV = YesPlease | |
324 | NO_STRCASESTR = YesPlease | |
325 | NO_MEMMEM = YesPlease | |
e1b6dbb5 JK |
326 | NO_MKDTEMP = YesPlease |
327 | # When compiled with the MIPSpro 7.4.4m compiler, and without pthreads | |
328 | # (i.e. NO_PTHREADS is set), and _with_ MMAP (i.e. NO_MMAP is not set), | |
329 | # git dies with a segmentation fault when trying to access the first | |
330 | # entry of a reflog. The conservative choice is made to always set | |
331 | # NO_MMAP. If you suspect that your compiler is not affected by this | |
332 | # issue, comment out the NO_MMAP statement. | |
333 | NO_MMAP = YesPlease | |
334 | NO_REGEX = YesPlease | |
e1b6dbb5 JK |
335 | SNPRINTF_RETURNS_BOGUS = YesPlease |
336 | SHELL_PATH = /usr/gnu/bin/bash | |
337 | NEEDS_LIBGEN = YesPlease | |
338 | endif | |
339 | ifeq ($(uname_S),IRIX64) | |
340 | NO_SETENV = YesPlease | |
341 | NO_UNSETENV = YesPlease | |
342 | NO_STRCASESTR = YesPlease | |
343 | NO_MEMMEM = YesPlease | |
e1b6dbb5 JK |
344 | NO_MKDTEMP = YesPlease |
345 | # When compiled with the MIPSpro 7.4.4m compiler, and without pthreads | |
346 | # (i.e. NO_PTHREADS is set), and _with_ MMAP (i.e. NO_MMAP is not set), | |
347 | # git dies with a segmentation fault when trying to access the first | |
348 | # entry of a reflog. The conservative choice is made to always set | |
349 | # NO_MMAP. If you suspect that your compiler is not affected by this | |
350 | # issue, comment out the NO_MMAP statement. | |
351 | NO_MMAP = YesPlease | |
352 | NO_REGEX = YesPlease | |
e1b6dbb5 JK |
353 | SNPRINTF_RETURNS_BOGUS = YesPlease |
354 | SHELL_PATH = /usr/gnu/bin/bash | |
355 | NEEDS_LIBGEN = YesPlease | |
356 | endif | |
357 | ifeq ($(uname_S),HP-UX) | |
358 | INLINE = __inline | |
359 | NO_IPV6 = YesPlease | |
360 | NO_SETENV = YesPlease | |
361 | NO_STRCASESTR = YesPlease | |
362 | NO_MEMMEM = YesPlease | |
e1b6dbb5 JK |
363 | NO_STRLCPY = YesPlease |
364 | NO_MKDTEMP = YesPlease | |
365 | NO_UNSETENV = YesPlease | |
366 | NO_HSTRERROR = YesPlease | |
367 | NO_SYS_SELECT_H = YesPlease | |
e1b6dbb5 JK |
368 | SNPRINTF_RETURNS_BOGUS = YesPlease |
369 | NO_NSEC = YesPlease | |
370 | ifeq ($(uname_R),B.11.00) | |
371 | NO_INET_NTOP = YesPlease | |
372 | NO_INET_PTON = YesPlease | |
373 | endif | |
374 | ifeq ($(uname_R),B.10.20) | |
375 | # Override HP-UX 11.x setting: | |
376 | INLINE = | |
377 | SOCKLEN_T = size_t | |
378 | NO_PREAD = YesPlease | |
379 | NO_INET_NTOP = YesPlease | |
380 | NO_INET_PTON = YesPlease | |
381 | endif | |
382 | GIT_TEST_CMP = cmp | |
383 | endif | |
384 | ifeq ($(uname_S),Windows) | |
385 | GIT_VERSION := $(GIT_VERSION).MSVC | |
386 | pathsep = ; | |
dce7d295 JH |
387 | # Assume that this is built in Git for Windows' SDK |
388 | ifeq (MINGW32,$(MSYSTEM)) | |
389 | prefix = /mingw32 | |
390 | else | |
391 | prefix = /mingw64 | |
392 | endif | |
393 | # Prepend MSVC 64-bit tool-chain to PATH. | |
394 | # | |
395 | # A regular Git Bash *does not* have cl.exe in its $PATH. As there is a | |
396 | # link.exe next to, and required by, cl.exe, we have to prepend this | |
397 | # onto the existing $PATH. | |
398 | # | |
399 | SANE_TOOL_PATH ?= $(msvc_bin_dir_msys) | |
61f76a36 | 400 | HAVE_ALLOCA_H = YesPlease |
e1b6dbb5 JK |
401 | NO_PREAD = YesPlease |
402 | NEEDS_CRYPTO_WITH_SSL = YesPlease | |
403 | NO_LIBGEN_H = YesPlease | |
404 | NO_POLL = YesPlease | |
405 | NO_SYMLINK_HEAD = YesPlease | |
406 | NO_IPV6 = YesPlease | |
407 | NO_UNIX_SOCKETS = YesPlease | |
408 | NO_SETENV = YesPlease | |
e1b6dbb5 JK |
409 | NO_STRCASESTR = YesPlease |
410 | NO_STRLCPY = YesPlease | |
e1b6dbb5 | 411 | NO_MEMMEM = YesPlease |
dce7d295 | 412 | NEEDS_LIBICONV = YesPlease |
e1b6dbb5 | 413 | NO_STRTOUMAX = YesPlease |
e1b6dbb5 | 414 | NO_MKDTEMP = YesPlease |
dce7d295 JH |
415 | NO_INTTYPES_H = YesPlease |
416 | # VS2015 with UCRT claims that snprintf and friends are C99 compliant, | |
417 | # so we don't need this: | |
418 | # | |
419 | # SNPRINTF_RETURNS_BOGUS = YesPlease | |
e1b6dbb5 | 420 | NO_SVN_TESTS = YesPlease |
e1b6dbb5 | 421 | RUNTIME_PREFIX = YesPlease |
86e25458 | 422 | HAVE_WPGMPTR = YesWeDo |
e1b6dbb5 | 423 | NO_ST_BLOCKS_IN_STRUCT_STAT = YesPlease |
e1b6dbb5 | 424 | USE_WIN32_MMAP = YesPlease |
5b633610 | 425 | MMAP_PREVENTS_DELETE = UnfortunatelyYes |
e1b6dbb5 JK |
426 | # USE_NED_ALLOCATOR = YesPlease |
427 | UNRELIABLE_FSTAT = UnfortunatelyYes | |
428 | OBJECT_CREATION_USES_RENAMES = UnfortunatelyNeedsTo | |
429 | NO_REGEX = YesPlease | |
bad866a2 | 430 | NO_GETTEXT = YesPlease |
e1b6dbb5 | 431 | NO_PYTHON = YesPlease |
e0492c5b | 432 | ETAGS_TARGET = ETAGS |
e1b6dbb5 JK |
433 | NO_POSIX_GOODIES = UnfortunatelyYes |
434 | NATIVE_CRLF = YesPlease | |
435 | DEFAULT_HELP_FORMAT = html | |
436 | ||
437 | CC = compat/vcbuild/scripts/clink.pl | |
438 | AR = compat/vcbuild/scripts/lib.pl | |
439 | CFLAGS = | |
dce7d295 | 440 | BASIC_CFLAGS = -nologo -I. -Icompat/vcbuild/include -DWIN32 -D_CONSOLE -DHAVE_STRING_H -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE |
e1b6dbb5 | 441 | COMPAT_OBJS = compat/msvc.o compat/winansi.o \ |
22c3634c | 442 | compat/win32/path-utils.o \ |
e1b6dbb5 | 443 | compat/win32/pthread.o compat/win32/syslog.o \ |
353d3d77 | 444 | compat/win32/trace2_win32_process_info.o \ |
e1b6dbb5 | 445 | compat/win32/dirent.o |
dce7d295 | 446 | COMPAT_CFLAGS = -D__USE_MINGW_ACCESS -DDETECT_MSYS_TTY -DNOGDI -DHAVE_STRING_H -Icompat -Icompat/regex -Icompat/win32 -DSTRIP_EXTENSION=\".exe\" |
396ff754 | 447 | BASIC_LDFLAGS = -IGNORE:4217 -IGNORE:4049 -NOLOGO -ENTRY:wmainCRTStartup -SUBSYSTEM:CONSOLE |
dce7d295 JH |
448 | # invalidcontinue.obj allows Git's source code to close the same file |
449 | # handle twice, or to access the osfhandle of an already-closed stdout | |
450 | # See https://msdn.microsoft.com/en-us/library/ms235330.aspx | |
451 | EXTLIBS = user32.lib advapi32.lib shell32.lib wininet.lib ws2_32.lib invalidcontinue.obj kernel32.lib ntdll.lib | |
e1b6dbb5 JK |
452 | PTHREAD_LIBS = |
453 | lib = | |
dce7d295 JH |
454 | BASIC_CFLAGS += $(vcpkg_inc) $(sdk_includes) $(msvc_includes) |
455 | ifndef DEBUG | |
456 | BASIC_CFLAGS += $(vcpkg_rel_lib) | |
457 | else | |
458 | BASIC_CFLAGS += $(vcpkg_dbg_lib) | |
459 | endif | |
460 | BASIC_CFLAGS += $(sdk_libs) $(msvc_libs) | |
461 | ||
556702f8 JH |
462 | ifneq ($(USE_MSVC_CRTDBG),) |
463 | # Optionally enable memory leak reporting. | |
464 | BASIC_CFLAGS += -DUSE_MSVC_CRTDBG | |
465 | endif | |
dce7d295 JH |
466 | # Always give "-Zi" to the compiler and "-debug" to linker (even in |
467 | # release mode) to force a PDB to be generated (like RelWithDebInfo). | |
468 | BASIC_CFLAGS += -Zi | |
469 | BASIC_LDFLAGS += -debug -Zf | |
470 | ||
471 | ifdef NO_SAFESEH | |
472 | LDFLAGS += -SAFESEH:NO | |
473 | endif | |
474 | ||
e1b6dbb5 | 475 | ifndef DEBUG |
dce7d295 JH |
476 | BASIC_CFLAGS += -GL -Gy -O2 -Oy- -MD -DNDEBUG |
477 | BASIC_LDFLAGS += -release -LTCG /OPT:REF /OPT:ICF /INCREMENTAL:NO /DEBUGTYPE:CV,FIXUP | |
e1b6dbb5 JK |
478 | AR += -LTCG |
479 | else | |
dce7d295 | 480 | BASIC_CFLAGS += -MDd -DDEBUG -D_DEBUG |
e1b6dbb5 JK |
481 | endif |
482 | X = .exe | |
963e1543 JS |
483 | |
484 | compat/msvc.o: compat/msvc.c compat/mingw.c GIT-CFLAGS | |
e1b6dbb5 JK |
485 | endif |
486 | ifeq ($(uname_S),Interix) | |
487 | NO_INITGROUPS = YesPlease | |
488 | NO_IPV6 = YesPlease | |
489 | NO_MEMMEM = YesPlease | |
490 | NO_MKDTEMP = YesPlease | |
491 | NO_STRTOUMAX = YesPlease | |
492 | NO_NSEC = YesPlease | |
e1b6dbb5 JK |
493 | ifeq ($(uname_R),3.5) |
494 | NO_INET_NTOP = YesPlease | |
495 | NO_INET_PTON = YesPlease | |
496 | NO_SOCKADDR_STORAGE = YesPlease | |
e1b6dbb5 JK |
497 | endif |
498 | ifeq ($(uname_R),5.2) | |
499 | NO_INET_NTOP = YesPlease | |
500 | NO_INET_PTON = YesPlease | |
501 | NO_SOCKADDR_STORAGE = YesPlease | |
e1b6dbb5 JK |
502 | endif |
503 | endif | |
504 | ifeq ($(uname_S),Minix) | |
505 | NO_IPV6 = YesPlease | |
506 | NO_ST_BLOCKS_IN_STRUCT_STAT = YesPlease | |
507 | NO_NSEC = YesPlease | |
508 | NEEDS_LIBGEN = | |
509 | NEEDS_CRYPTO_WITH_SSL = YesPlease | |
e1b6dbb5 JK |
510 | NEEDS_RESOLV = |
511 | NO_HSTRERROR = YesPlease | |
512 | NO_MMAP = YesPlease | |
513 | NO_CURL = | |
514 | NO_EXPAT = | |
515 | endif | |
516 | ifeq ($(uname_S),NONSTOP_KERNEL) | |
517 | # Needs some C99 features, "inline" is just one of them. | |
518 | # INLINE='' would just replace one set of warnings with another and | |
519 | # still not compile in c89 mode, due to non-const array initializations. | |
520 | CC = cc -c99 | |
71fb089c RB |
521 | # Build down-rev compatible objects that don't use our new getopt_long. |
522 | ifeq ($(uname_R).$(uname_V),J06.21) | |
523 | CC += -WRVU=J06.20 | |
524 | endif | |
525 | ifeq ($(uname_R).$(uname_V),L17.02) | |
526 | CC += -WRVU=L16.05 | |
527 | endif | |
e1b6dbb5 JK |
528 | # Disable all optimization, seems to result in bad code, with -O or -O2 |
529 | # or even -O1 (default), /usr/local/libexec/git-core/git-pack-objects | |
530 | # abends on "git push". Needs more investigation. | |
71fb089c | 531 | CFLAGS = -g -O0 -Winline |
e1b6dbb5 JK |
532 | # We'd want it to be here. |
533 | prefix = /usr/local | |
71fb089c RB |
534 | # perl and python must be in /usr/bin on NonStop - supplied by HPE |
535 | # with operating system in that managed directory. | |
536 | PERL_PATH = /usr/bin/perl | |
537 | PYTHON_PATH = /usr/bin/python | |
538 | # The current /usr/coreutils/rm at lowest support level does not work | |
539 | # with the git test structure. Long paths as in | |
540 | # 'trash directory...' cause rm to terminate prematurely without fully | |
541 | # removing the directory at OS releases J06.21 and L17.02. | |
542 | # Default to the older rm until those two releases are deprecated. | |
543 | RM = /bin/rm -f | |
e1b6dbb5 JK |
544 | # As detected by './configure'. |
545 | # Missdetected, hence commented out, see below. | |
546 | #NO_CURL = YesPlease | |
547 | # Added manually, see above. | |
71fb089c RB |
548 | NEEDS_SSL_WITH_CURL = YesPlease |
549 | NEEDS_CRYPTO_WITH_SSL = YesPlease | |
550 | HAVE_DEV_TTY = YesPlease | |
e1b6dbb5 JK |
551 | HAVE_LIBCHARSET_H = YesPlease |
552 | HAVE_STRINGS_H = YesPlease | |
553 | NEEDS_LIBICONV = YesPlease | |
554 | NEEDS_LIBINTL_BEFORE_LIBICONV = YesPlease | |
555 | NO_SYS_SELECT_H = UnfortunatelyYes | |
556 | NO_D_TYPE_IN_DIRENT = YesPlease | |
71fb089c | 557 | NO_GETTEXT = YesPlease |
e1b6dbb5 JK |
558 | NO_HSTRERROR = YesPlease |
559 | NO_STRCASESTR = YesPlease | |
e1b6dbb5 JK |
560 | NO_MEMMEM = YesPlease |
561 | NO_STRLCPY = YesPlease | |
562 | NO_SETENV = YesPlease | |
563 | NO_UNSETENV = YesPlease | |
564 | NO_MKDTEMP = YesPlease | |
e1b6dbb5 JK |
565 | # Currently libiconv-1.9.1. |
566 | OLD_ICONV = UnfortunatelyYes | |
71fb089c | 567 | NO_REGEX = NeedsStartEnd |
e1b6dbb5 | 568 | NO_PTHREADS = UnfortunatelyYes |
243a4c7e | 569 | FREAD_READS_DIRECTORIES = UnfortunatelyYes |
e1b6dbb5 JK |
570 | |
571 | # Not detected (nor checked for) by './configure'. | |
572 | # We don't have SA_RESTART on NonStop, unfortunalety. | |
573 | COMPAT_CFLAGS += -DSA_RESTART=0 | |
574 | # Apparently needed in compat/fnmatch/fnmatch.c. | |
575 | COMPAT_CFLAGS += -DHAVE_STRING_H=1 | |
576 | NO_ST_BLOCKS_IN_STRUCT_STAT = YesPlease | |
577 | NO_NSEC = YesPlease | |
578 | NO_PREAD = YesPlease | |
579 | NO_MMAP = YesPlease | |
580 | NO_POLL = YesPlease | |
581 | NO_INTPTR_T = UnfortunatelyYes | |
582 | # Bug report 10-120822-4477 submitted to HP NonStop development. | |
583 | MKDIR_WO_TRAILING_SLASH = YesPlease | |
584 | # RFE 10-120912-4693 submitted to HP NonStop development. | |
585 | NO_SETITIMER = UnfortunatelyYes | |
586 | SANE_TOOL_PATH = /usr/coreutils/bin:/usr/local/bin | |
f0ec22bb | 587 | SHELL_PATH = /usr/coreutils/bin/bash |
e1b6dbb5 JK |
588 | endif |
589 | ifneq (,$(findstring MINGW,$(uname_S))) | |
590 | pathsep = ; | |
22f4c27e | 591 | HAVE_ALLOCA_H = YesPlease |
e1b6dbb5 JK |
592 | NO_PREAD = YesPlease |
593 | NEEDS_CRYPTO_WITH_SSL = YesPlease | |
594 | NO_LIBGEN_H = YesPlease | |
595 | NO_POLL = YesPlease | |
596 | NO_SYMLINK_HEAD = YesPlease | |
597 | NO_UNIX_SOCKETS = YesPlease | |
598 | NO_SETENV = YesPlease | |
e1b6dbb5 JK |
599 | NO_STRCASESTR = YesPlease |
600 | NO_STRLCPY = YesPlease | |
e1b6dbb5 JK |
601 | NO_MEMMEM = YesPlease |
602 | NEEDS_LIBICONV = YesPlease | |
e1b6dbb5 JK |
603 | NO_STRTOUMAX = YesPlease |
604 | NO_MKDTEMP = YesPlease | |
e1b6dbb5 | 605 | NO_SVN_TESTS = YesPlease |
e1b6dbb5 | 606 | RUNTIME_PREFIX = YesPlease |
86e25458 | 607 | HAVE_WPGMPTR = YesWeDo |
e1b6dbb5 | 608 | NO_ST_BLOCKS_IN_STRUCT_STAT = YesPlease |
e1b6dbb5 | 609 | USE_WIN32_MMAP = YesPlease |
5b633610 | 610 | MMAP_PREVENTS_DELETE = UnfortunatelyYes |
e1b6dbb5 JK |
611 | USE_NED_ALLOCATOR = YesPlease |
612 | UNRELIABLE_FSTAT = UnfortunatelyYes | |
613 | OBJECT_CREATION_USES_RENAMES = UnfortunatelyNeedsTo | |
614 | NO_REGEX = YesPlease | |
615 | NO_PYTHON = YesPlease | |
e1b6dbb5 | 616 | ETAGS_TARGET = ETAGS |
e1b6dbb5 | 617 | NO_POSIX_GOODIES = UnfortunatelyYes |
65db0443 | 618 | DEFAULT_HELP_FORMAT = html |
396ff754 | 619 | BASIC_LDFLAGS += -municode |
7b40ae86 | 620 | COMPAT_CFLAGS += -DNOGDI -Icompat -Icompat/win32 |
e1b6dbb5 JK |
621 | COMPAT_CFLAGS += -DSTRIP_EXTENSION=\".exe\" |
622 | COMPAT_OBJS += compat/mingw.o compat/winansi.o \ | |
353d3d77 | 623 | compat/win32/trace2_win32_process_info.o \ |
1cadad6f | 624 | compat/win32/path-utils.o \ |
e1b6dbb5 JK |
625 | compat/win32/pthread.o compat/win32/syslog.o \ |
626 | compat/win32/dirent.o | |
7c9fbda6 | 627 | BASIC_CFLAGS += -DWIN32 |
e1b6dbb5 | 628 | EXTLIBS += -lws2_32 |
ce39c2e0 | 629 | GITLIBS += git.res |
e1b6dbb5 | 630 | PTHREAD_LIBS = |
ce39c2e0 | 631 | RC = windres -O coff |
95f31e9a | 632 | NATIVE_CRLF = YesPlease |
e1b6dbb5 | 633 | X = .exe |
e1b6dbb5 JK |
634 | ifneq (,$(wildcard ../THIS_IS_MSYSGIT)) |
635 | htmldir = doc/git/html/ | |
636 | prefix = | |
637 | INSTALL = /bin/install | |
638 | EXTLIBS += /mingw/lib/libz.a | |
639 | NO_R_TO_GCC_LINKER = YesPlease | |
640 | INTERNAL_QSORT = YesPlease | |
641 | HAVE_LIBCHARSET_H = YesPlease | |
ca354871 | 642 | NO_GETTEXT = YesPlease |
6a1ce2ed | 643 | COMPAT_CFLAGS += -D__USE_MINGW_ACCESS |
e1b6dbb5 | 644 | else |
aeb582a9 | 645 | ifneq ($(shell expr "$(uname_R)" : '1\.'),2) |
df5218b4 | 646 | # MSys2 |
7b40ae86 | 647 | prefix = /usr/ |
ce6a1585 İD |
648 | # Enable DEP |
649 | BASIC_LDFLAGS += -Wl,--nxcompat | |
650 | # Enable ASLR (unless debugging) | |
651 | ifneq (,$(findstring -O,$(filter-out -O0 -Og,$(CFLAGS)))) | |
652 | BASIC_LDFLAGS += -Wl,--dynamicbase | |
653 | endif | |
7b40ae86 JS |
654 | ifeq (MINGW32,$(MSYSTEM)) |
655 | prefix = /mingw32 | |
bb02e7a5 | 656 | HOST_CPU = i686 |
598b6c3a | 657 | BASIC_LDFLAGS += -Wl,--pic-executable,-e,_mainCRTStartup |
7b40ae86 JS |
658 | endif |
659 | ifeq (MINGW64,$(MSYSTEM)) | |
660 | prefix = /mingw64 | |
bb02e7a5 | 661 | HOST_CPU = x86_64 |
598b6c3a | 662 | BASIC_LDFLAGS += -Wl,--pic-executable,-e,mainCRTStartup |
7b40ae86 JS |
663 | else |
664 | COMPAT_CFLAGS += -D_USE_32BIT_TIME_T | |
665 | BASIC_LDFLAGS += -Wl,--large-address-aware | |
666 | endif | |
df5218b4 | 667 | CC = gcc |
a1c5e906 JS |
668 | COMPAT_CFLAGS += -D__USE_MINGW_ANSI_STDIO=0 -DDETECT_MSYS_TTY \ |
669 | -fstack-protector-strong | |
f7f90e0f | 670 | EXTLIBS += -lntdll |
df5218b4 JS |
671 | INSTALL = /bin/install |
672 | NO_R_TO_GCC_LINKER = YesPlease | |
673 | INTERNAL_QSORT = YesPlease | |
674 | HAVE_LIBCHARSET_H = YesPlease | |
f9206ce2 | 675 | NO_GETTEXT = |
b640b77f | 676 | USE_GETTEXT_SCHEME = fallthrough |
df5218b4 | 677 | USE_LIBPCRE= YesPlease |
fb95e2e3 | 678 | NO_LIBPCRE1_JIT = UnfortunatelyYes |
df5218b4 JS |
679 | NO_CURL = |
680 | USE_NED_ALLOCATOR = YesPlease | |
681 | else | |
682 | COMPAT_CFLAGS += -D__USE_MINGW_ANSI_STDIO | |
683 | NO_CURL = YesPlease | |
684 | endif | |
e1b6dbb5 JK |
685 | endif |
686 | endif | |
687 | ifeq ($(uname_S),QNX) | |
688 | COMPAT_CFLAGS += -DSA_RESTART=0 | |
081fd8d0 | 689 | EXPAT_NEEDS_XMLPARSE_H = YesPlease |
e1b6dbb5 JK |
690 | HAVE_STRINGS_H = YesPlease |
691 | NEEDS_SOCKET = YesPlease | |
e1b6dbb5 JK |
692 | NO_GETPAGESIZE = YesPlease |
693 | NO_ICONV = YesPlease | |
694 | NO_MEMMEM = YesPlease | |
695 | NO_MKDTEMP = YesPlease | |
e1b6dbb5 JK |
696 | NO_NSEC = YesPlease |
697 | NO_PTHREADS = YesPlease | |
698 | NO_R_TO_GCC_LINKER = YesPlease | |
699 | NO_STRCASESTR = YesPlease | |
700 | NO_STRLCPY = YesPlease | |
701 | endif | |
976aaedc JS |
702 | |
703 | vcxproj: | |
704 | # Require clean work tree | |
705 | git update-index -q --refresh && \ | |
706 | git diff-files --quiet && \ | |
707 | git diff-index --cached --quiet HEAD -- | |
708 | ||
709 | # Make .vcxproj files and add them | |
710 | unset QUIET_GEN QUIET_BUILT_IN; \ | |
711 | perl contrib/buildsystems/generate -g Vcxproj | |
712 | git add -f git.sln {*,*/lib,t/helper/*}/*.vcxproj | |
713 | ||
030a628b | 714 | # Generate the LinkOrCopyBuiltins.targets and LinkOrCopyRemoteHttp.targets file |
b18ae14a JS |
715 | (echo '<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">' && \ |
716 | echo ' <Target Name="CopyBuiltins_AfterBuild" AfterTargets="AfterBuild">' && \ | |
717 | for name in $(BUILT_INS);\ | |
718 | do \ | |
719 | echo ' <Copy SourceFiles="$$(OutDir)\git.exe" DestinationFiles="$$(OutDir)\'"$$name"'" SkipUnchangedFiles="true" UseHardlinksIfPossible="true" />'; \ | |
720 | done && \ | |
030a628b JS |
721 | echo ' </Target>' && \ |
722 | echo '</Project>') >git/LinkOrCopyBuiltins.targets | |
723 | (echo '<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">' && \ | |
724 | echo ' <Target Name="CopyBuiltins_AfterBuild" AfterTargets="AfterBuild">' && \ | |
b18ae14a JS |
725 | for name in $(REMOTE_CURL_ALIASES); \ |
726 | do \ | |
727 | echo ' <Copy SourceFiles="$$(OutDir)\'"$(REMOTE_CURL_PRIMARY)"'" DestinationFiles="$$(OutDir)\'"$$name"'" SkipUnchangedFiles="true" UseHardlinksIfPossible="true" />'; \ | |
728 | done && \ | |
729 | echo ' </Target>' && \ | |
030a628b JS |
730 | echo '</Project>') >git-remote-http/LinkOrCopyRemoteHttp.targets |
731 | git add -f git/LinkOrCopyBuiltins.targets git-remote-http/LinkOrCopyRemoteHttp.targets | |
b18ae14a | 732 | |
709df95b ES |
733 | # Add command-list.h and config-list.h |
734 | $(MAKE) MSVC=1 SKIP_VCPKG=1 prefix=/mingw64 config-list.h command-list.h | |
735 | git add -f config-list.h command-list.h | |
976aaedc JS |
736 | |
737 | # Add scripts | |
738 | rm -f perl/perl.mak | |
5d65ad17 | 739 | $(MAKE) MSVC=1 SKIP_VCPKG=1 prefix=/mingw64 $(SCRIPT_LIB) $(SCRIPTS) |
976aaedc JS |
740 | # Strip out the sane tool path, needed only for building |
741 | sed -i '/^git_broken_path_fix ".*/d' git-sh-setup | |
5d65ad17 | 742 | git add -f $(SCRIPT_LIB) $(SCRIPTS) |
976aaedc JS |
743 | |
744 | # Add Perl module | |
745 | $(MAKE) $(LIB_PERL_GEN) | |
746 | git add -f perl/build | |
747 | ||
748 | # Add bin-wrappers, for testing | |
749 | rm -rf bin-wrappers/ | |
750 | $(MAKE) MSVC=1 SKIP_VCPKG=1 prefix=/mingw64 $(test_bindir_programs) | |
751 | # Ensure that the GIT_EXEC_PATH is a Unix-y one, and that the absolute | |
752 | # path of the repository is not hard-coded (GIT_EXEC_PATH will be set | |
753 | # by test-lib.sh according to the current setup) | |
754 | sed -i -e 's/^\(GIT_EXEC_PATH\)=.*/test -n "$${\1##*:*}" ||\ | |
755 | \1="$$(cygpath -u "$$\1")"/' \ | |
756 | -e "s|'$$(pwd)|\"\$$GIT_EXEC_PATH\"'|g" bin-wrappers/* | |
757 | # Ensure that test-* helpers find the .dll files copied to top-level | |
758 | sed -i 's|^PATH=.*|&:"$$GIT_EXEC_PATH"|' bin-wrappers/test-* | |
759 | # We do not want to force hard-linking builtins | |
760 | sed -i 's|\(git\)-\([-a-z]*\)\.exe"|\1.exe" \2|g' \ | |
761 | bin-wrappers/git-{receive-pack,upload-archive} | |
762 | git add -f $(test_bindir_programs) | |
763 | # remote-ext is a builtin, but invoked as if it were external | |
764 | sed 's|receive-pack|remote-ext|g' \ | |
765 | <bin-wrappers/git-receive-pack >bin-wrappers/git-remote-ext | |
766 | git add -f bin-wrappers/git-remote-ext | |
767 | ||
768 | # Add templates | |
769 | $(MAKE) -C templates | |
770 | git add -f templates/boilerplates.made templates/blt/ | |
771 | ||
5d65ad17 JS |
772 | # Add the translated messages |
773 | make MSVC=1 SKIP_VCPKG=1 prefix=/mingw64 $(MOFILES) | |
774 | git add -f $(MOFILES) | |
775 | ||
976aaedc JS |
776 | # Add build options |
777 | $(MAKE) MSVC=1 SKIP_VCPKG=1 prefix=/mingw64 GIT-BUILD-OPTIONS | |
778 | git add -f GIT-BUILD-OPTIONS | |
779 | ||
780 | # Commit the whole shebang | |
781 | git commit -m "Generate Visual Studio solution" \ | |
782 | -m "Auto-generated by \`$(MAKE)$(MAKEFLAGS) $@\`" |