Makefile: hoist uname autodetection to config.mak.uname

Our Makefile first sets up some sane per-platform defaults by looking at "uname", then modifies that according to the results of autoconf (if any), then modifies that according to the user's wishes in config.mak. For sub-Makefiles like Documentation/Makefile, the latter two are available, but the uname defaults are available only to the main Makefile. This hasn't been a problem so far, because the sub-Makefiles do not rely on any of those automatic settings to do their work. This patch puts the uname magic into its own file so it can be reused in other Makefiles, opening up the possibility of new knobs. Note that we leave one reference to uname in the top-level Makefile: if we are on Darwin, we must check the NO_FINK and NO_DARWIN_PORTS settings. But because we are combining uname settings with user-options, we must do so after all of the config is loaded. This is acceptable, as the resulting conditionals are about setting variables specific to the top-level Makefile (and if that ever changes, we can hoist them into a separate post-config include, too). Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Jeff King committed Jan 3, 2013 at 16:05 UTC e1b6dbb554ece7c32a73c0d8fe63c99bcec70229
2 files changed +540 -542
Makefile
+1 -542
@@ -334,19 +334,6 @@ GIT-VERSION-FILE: FORCE
334 @$(SHELL_PATH) ./GIT-VERSION-GEN
335 -include GIT-VERSION-FILE
336
337 -uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo not')
338 -uname_M := $(shell sh -c 'uname -m 2>/dev/null || echo not')
339 -uname_O := $(shell sh -c 'uname -o 2>/dev/null || echo not')
340 -uname_R := $(shell sh -c 'uname -r 2>/dev/null || echo not')
341 -uname_P := $(shell sh -c 'uname -p 2>/dev/null || echo not')
342 -uname_V := $(shell sh -c 'uname -v 2>/dev/null || echo not')
343 -
344 -ifdef MSVC
345 - # avoid the MingW and Cygwin configuration sections
346 - uname_S := Windows
347 - uname_O := Windows
348 -endif
349 -
337 # CFLAGS and LDFLAGS are for the users to override from the command line.
338
339 CFLAGS = -g -O2 -Wall
@@ -945,535 +932,7 @@ EXTLIBS =
932
933 GIT_USER_AGENT = git/$(GIT_VERSION)
934
948 -#
949 -# Platform specific tweaks
950 -#
951 -
952 -# We choose to avoid "if .. else if .. else .. endif endif"
953 -# because maintaining the nesting to match is a pain. If
954 -# we had "elif" things would have been much nicer...
955 -
956 -ifeq ($(uname_M),x86_64)
957 - XDL_FAST_HASH = YesPlease
958 -endif
959 -ifeq ($(uname_S),OSF1)
960 - # Need this for u_short definitions et al
961 - BASIC_CFLAGS += -D_OSF_SOURCE
962 - SOCKLEN_T = int
963 - NO_STRTOULL = YesPlease
964 - NO_NSEC = YesPlease
965 -endif
966 -ifeq ($(uname_S),Linux)
967 - NO_STRLCPY = YesPlease
968 - NO_MKSTEMPS = YesPlease
969 - HAVE_PATHS_H = YesPlease
970 - LIBC_CONTAINS_LIBINTL = YesPlease
971 - HAVE_DEV_TTY = YesPlease
972 -endif
973 -ifeq ($(uname_S),GNU/kFreeBSD)
974 - NO_STRLCPY = YesPlease
975 - NO_MKSTEMPS = YesPlease
976 - HAVE_PATHS_H = YesPlease
977 - DIR_HAS_BSD_GROUP_SEMANTICS = YesPlease
978 - LIBC_CONTAINS_LIBINTL = YesPlease
979 -endif
980 -ifeq ($(uname_S),UnixWare)
981 - CC = cc
982 - NEEDS_SOCKET = YesPlease
983 - NEEDS_NSL = YesPlease
984 - NEEDS_SSL_WITH_CRYPTO = YesPlease
985 - NEEDS_LIBICONV = YesPlease
986 - SHELL_PATH = /usr/local/bin/bash
987 - NO_IPV6 = YesPlease
988 - NO_HSTRERROR = YesPlease
989 - NO_MKSTEMPS = YesPlease
990 - BASIC_CFLAGS += -Kthread
991 - BASIC_CFLAGS += -I/usr/local/include
992 - BASIC_LDFLAGS += -L/usr/local/lib
993 - INSTALL = ginstall
994 - TAR = gtar
995 - NO_STRCASESTR = YesPlease
996 - NO_MEMMEM = YesPlease
997 -endif
998 -ifeq ($(uname_S),SCO_SV)
999 - ifeq ($(uname_R),3.2)
1000 - CFLAGS = -O2
1001 - endif
1002 - ifeq ($(uname_R),5)
1003 - CC = cc
1004 - BASIC_CFLAGS += -Kthread
1005 - endif
1006 - NEEDS_SOCKET = YesPlease
1007 - NEEDS_NSL = YesPlease
1008 - NEEDS_SSL_WITH_CRYPTO = YesPlease
1009 - NEEDS_LIBICONV = YesPlease
1010 - SHELL_PATH = /usr/bin/bash
1011 - NO_IPV6 = YesPlease
1012 - NO_HSTRERROR = YesPlease
1013 - NO_MKSTEMPS = YesPlease
1014 - BASIC_CFLAGS += -I/usr/local/include
1015 - BASIC_LDFLAGS += -L/usr/local/lib
1016 - NO_STRCASESTR = YesPlease
1017 - NO_MEMMEM = YesPlease
1018 - INSTALL = ginstall
1019 - TAR = gtar
1020 -endif
1021 -ifeq ($(uname_S),Darwin)
1022 - NEEDS_CRYPTO_WITH_SSL = YesPlease
1023 - NEEDS_SSL_WITH_CRYPTO = YesPlease
1024 - NEEDS_LIBICONV = YesPlease
1025 - ifeq ($(shell expr "$(uname_R)" : '[15678]\.'),2)
1026 - OLD_ICONV = UnfortunatelyYes
1027 - endif
1028 - ifeq ($(shell expr "$(uname_R)" : '[15]\.'),2)
1029 - NO_STRLCPY = YesPlease
1030 - endif
1031 - NO_MEMMEM = YesPlease
1032 - USE_ST_TIMESPEC = YesPlease
1033 - HAVE_DEV_TTY = YesPlease
1034 - COMPAT_OBJS += compat/precompose_utf8.o
1035 - BASIC_CFLAGS += -DPRECOMPOSE_UNICODE
1036 -endif
1037 -ifeq ($(uname_S),SunOS)
1038 - NEEDS_SOCKET = YesPlease
1039 - NEEDS_NSL = YesPlease
1040 - SHELL_PATH = /bin/bash
1041 - SANE_TOOL_PATH = /usr/xpg6/bin:/usr/xpg4/bin
1042 - NO_STRCASESTR = YesPlease
1043 - NO_MEMMEM = YesPlease
1044 - NO_MKDTEMP = YesPlease
1045 - NO_MKSTEMPS = YesPlease
1046 - NO_REGEX = YesPlease
1047 - NO_FNMATCH_CASEFOLD = YesPlease
1048 - NO_MSGFMT_EXTENDED_OPTIONS = YesPlease
1049 - HAVE_DEV_TTY = YesPlease
1050 - ifeq ($(uname_R),5.6)
1051 - SOCKLEN_T = int
1052 - NO_HSTRERROR = YesPlease
1053 - NO_IPV6 = YesPlease
1054 - NO_SOCKADDR_STORAGE = YesPlease
1055 - NO_UNSETENV = YesPlease
1056 - NO_SETENV = YesPlease
1057 - NO_STRLCPY = YesPlease
1058 - NO_STRTOUMAX = YesPlease
1059 - GIT_TEST_CMP = cmp
1060 - endif
1061 - ifeq ($(uname_R),5.7)
1062 - NEEDS_RESOLV = YesPlease
1063 - NO_IPV6 = YesPlease
1064 - NO_SOCKADDR_STORAGE = YesPlease
1065 - NO_UNSETENV = YesPlease
1066 - NO_SETENV = YesPlease
1067 - NO_STRLCPY = YesPlease
1068 - NO_STRTOUMAX = YesPlease
1069 - GIT_TEST_CMP = cmp
1070 - endif
1071 - ifeq ($(uname_R),5.8)
1072 - NO_UNSETENV = YesPlease
1073 - NO_SETENV = YesPlease
1074 - NO_STRTOUMAX = YesPlease
1075 - GIT_TEST_CMP = cmp
1076 - endif
1077 - ifeq ($(uname_R),5.9)
1078 - NO_UNSETENV = YesPlease
1079 - NO_SETENV = YesPlease
1080 - NO_STRTOUMAX = YesPlease
1081 - GIT_TEST_CMP = cmp
1082 - endif
1083 - INSTALL = /usr/ucb/install
1084 - TAR = gtar
1085 - BASIC_CFLAGS += -D__EXTENSIONS__ -D__sun__ -DHAVE_ALLOCA_H
1086 -endif
1087 -ifeq ($(uname_O),Cygwin)
1088 - ifeq ($(shell expr "$(uname_R)" : '1\.[1-6]\.'),4)
1089 - NO_D_TYPE_IN_DIRENT = YesPlease
1090 - NO_D_INO_IN_DIRENT = YesPlease
1091 - NO_STRCASESTR = YesPlease
1092 - NO_MEMMEM = YesPlease
1093 - NO_MKSTEMPS = YesPlease
1094 - NO_SYMLINK_HEAD = YesPlease
1095 - NO_IPV6 = YesPlease
1096 - OLD_ICONV = UnfortunatelyYes
1097 - CYGWIN_V15_WIN32API = YesPlease
1098 - endif
1099 - NO_THREAD_SAFE_PREAD = YesPlease
1100 - NEEDS_LIBICONV = YesPlease
1101 - NO_FAST_WORKING_DIRECTORY = UnfortunatelyYes
1102 - NO_TRUSTABLE_FILEMODE = UnfortunatelyYes
1103 - NO_ST_BLOCKS_IN_STRUCT_STAT = YesPlease
1104 - # There are conflicting reports about this.
1105 - # On some boxes NO_MMAP is needed, and not so elsewhere.
1106 - # Try commenting this out if you suspect MMAP is more efficient
1107 - NO_MMAP = YesPlease
1108 - X = .exe
1109 - COMPAT_OBJS += compat/cygwin.o
1110 - UNRELIABLE_FSTAT = UnfortunatelyYes
1111 - SPARSE_FLAGS = -isystem /usr/include/w32api -Wno-one-bit-signed-bitfield
1112 -endif
1113 -ifeq ($(uname_S),FreeBSD)
1114 - NEEDS_LIBICONV = YesPlease
1115 - OLD_ICONV = YesPlease
1116 - NO_MEMMEM = YesPlease
1117 - BASIC_CFLAGS += -I/usr/local/include
1118 - BASIC_LDFLAGS += -L/usr/local/lib
1119 - DIR_HAS_BSD_GROUP_SEMANTICS = YesPlease
1120 - USE_ST_TIMESPEC = YesPlease
1121 - ifeq ($(shell expr "$(uname_R)" : '4\.'),2)
1122 - PTHREAD_LIBS = -pthread
1123 - NO_UINTMAX_T = YesPlease
1124 - NO_STRTOUMAX = YesPlease
1125 - endif
1126 - PYTHON_PATH = /usr/local/bin/python
1127 - HAVE_PATHS_H = YesPlease
1128 -endif
1129 -ifeq ($(uname_S),OpenBSD)
1130 - NO_STRCASESTR = YesPlease
1131 - NO_MEMMEM = YesPlease
1132 - USE_ST_TIMESPEC = YesPlease
1133 - NEEDS_LIBICONV = YesPlease
1134 - BASIC_CFLAGS += -I/usr/local/include
1135 - BASIC_LDFLAGS += -L/usr/local/lib
1136 - HAVE_PATHS_H = YesPlease
1137 -endif
1138 -ifeq ($(uname_S),NetBSD)
1139 - ifeq ($(shell expr "$(uname_R)" : '[01]\.'),2)
1140 - NEEDS_LIBICONV = YesPlease
1141 - endif
1142 - BASIC_CFLAGS += -I/usr/pkg/include
1143 - BASIC_LDFLAGS += -L/usr/pkg/lib $(CC_LD_DYNPATH)/usr/pkg/lib
1144 - USE_ST_TIMESPEC = YesPlease
1145 - NO_MKSTEMPS = YesPlease
1146 - HAVE_PATHS_H = YesPlease
1147 -endif
1148 -ifeq ($(uname_S),AIX)
1149 - DEFAULT_PAGER = more
1150 - NO_STRCASESTR = YesPlease
1151 - NO_MEMMEM = YesPlease
1152 - NO_MKDTEMP = YesPlease
1153 - NO_MKSTEMPS = YesPlease
1154 - NO_STRLCPY = YesPlease
1155 - NO_NSEC = YesPlease
1156 - FREAD_READS_DIRECTORIES = UnfortunatelyYes
1157 - INTERNAL_QSORT = UnfortunatelyYes
1158 - NEEDS_LIBICONV = YesPlease
1159 - BASIC_CFLAGS += -D_LARGE_FILES
1160 - ifeq ($(shell expr "$(uname_V)" : '[1234]'),1)
1161 - NO_PTHREADS = YesPlease
1162 - else
1163 - PTHREAD_LIBS = -lpthread
1164 - endif
1165 - ifeq ($(shell expr "$(uname_V).$(uname_R)" : '5\.1'),3)
1166 - INLINE = ''
1167 - endif
1168 - GIT_TEST_CMP = cmp
1169 -endif
1170 -ifeq ($(uname_S),GNU)
1171 - # GNU/Hurd
1172 - NO_STRLCPY = YesPlease
1173 - NO_MKSTEMPS = YesPlease
1174 - HAVE_PATHS_H = YesPlease
1175 - LIBC_CONTAINS_LIBINTL = YesPlease
1176 -endif
1177 -ifeq ($(uname_S),IRIX)
1178 - NO_SETENV = YesPlease
1179 - NO_UNSETENV = YesPlease
1180 - NO_STRCASESTR = YesPlease
1181 - NO_MEMMEM = YesPlease
1182 - NO_MKSTEMPS = YesPlease
1183 - NO_MKDTEMP = YesPlease
1184 - # When compiled with the MIPSpro 7.4.4m compiler, and without pthreads
1185 - # (i.e. NO_PTHREADS is set), and _with_ MMAP (i.e. NO_MMAP is not set),
1186 - # git dies with a segmentation fault when trying to access the first
1187 - # entry of a reflog. The conservative choice is made to always set
1188 - # NO_MMAP. If you suspect that your compiler is not affected by this
1189 - # issue, comment out the NO_MMAP statement.
1190 - NO_MMAP = YesPlease
1191 - NO_REGEX = YesPlease
1192 - NO_FNMATCH_CASEFOLD = YesPlease
1193 - SNPRINTF_RETURNS_BOGUS = YesPlease
1194 - SHELL_PATH = /usr/gnu/bin/bash
1195 - NEEDS_LIBGEN = YesPlease
1196 -endif
1197 -ifeq ($(uname_S),IRIX64)
1198 - NO_SETENV = YesPlease
1199 - NO_UNSETENV = YesPlease
1200 - NO_STRCASESTR = YesPlease
1201 - NO_MEMMEM = YesPlease
1202 - NO_MKSTEMPS = YesPlease
1203 - NO_MKDTEMP = YesPlease
1204 - # When compiled with the MIPSpro 7.4.4m compiler, and without pthreads
1205 - # (i.e. NO_PTHREADS is set), and _with_ MMAP (i.e. NO_MMAP is not set),
1206 - # git dies with a segmentation fault when trying to access the first
1207 - # entry of a reflog. The conservative choice is made to always set
1208 - # NO_MMAP. If you suspect that your compiler is not affected by this
1209 - # issue, comment out the NO_MMAP statement.
1210 - NO_MMAP = YesPlease
1211 - NO_REGEX = YesPlease
1212 - NO_FNMATCH_CASEFOLD = YesPlease
1213 - SNPRINTF_RETURNS_BOGUS = YesPlease
1214 - SHELL_PATH = /usr/gnu/bin/bash
1215 - NEEDS_LIBGEN = YesPlease
1216 -endif
1217 -ifeq ($(uname_S),HP-UX)
1218 - INLINE = __inline
1219 - NO_IPV6 = YesPlease
1220 - NO_SETENV = YesPlease
1221 - NO_STRCASESTR = YesPlease
1222 - NO_MEMMEM = YesPlease
1223 - NO_MKSTEMPS = YesPlease
1224 - NO_STRLCPY = YesPlease
1225 - NO_MKDTEMP = YesPlease
1226 - NO_UNSETENV = YesPlease
1227 - NO_HSTRERROR = YesPlease
1228 - NO_SYS_SELECT_H = YesPlease
1229 - NO_FNMATCH_CASEFOLD = YesPlease
1230 - SNPRINTF_RETURNS_BOGUS = YesPlease
1231 - NO_NSEC = YesPlease
1232 - ifeq ($(uname_R),B.11.00)
1233 - NO_INET_NTOP = YesPlease
1234 - NO_INET_PTON = YesPlease
1235 - endif
1236 - ifeq ($(uname_R),B.10.20)
1237 - # Override HP-UX 11.x setting:
1238 - INLINE =
1239 - SOCKLEN_T = size_t
1240 - NO_PREAD = YesPlease
1241 - NO_INET_NTOP = YesPlease
1242 - NO_INET_PTON = YesPlease
1243 - endif
1244 - GIT_TEST_CMP = cmp
1245 -endif
1246 -ifeq ($(uname_S),Windows)
1247 - GIT_VERSION := $(GIT_VERSION).MSVC
1248 - pathsep = ;
1249 - NO_PREAD = YesPlease
1250 - NEEDS_CRYPTO_WITH_SSL = YesPlease
1251 - NO_LIBGEN_H = YesPlease
1252 - NO_POLL = YesPlease
1253 - NO_SYMLINK_HEAD = YesPlease
1254 - NO_IPV6 = YesPlease
1255 - NO_UNIX_SOCKETS = YesPlease
1256 - NO_SETENV = YesPlease
1257 - NO_UNSETENV = YesPlease
1258 - NO_STRCASESTR = YesPlease
1259 - NO_STRLCPY = YesPlease
1260 - NO_STRTOK_R = YesPlease
1261 - NO_FNMATCH = YesPlease
1262 - NO_MEMMEM = YesPlease
1263 - # NEEDS_LIBICONV = YesPlease
1264 - NO_ICONV = YesPlease
1265 - NO_STRTOUMAX = YesPlease
1266 - NO_STRTOULL = YesPlease
1267 - NO_MKDTEMP = YesPlease
1268 - NO_MKSTEMPS = YesPlease
1269 - SNPRINTF_RETURNS_BOGUS = YesPlease
1270 - NO_SVN_TESTS = YesPlease
1271 - NO_PERL_MAKEMAKER = YesPlease
1272 - RUNTIME_PREFIX = YesPlease
1273 - NO_ST_BLOCKS_IN_STRUCT_STAT = YesPlease
1274 - NO_NSEC = YesPlease
1275 - USE_WIN32_MMAP = YesPlease
1276 - # USE_NED_ALLOCATOR = YesPlease
1277 - UNRELIABLE_FSTAT = UnfortunatelyYes
1278 - OBJECT_CREATION_USES_RENAMES = UnfortunatelyNeedsTo
1279 - NO_REGEX = YesPlease
1280 - NO_CURL = YesPlease
1281 - NO_PYTHON = YesPlease
1282 - BLK_SHA1 = YesPlease
1283 - NO_POSIX_GOODIES = UnfortunatelyYes
1284 - NATIVE_CRLF = YesPlease
1285 - DEFAULT_HELP_FORMAT = html
1286 -
1287 - CC = compat/vcbuild/scripts/clink.pl
1288 - AR = compat/vcbuild/scripts/lib.pl
1289 - CFLAGS =
1290 - BASIC_CFLAGS = -nologo -I. -I../zlib -Icompat/vcbuild -Icompat/vcbuild/include -DWIN32 -D_CONSOLE -DHAVE_STRING_H -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE
1291 - COMPAT_OBJS = compat/msvc.o compat/winansi.o \
1292 - compat/win32/pthread.o compat/win32/syslog.o \
1293 - compat/win32/dirent.o
1294 - COMPAT_CFLAGS = -D__USE_MINGW_ACCESS -DNOGDI -DHAVE_STRING_H -DHAVE_ALLOCA_H -Icompat -Icompat/regex -Icompat/win32 -DSTRIP_EXTENSION=\".exe\"
1295 - BASIC_LDFLAGS = -IGNORE:4217 -IGNORE:4049 -NOLOGO -SUBSYSTEM:CONSOLE -NODEFAULTLIB:MSVCRT.lib
1296 - EXTLIBS = user32.lib advapi32.lib shell32.lib wininet.lib ws2_32.lib
1297 - PTHREAD_LIBS =
1298 - lib =
1299 -ifndef DEBUG
1300 - BASIC_CFLAGS += -GL -Os -MT
1301 - BASIC_LDFLAGS += -LTCG
1302 - AR += -LTCG
1303 -else
1304 - BASIC_CFLAGS += -Zi -MTd
1305 -endif
1306 - X = .exe
1307 -endif
1308 -ifeq ($(uname_S),Interix)
1309 - NO_INITGROUPS = YesPlease
1310 - NO_IPV6 = YesPlease
1311 - NO_MEMMEM = YesPlease
1312 - NO_MKDTEMP = YesPlease
1313 - NO_STRTOUMAX = YesPlease
1314 - NO_NSEC = YesPlease
1315 - NO_MKSTEMPS = YesPlease
1316 - ifeq ($(uname_R),3.5)
1317 - NO_INET_NTOP = YesPlease
1318 - NO_INET_PTON = YesPlease
1319 - NO_SOCKADDR_STORAGE = YesPlease
1320 - NO_FNMATCH_CASEFOLD = YesPlease
1321 - endif
1322 - ifeq ($(uname_R),5.2)
1323 - NO_INET_NTOP = YesPlease
1324 - NO_INET_PTON = YesPlease
1325 - NO_SOCKADDR_STORAGE = YesPlease
1326 - NO_FNMATCH_CASEFOLD = YesPlease
1327 - endif
1328 -endif
1329 -ifeq ($(uname_S),Minix)
1330 - NO_IPV6 = YesPlease
1331 - NO_ST_BLOCKS_IN_STRUCT_STAT = YesPlease
1332 - NO_NSEC = YesPlease
1333 - NEEDS_LIBGEN =
1334 - NEEDS_CRYPTO_WITH_SSL = YesPlease
1335 - NEEDS_IDN_WITH_CURL = YesPlease
1336 - NEEDS_SSL_WITH_CURL = YesPlease
1337 - NEEDS_RESOLV =
1338 - NO_HSTRERROR = YesPlease
1339 - NO_MMAP = YesPlease
1340 - NO_CURL =
1341 - NO_EXPAT =
1342 -endif
1343 -ifeq ($(uname_S),NONSTOP_KERNEL)
1344 - # Needs some C99 features, "inline" is just one of them.
1345 - # INLINE='' would just replace one set of warnings with another and
1346 - # still not compile in c89 mode, due to non-const array initializations.
1347 - CC = cc -c99
1348 - # Disable all optimization, seems to result in bad code, with -O or -O2
1349 - # or even -O1 (default), /usr/local/libexec/git-core/git-pack-objects
1350 - # abends on "git push". Needs more investigation.
1351 - CFLAGS = -g -O0
1352 - # We'd want it to be here.
1353 - prefix = /usr/local
1354 - # Our's are in ${prefix}/bin (perl might also be in /usr/bin/perl).
1355 - PERL_PATH = ${prefix}/bin/perl
1356 - PYTHON_PATH = ${prefix}/bin/python
1357 -
1358 - # As detected by './configure'.
1359 - # Missdetected, hence commented out, see below.
1360 - #NO_CURL = YesPlease
1361 - # Added manually, see above.
1362 - NEEDS_SSL_WITH_CURL = YesPlease
1363 - HAVE_LIBCHARSET_H = YesPlease
1364 - HAVE_STRINGS_H = YesPlease
1365 - NEEDS_LIBICONV = YesPlease
1366 - NEEDS_LIBINTL_BEFORE_LIBICONV = YesPlease
1367 - NO_SYS_SELECT_H = UnfortunatelyYes
1368 - NO_D_TYPE_IN_DIRENT = YesPlease
1369 - NO_HSTRERROR = YesPlease
1370 - NO_STRCASESTR = YesPlease
1371 - NO_FNMATCH_CASEFOLD = YesPlease
1372 - NO_MEMMEM = YesPlease
1373 - NO_STRLCPY = YesPlease
1374 - NO_SETENV = YesPlease
1375 - NO_UNSETENV = YesPlease
1376 - NO_MKDTEMP = YesPlease
1377 - NO_MKSTEMPS = YesPlease
1378 - # Currently libiconv-1.9.1.
1379 - OLD_ICONV = UnfortunatelyYes
1380 - NO_REGEX = YesPlease
1381 - NO_PTHREADS = UnfortunatelyYes
1382 -
1383 - # Not detected (nor checked for) by './configure'.
1384 - # We don't have SA_RESTART on NonStop, unfortunalety.
1385 - COMPAT_CFLAGS += -DSA_RESTART=0
1386 - # Apparently needed in compat/fnmatch/fnmatch.c.
1387 - COMPAT_CFLAGS += -DHAVE_STRING_H=1
1388 - NO_ST_BLOCKS_IN_STRUCT_STAT = YesPlease
1389 - NO_NSEC = YesPlease
1390 - NO_PREAD = YesPlease
1391 - NO_MMAP = YesPlease
1392 - NO_POLL = YesPlease
1393 - NO_INTPTR_T = UnfortunatelyYes
1394 - # Bug report 10-120822-4477 submitted to HP NonStop development.
1395 - MKDIR_WO_TRAILING_SLASH = YesPlease
1396 - # RFE 10-120912-4693 submitted to HP NonStop development.
1397 - NO_SETITIMER = UnfortunatelyYes
1398 - SANE_TOOL_PATH = /usr/coreutils/bin:/usr/local/bin
1399 - SHELL_PATH = /usr/local/bin/bash
1400 - # as of H06.25/J06.14, we might better use this
1401 - #SHELL_PATH = /usr/coreutils/bin/bash
1402 -endif
1403 -ifneq (,$(findstring MINGW,$(uname_S)))
1404 - pathsep = ;
1405 - NO_PREAD = YesPlease
1406 - NEEDS_CRYPTO_WITH_SSL = YesPlease
1407 - NO_LIBGEN_H = YesPlease
1408 - NO_POLL = YesPlease
1409 - NO_SYMLINK_HEAD = YesPlease
1410 - NO_UNIX_SOCKETS = YesPlease
1411 - NO_SETENV = YesPlease
1412 - NO_UNSETENV = YesPlease
1413 - NO_STRCASESTR = YesPlease
1414 - NO_STRLCPY = YesPlease
1415 - NO_STRTOK_R = YesPlease
1416 - NO_FNMATCH = YesPlease
1417 - NO_MEMMEM = YesPlease
1418 - NEEDS_LIBICONV = YesPlease
1419 - OLD_ICONV = YesPlease
1420 - NO_STRTOUMAX = YesPlease
1421 - NO_MKDTEMP = YesPlease
1422 - NO_MKSTEMPS = YesPlease
1423 - NO_SVN_TESTS = YesPlease
1424 - NO_PERL_MAKEMAKER = YesPlease
1425 - RUNTIME_PREFIX = YesPlease
1426 - NO_ST_BLOCKS_IN_STRUCT_STAT = YesPlease
1427 - NO_NSEC = YesPlease
1428 - USE_WIN32_MMAP = YesPlease
1429 - USE_NED_ALLOCATOR = YesPlease
1430 - UNRELIABLE_FSTAT = UnfortunatelyYes
1431 - OBJECT_CREATION_USES_RENAMES = UnfortunatelyNeedsTo
1432 - NO_REGEX = YesPlease
1433 - NO_PYTHON = YesPlease
1434 - BLK_SHA1 = YesPlease
1435 - ETAGS_TARGET = ETAGS
1436 - NO_INET_PTON = YesPlease
1437 - NO_INET_NTOP = YesPlease
1438 - NO_POSIX_GOODIES = UnfortunatelyYes
1439 - COMPAT_CFLAGS += -D__USE_MINGW_ACCESS -DNOGDI -Icompat -Icompat/win32
1440 - COMPAT_CFLAGS += -DSTRIP_EXTENSION=\".exe\"
1441 - COMPAT_OBJS += compat/mingw.o compat/winansi.o \
1442 - compat/win32/pthread.o compat/win32/syslog.o \
1443 - compat/win32/dirent.o
1444 - EXTLIBS += -lws2_32
1445 - PTHREAD_LIBS =
1446 - X = .exe
1447 - SPARSE_FLAGS = -Wno-one-bit-signed-bitfield
1448 -ifneq (,$(wildcard ../THIS_IS_MSYSGIT))
1449 - htmldir = doc/git/html/
1450 - prefix =
1451 - INSTALL = /bin/install
1452 - EXTLIBS += /mingw/lib/libz.a
1453 - NO_R_TO_GCC_LINKER = YesPlease
1454 - INTERNAL_QSORT = YesPlease
1455 - HAVE_LIBCHARSET_H = YesPlease
1456 -else
1457 - NO_CURL = YesPlease
1458 -endif
1459 -endif
1460 -ifeq ($(uname_S),QNX)
1461 - COMPAT_CFLAGS += -DSA_RESTART=0
1462 - HAVE_STRINGS_H = YesPlease
1463 - NEEDS_SOCKET = YesPlease
1464 - NO_FNMATCH_CASEFOLD = YesPlease
1465 - NO_GETPAGESIZE = YesPlease
1466 - NO_ICONV = YesPlease
1467 - NO_MEMMEM = YesPlease
1468 - NO_MKDTEMP = YesPlease
1469 - NO_MKSTEMPS = YesPlease
1470 - NO_NSEC = YesPlease
1471 - NO_PTHREADS = YesPlease
1472 - NO_R_TO_GCC_LINKER = YesPlease
1473 - NO_STRCASESTR = YesPlease
1474 - NO_STRLCPY = YesPlease
1475 -endif
1476 -
935 +include config.mak.uname
936 -include config.mak.autogen
937 -include config.mak
938
config.mak.uname new
+539
@@ -0,0 +1,539 @@
1 +# Platform specific Makefile tweaks based on uname detection
2 +
3 +uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo not')
4 +uname_M := $(shell sh -c 'uname -m 2>/dev/null || echo not')
5 +uname_O := $(shell sh -c 'uname -o 2>/dev/null || echo not')
6 +uname_R := $(shell sh -c 'uname -r 2>/dev/null || echo not')
7 +uname_P := $(shell sh -c 'uname -p 2>/dev/null || echo not')
8 +uname_V := $(shell sh -c 'uname -v 2>/dev/null || echo not')
9 +
10 +ifdef MSVC
11 + # avoid the MingW and Cygwin configuration sections
12 + uname_S := Windows
13 + uname_O := Windows
14 +endif
15 +
16 +# We choose to avoid "if .. else if .. else .. endif endif"
17 +# because maintaining the nesting to match is a pain. If
18 +# we had "elif" things would have been much nicer...
19 +
20 +ifeq ($(uname_M),x86_64)
21 + XDL_FAST_HASH = YesPlease
22 +endif
23 +ifeq ($(uname_S),OSF1)
24 + # Need this for u_short definitions et al
25 + BASIC_CFLAGS += -D_OSF_SOURCE
26 + SOCKLEN_T = int
27 + NO_STRTOULL = YesPlease
28 + NO_NSEC = YesPlease
29 +endif
30 +ifeq ($(uname_S),Linux)
31 + NO_STRLCPY = YesPlease
32 + NO_MKSTEMPS = YesPlease
33 + HAVE_PATHS_H = YesPlease
34 + LIBC_CONTAINS_LIBINTL = YesPlease
35 + HAVE_DEV_TTY = YesPlease
36 +endif
37 +ifeq ($(uname_S),GNU/kFreeBSD)
38 + NO_STRLCPY = YesPlease
39 + NO_MKSTEMPS = YesPlease
40 + HAVE_PATHS_H = YesPlease
41 + DIR_HAS_BSD_GROUP_SEMANTICS = YesPlease
42 + LIBC_CONTAINS_LIBINTL = YesPlease
43 +endif
44 +ifeq ($(uname_S),UnixWare)
45 + CC = cc
46 + NEEDS_SOCKET = YesPlease
47 + NEEDS_NSL = YesPlease
48 + NEEDS_SSL_WITH_CRYPTO = YesPlease
49 + NEEDS_LIBICONV = YesPlease
50 + SHELL_PATH = /usr/local/bin/bash
51 + NO_IPV6 = YesPlease
52 + NO_HSTRERROR = YesPlease
53 + NO_MKSTEMPS = YesPlease
54 + BASIC_CFLAGS += -Kthread
55 + BASIC_CFLAGS += -I/usr/local/include
56 + BASIC_LDFLAGS += -L/usr/local/lib
57 + INSTALL = ginstall
58 + TAR = gtar
59 + NO_STRCASESTR = YesPlease
60 + NO_MEMMEM = YesPlease
61 +endif
62 +ifeq ($(uname_S),SCO_SV)
63 + ifeq ($(uname_R),3.2)
64 + CFLAGS = -O2
65 + endif
66 + ifeq ($(uname_R),5)
67 + CC = cc
68 + BASIC_CFLAGS += -Kthread
69 + endif
70 + NEEDS_SOCKET = YesPlease
71 + NEEDS_NSL = YesPlease
72 + NEEDS_SSL_WITH_CRYPTO = YesPlease
73 + NEEDS_LIBICONV = YesPlease
74 + SHELL_PATH = /usr/bin/bash
75 + NO_IPV6 = YesPlease
76 + NO_HSTRERROR = YesPlease
77 + NO_MKSTEMPS = YesPlease
78 + BASIC_CFLAGS += -I/usr/local/include
79 + BASIC_LDFLAGS += -L/usr/local/lib
80 + NO_STRCASESTR = YesPlease
81 + NO_MEMMEM = YesPlease
82 + INSTALL = ginstall
83 + TAR = gtar
84 +endif
85 +ifeq ($(uname_S),Darwin)
86 + NEEDS_CRYPTO_WITH_SSL = YesPlease
87 + NEEDS_SSL_WITH_CRYPTO = YesPlease
88 + NEEDS_LIBICONV = YesPlease
89 + ifeq ($(shell expr "$(uname_R)" : '[15678]\.'),2)
90 + OLD_ICONV = UnfortunatelyYes
91 + endif
92 + ifeq ($(shell expr "$(uname_R)" : '[15]\.'),2)
93 + NO_STRLCPY = YesPlease
94 + endif
95 + NO_MEMMEM = YesPlease
96 + USE_ST_TIMESPEC = YesPlease
97 + HAVE_DEV_TTY = YesPlease
98 + COMPAT_OBJS += compat/precompose_utf8.o
99 + BASIC_CFLAGS += -DPRECOMPOSE_UNICODE
100 +endif
101 +ifeq ($(uname_S),SunOS)
102 + NEEDS_SOCKET = YesPlease
103 + NEEDS_NSL = YesPlease
104 + SHELL_PATH = /bin/bash
105 + SANE_TOOL_PATH = /usr/xpg6/bin:/usr/xpg4/bin
106 + NO_STRCASESTR = YesPlease
107 + NO_MEMMEM = YesPlease
108 + NO_MKDTEMP = YesPlease
109 + NO_MKSTEMPS = YesPlease
110 + NO_REGEX = YesPlease
111 + NO_FNMATCH_CASEFOLD = YesPlease
112 + NO_MSGFMT_EXTENDED_OPTIONS = YesPlease
113 + HAVE_DEV_TTY = YesPlease
114 + ifeq ($(uname_R),5.6)
115 + SOCKLEN_T = int
116 + NO_HSTRERROR = YesPlease
117 + NO_IPV6 = YesPlease
118 + NO_SOCKADDR_STORAGE = YesPlease
119 + NO_UNSETENV = YesPlease
120 + NO_SETENV = YesPlease
121 + NO_STRLCPY = YesPlease
122 + NO_STRTOUMAX = YesPlease
123 + GIT_TEST_CMP = cmp
124 + endif
125 + ifeq ($(uname_R),5.7)
126 + NEEDS_RESOLV = YesPlease
127 + NO_IPV6 = YesPlease
128 + NO_SOCKADDR_STORAGE = YesPlease
129 + NO_UNSETENV = YesPlease
130 + NO_SETENV = YesPlease
131 + NO_STRLCPY = YesPlease
132 + NO_STRTOUMAX = YesPlease
133 + GIT_TEST_CMP = cmp
134 + endif
135 + ifeq ($(uname_R),5.8)
136 + NO_UNSETENV = YesPlease
137 + NO_SETENV = YesPlease
138 + NO_STRTOUMAX = YesPlease
139 + GIT_TEST_CMP = cmp
140 + endif
141 + ifeq ($(uname_R),5.9)
142 + NO_UNSETENV = YesPlease
143 + NO_SETENV = YesPlease
144 + NO_STRTOUMAX = YesPlease
145 + GIT_TEST_CMP = cmp
146 + endif
147 + INSTALL = /usr/ucb/install
148 + TAR = gtar
149 + BASIC_CFLAGS += -D__EXTENSIONS__ -D__sun__ -DHAVE_ALLOCA_H
150 +endif
151 +ifeq ($(uname_O),Cygwin)
152 + ifeq ($(shell expr "$(uname_R)" : '1\.[1-6]\.'),4)
153 + NO_D_TYPE_IN_DIRENT = YesPlease
154 + NO_D_INO_IN_DIRENT = YesPlease
155 + NO_STRCASESTR = YesPlease
156 + NO_MEMMEM = YesPlease
157 + NO_MKSTEMPS = YesPlease
158 + NO_SYMLINK_HEAD = YesPlease
159 + NO_IPV6 = YesPlease
160 + OLD_ICONV = UnfortunatelyYes
161 + CYGWIN_V15_WIN32API = YesPlease
162 + endif
163 + NO_THREAD_SAFE_PREAD = YesPlease
164 + NEEDS_LIBICONV = YesPlease
165 + NO_FAST_WORKING_DIRECTORY = UnfortunatelyYes
166 + NO_TRUSTABLE_FILEMODE = UnfortunatelyYes
167 + NO_ST_BLOCKS_IN_STRUCT_STAT = YesPlease
168 + # There are conflicting reports about this.
169 + # On some boxes NO_MMAP is needed, and not so elsewhere.
170 + # Try commenting this out if you suspect MMAP is more efficient
171 + NO_MMAP = YesPlease
172 + X = .exe
173 + COMPAT_OBJS += compat/cygwin.o
174 + UNRELIABLE_FSTAT = UnfortunatelyYes
175 + SPARSE_FLAGS = -isystem /usr/include/w32api -Wno-one-bit-signed-bitfield
176 +endif
177 +ifeq ($(uname_S),FreeBSD)
178 + NEEDS_LIBICONV = YesPlease
179 + OLD_ICONV = YesPlease
180 + NO_MEMMEM = YesPlease
181 + BASIC_CFLAGS += -I/usr/local/include
182 + BASIC_LDFLAGS += -L/usr/local/lib
183 + DIR_HAS_BSD_GROUP_SEMANTICS = YesPlease
184 + USE_ST_TIMESPEC = YesPlease
185 + ifeq ($(shell expr "$(uname_R)" : '4\.'),2)
186 + PTHREAD_LIBS = -pthread
187 + NO_UINTMAX_T = YesPlease
188 + NO_STRTOUMAX = YesPlease
189 + endif
190 + PYTHON_PATH = /usr/local/bin/python
191 + HAVE_PATHS_H = YesPlease
192 +endif
193 +ifeq ($(uname_S),OpenBSD)
194 + NO_STRCASESTR = YesPlease
195 + NO_MEMMEM = YesPlease
196 + USE_ST_TIMESPEC = YesPlease
197 + NEEDS_LIBICONV = YesPlease
198 + BASIC_CFLAGS += -I/usr/local/include
199 + BASIC_LDFLAGS += -L/usr/local/lib
200 + HAVE_PATHS_H = YesPlease
201 +endif
202 +ifeq ($(uname_S),NetBSD)
203 + ifeq ($(shell expr "$(uname_R)" : '[01]\.'),2)
204 + NEEDS_LIBICONV = YesPlease
205 + endif
206 + BASIC_CFLAGS += -I/usr/pkg/include
207 + BASIC_LDFLAGS += -L/usr/pkg/lib $(CC_LD_DYNPATH)/usr/pkg/lib
208 + USE_ST_TIMESPEC = YesPlease
209 + NO_MKSTEMPS = YesPlease
210 + HAVE_PATHS_H = YesPlease
211 +endif
212 +ifeq ($(uname_S),AIX)
213 + DEFAULT_PAGER = more
214 + NO_STRCASESTR = YesPlease
215 + NO_MEMMEM = YesPlease
216 + NO_MKDTEMP = YesPlease
217 + NO_MKSTEMPS = YesPlease
218 + NO_STRLCPY = YesPlease
219 + NO_NSEC = YesPlease
220 + FREAD_READS_DIRECTORIES = UnfortunatelyYes
221 + INTERNAL_QSORT = UnfortunatelyYes
222 + NEEDS_LIBICONV = YesPlease
223 + BASIC_CFLAGS += -D_LARGE_FILES
224 + ifeq ($(shell expr "$(uname_V)" : '[1234]'),1)
225 + NO_PTHREADS = YesPlease
226 + else
227 + PTHREAD_LIBS = -lpthread
228 + endif
229 + ifeq ($(shell expr "$(uname_V).$(uname_R)" : '5\.1'),3)
230 + INLINE = ''
231 + endif
232 + GIT_TEST_CMP = cmp
233 +endif
234 +ifeq ($(uname_S),GNU)
235 + # GNU/Hurd
236 + NO_STRLCPY = YesPlease
237 + NO_MKSTEMPS = YesPlease
238 + HAVE_PATHS_H = YesPlease
239 + LIBC_CONTAINS_LIBINTL = YesPlease
240 +endif
241 +ifeq ($(uname_S),IRIX)
242 + NO_SETENV = YesPlease
243 + NO_UNSETENV = YesPlease
244 + NO_STRCASESTR = YesPlease
245 + NO_MEMMEM = YesPlease
246 + NO_MKSTEMPS = YesPlease
247 + NO_MKDTEMP = YesPlease
248 + # When compiled with the MIPSpro 7.4.4m compiler, and without pthreads
249 + # (i.e. NO_PTHREADS is set), and _with_ MMAP (i.e. NO_MMAP is not set),
250 + # git dies with a segmentation fault when trying to access the first
251 + # entry of a reflog. The conservative choice is made to always set
252 + # NO_MMAP. If you suspect that your compiler is not affected by this
253 + # issue, comment out the NO_MMAP statement.
254 + NO_MMAP = YesPlease
255 + NO_REGEX = YesPlease
256 + NO_FNMATCH_CASEFOLD = YesPlease
257 + SNPRINTF_RETURNS_BOGUS = YesPlease
258 + SHELL_PATH = /usr/gnu/bin/bash
259 + NEEDS_LIBGEN = YesPlease
260 +endif
261 +ifeq ($(uname_S),IRIX64)
262 + NO_SETENV = YesPlease
263 + NO_UNSETENV = YesPlease
264 + NO_STRCASESTR = YesPlease
265 + NO_MEMMEM = YesPlease
266 + NO_MKSTEMPS = YesPlease
267 + NO_MKDTEMP = YesPlease
268 + # When compiled with the MIPSpro 7.4.4m compiler, and without pthreads
269 + # (i.e. NO_PTHREADS is set), and _with_ MMAP (i.e. NO_MMAP is not set),
270 + # git dies with a segmentation fault when trying to access the first
271 + # entry of a reflog. The conservative choice is made to always set
272 + # NO_MMAP. If you suspect that your compiler is not affected by this
273 + # issue, comment out the NO_MMAP statement.
274 + NO_MMAP = YesPlease
275 + NO_REGEX = YesPlease
276 + NO_FNMATCH_CASEFOLD = YesPlease
277 + SNPRINTF_RETURNS_BOGUS = YesPlease
278 + SHELL_PATH = /usr/gnu/bin/bash
279 + NEEDS_LIBGEN = YesPlease
280 +endif
281 +ifeq ($(uname_S),HP-UX)
282 + INLINE = __inline
283 + NO_IPV6 = YesPlease
284 + NO_SETENV = YesPlease
285 + NO_STRCASESTR = YesPlease
286 + NO_MEMMEM = YesPlease
287 + NO_MKSTEMPS = YesPlease
288 + NO_STRLCPY = YesPlease
289 + NO_MKDTEMP = YesPlease
290 + NO_UNSETENV = YesPlease
291 + NO_HSTRERROR = YesPlease
292 + NO_SYS_SELECT_H = YesPlease
293 + NO_FNMATCH_CASEFOLD = YesPlease
294 + SNPRINTF_RETURNS_BOGUS = YesPlease
295 + NO_NSEC = YesPlease
296 + ifeq ($(uname_R),B.11.00)
297 + NO_INET_NTOP = YesPlease
298 + NO_INET_PTON = YesPlease
299 + endif
300 + ifeq ($(uname_R),B.10.20)
301 + # Override HP-UX 11.x setting:
302 + INLINE =
303 + SOCKLEN_T = size_t
304 + NO_PREAD = YesPlease
305 + NO_INET_NTOP = YesPlease
306 + NO_INET_PTON = YesPlease
307 + endif
308 + GIT_TEST_CMP = cmp
309 +endif
310 +ifeq ($(uname_S),Windows)
311 + GIT_VERSION := $(GIT_VERSION).MSVC
312 + pathsep = ;
313 + NO_PREAD = YesPlease
314 + NEEDS_CRYPTO_WITH_SSL = YesPlease
315 + NO_LIBGEN_H = YesPlease
316 + NO_POLL = YesPlease
317 + NO_SYMLINK_HEAD = YesPlease
318 + NO_IPV6 = YesPlease
319 + NO_UNIX_SOCKETS = YesPlease
320 + NO_SETENV = YesPlease
321 + NO_UNSETENV = YesPlease
322 + NO_STRCASESTR = YesPlease
323 + NO_STRLCPY = YesPlease
324 + NO_STRTOK_R = YesPlease
325 + NO_FNMATCH = YesPlease
326 + NO_MEMMEM = YesPlease
327 + # NEEDS_LIBICONV = YesPlease
328 + NO_ICONV = YesPlease
329 + NO_STRTOUMAX = YesPlease
330 + NO_STRTOULL = YesPlease
331 + NO_MKDTEMP = YesPlease
332 + NO_MKSTEMPS = YesPlease
333 + SNPRINTF_RETURNS_BOGUS = YesPlease
334 + NO_SVN_TESTS = YesPlease
335 + NO_PERL_MAKEMAKER = YesPlease
336 + RUNTIME_PREFIX = YesPlease
337 + NO_ST_BLOCKS_IN_STRUCT_STAT = YesPlease
338 + NO_NSEC = YesPlease
339 + USE_WIN32_MMAP = YesPlease
340 + # USE_NED_ALLOCATOR = YesPlease
341 + UNRELIABLE_FSTAT = UnfortunatelyYes
342 + OBJECT_CREATION_USES_RENAMES = UnfortunatelyNeedsTo
343 + NO_REGEX = YesPlease
344 + NO_CURL = YesPlease
345 + NO_PYTHON = YesPlease
346 + BLK_SHA1 = YesPlease
347 + NO_POSIX_GOODIES = UnfortunatelyYes
348 + NATIVE_CRLF = YesPlease
349 + DEFAULT_HELP_FORMAT = html
350 +
351 + CC = compat/vcbuild/scripts/clink.pl
352 + AR = compat/vcbuild/scripts/lib.pl
353 + CFLAGS =
354 + BASIC_CFLAGS = -nologo -I. -I../zlib -Icompat/vcbuild -Icompat/vcbuild/include -DWIN32 -D_CONSOLE -DHAVE_STRING_H -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE
355 + COMPAT_OBJS = compat/msvc.o compat/winansi.o \
356 + compat/win32/pthread.o compat/win32/syslog.o \
357 + compat/win32/dirent.o
358 + COMPAT_CFLAGS = -D__USE_MINGW_ACCESS -DNOGDI -DHAVE_STRING_H -DHAVE_ALLOCA_H -Icompat -Icompat/regex -Icompat/win32 -DSTRIP_EXTENSION=\".exe\"
359 + BASIC_LDFLAGS = -IGNORE:4217 -IGNORE:4049 -NOLOGO -SUBSYSTEM:CONSOLE -NODEFAULTLIB:MSVCRT.lib
360 + EXTLIBS = user32.lib advapi32.lib shell32.lib wininet.lib ws2_32.lib
361 + PTHREAD_LIBS =
362 + lib =
363 +ifndef DEBUG
364 + BASIC_CFLAGS += -GL -Os -MT
365 + BASIC_LDFLAGS += -LTCG
366 + AR += -LTCG
367 +else
368 + BASIC_CFLAGS += -Zi -MTd
369 +endif
370 + X = .exe
371 +endif
372 +ifeq ($(uname_S),Interix)
373 + NO_INITGROUPS = YesPlease
374 + NO_IPV6 = YesPlease
375 + NO_MEMMEM = YesPlease
376 + NO_MKDTEMP = YesPlease
377 + NO_STRTOUMAX = YesPlease
378 + NO_NSEC = YesPlease
379 + NO_MKSTEMPS = YesPlease
380 + ifeq ($(uname_R),3.5)
381 + NO_INET_NTOP = YesPlease
382 + NO_INET_PTON = YesPlease
383 + NO_SOCKADDR_STORAGE = YesPlease
384 + NO_FNMATCH_CASEFOLD = YesPlease
385 + endif
386 + ifeq ($(uname_R),5.2)
387 + NO_INET_NTOP = YesPlease
388 + NO_INET_PTON = YesPlease
389 + NO_SOCKADDR_STORAGE = YesPlease
390 + NO_FNMATCH_CASEFOLD = YesPlease
391 + endif
392 +endif
393 +ifeq ($(uname_S),Minix)
394 + NO_IPV6 = YesPlease
395 + NO_ST_BLOCKS_IN_STRUCT_STAT = YesPlease
396 + NO_NSEC = YesPlease
397 + NEEDS_LIBGEN =
398 + NEEDS_CRYPTO_WITH_SSL = YesPlease
399 + NEEDS_IDN_WITH_CURL = YesPlease
400 + NEEDS_SSL_WITH_CURL = YesPlease
401 + NEEDS_RESOLV =
402 + NO_HSTRERROR = YesPlease
403 + NO_MMAP = YesPlease
404 + NO_CURL =
405 + NO_EXPAT =
406 +endif
407 +ifeq ($(uname_S),NONSTOP_KERNEL)
408 + # Needs some C99 features, "inline" is just one of them.
409 + # INLINE='' would just replace one set of warnings with another and
410 + # still not compile in c89 mode, due to non-const array initializations.
411 + CC = cc -c99
412 + # Disable all optimization, seems to result in bad code, with -O or -O2
413 + # or even -O1 (default), /usr/local/libexec/git-core/git-pack-objects
414 + # abends on "git push". Needs more investigation.
415 + CFLAGS = -g -O0
416 + # We'd want it to be here.
417 + prefix = /usr/local
418 + # Our's are in ${prefix}/bin (perl might also be in /usr/bin/perl).
419 + PERL_PATH = ${prefix}/bin/perl
420 + PYTHON_PATH = ${prefix}/bin/python
421 +
422 + # As detected by './configure'.
423 + # Missdetected, hence commented out, see below.
424 + #NO_CURL = YesPlease
425 + # Added manually, see above.
426 + NEEDS_SSL_WITH_CURL = YesPlease
427 + HAVE_LIBCHARSET_H = YesPlease
428 + HAVE_STRINGS_H = YesPlease
429 + NEEDS_LIBICONV = YesPlease
430 + NEEDS_LIBINTL_BEFORE_LIBICONV = YesPlease
431 + NO_SYS_SELECT_H = UnfortunatelyYes
432 + NO_D_TYPE_IN_DIRENT = YesPlease
433 + NO_HSTRERROR = YesPlease
434 + NO_STRCASESTR = YesPlease
435 + NO_FNMATCH_CASEFOLD = YesPlease
436 + NO_MEMMEM = YesPlease
437 + NO_STRLCPY = YesPlease
438 + NO_SETENV = YesPlease
439 + NO_UNSETENV = YesPlease
440 + NO_MKDTEMP = YesPlease
441 + NO_MKSTEMPS = YesPlease
442 + # Currently libiconv-1.9.1.
443 + OLD_ICONV = UnfortunatelyYes
444 + NO_REGEX = YesPlease
445 + NO_PTHREADS = UnfortunatelyYes
446 +
447 + # Not detected (nor checked for) by './configure'.
448 + # We don't have SA_RESTART on NonStop, unfortunalety.
449 + COMPAT_CFLAGS += -DSA_RESTART=0
450 + # Apparently needed in compat/fnmatch/fnmatch.c.
451 + COMPAT_CFLAGS += -DHAVE_STRING_H=1
452 + NO_ST_BLOCKS_IN_STRUCT_STAT = YesPlease
453 + NO_NSEC = YesPlease
454 + NO_PREAD = YesPlease
455 + NO_MMAP = YesPlease
456 + NO_POLL = YesPlease
457 + NO_INTPTR_T = UnfortunatelyYes
458 + # Bug report 10-120822-4477 submitted to HP NonStop development.
459 + MKDIR_WO_TRAILING_SLASH = YesPlease
460 + # RFE 10-120912-4693 submitted to HP NonStop development.
461 + NO_SETITIMER = UnfortunatelyYes
462 + SANE_TOOL_PATH = /usr/coreutils/bin:/usr/local/bin
463 + SHELL_PATH = /usr/local/bin/bash
464 + # as of H06.25/J06.14, we might better use this
465 + #SHELL_PATH = /usr/coreutils/bin/bash
466 +endif
467 +ifneq (,$(findstring MINGW,$(uname_S)))
468 + pathsep = ;
469 + NO_PREAD = YesPlease
470 + NEEDS_CRYPTO_WITH_SSL = YesPlease
471 + NO_LIBGEN_H = YesPlease
472 + NO_POLL = YesPlease
473 + NO_SYMLINK_HEAD = YesPlease
474 + NO_UNIX_SOCKETS = YesPlease
475 + NO_SETENV = YesPlease
476 + NO_UNSETENV = YesPlease
477 + NO_STRCASESTR = YesPlease
478 + NO_STRLCPY = YesPlease
479 + NO_STRTOK_R = YesPlease
480 + NO_FNMATCH = YesPlease
481 + NO_MEMMEM = YesPlease
482 + NEEDS_LIBICONV = YesPlease
483 + OLD_ICONV = YesPlease
484 + NO_STRTOUMAX = YesPlease
485 + NO_MKDTEMP = YesPlease
486 + NO_MKSTEMPS = YesPlease
487 + NO_SVN_TESTS = YesPlease
488 + NO_PERL_MAKEMAKER = YesPlease
489 + RUNTIME_PREFIX = YesPlease
490 + NO_ST_BLOCKS_IN_STRUCT_STAT = YesPlease
491 + NO_NSEC = YesPlease
492 + USE_WIN32_MMAP = YesPlease
493 + USE_NED_ALLOCATOR = YesPlease
494 + UNRELIABLE_FSTAT = UnfortunatelyYes
495 + OBJECT_CREATION_USES_RENAMES = UnfortunatelyNeedsTo
496 + NO_REGEX = YesPlease
497 + NO_PYTHON = YesPlease
498 + BLK_SHA1 = YesPlease
499 + ETAGS_TARGET = ETAGS
500 + NO_INET_PTON = YesPlease
501 + NO_INET_NTOP = YesPlease
502 + NO_POSIX_GOODIES = UnfortunatelyYes
503 + COMPAT_CFLAGS += -D__USE_MINGW_ACCESS -DNOGDI -Icompat -Icompat/win32
504 + COMPAT_CFLAGS += -DSTRIP_EXTENSION=\".exe\"
505 + COMPAT_OBJS += compat/mingw.o compat/winansi.o \
506 + compat/win32/pthread.o compat/win32/syslog.o \
507 + compat/win32/dirent.o
508 + EXTLIBS += -lws2_32
509 + PTHREAD_LIBS =
510 + X = .exe
511 + SPARSE_FLAGS = -Wno-one-bit-signed-bitfield
512 +ifneq (,$(wildcard ../THIS_IS_MSYSGIT))
513 + htmldir = doc/git/html/
514 + prefix =
515 + INSTALL = /bin/install
516 + EXTLIBS += /mingw/lib/libz.a
517 + NO_R_TO_GCC_LINKER = YesPlease
518 + INTERNAL_QSORT = YesPlease
519 + HAVE_LIBCHARSET_H = YesPlease
520 +else
521 + NO_CURL = YesPlease
522 +endif
523 +endif
524 +ifeq ($(uname_S),QNX)
525 + COMPAT_CFLAGS += -DSA_RESTART=0
526 + HAVE_STRINGS_H = YesPlease
527 + NEEDS_SOCKET = YesPlease
528 + NO_FNMATCH_CASEFOLD = YesPlease
529 + NO_GETPAGESIZE = YesPlease
530 + NO_ICONV = YesPlease
531 + NO_MEMMEM = YesPlease
532 + NO_MKDTEMP = YesPlease
533 + NO_MKSTEMPS = YesPlease
534 + NO_NSEC = YesPlease
535 + NO_PTHREADS = YesPlease
536 + NO_R_TO_GCC_LINKER = YesPlease
537 + NO_STRCASESTR = YesPlease
538 + NO_STRLCPY = YesPlease
539 +endif