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