Git fork

Makefile(s): avoid recipe prefix in conditional statements

In GNU Make commit 07fcee35 ([SV 64815] Recipe lines cannot contain
conditional statements, 2023-05-22) and following, conditional
statements may no longer be preceded by a tab character (which Make
refers to as the recipe prefix).

There are a handful of spots in our various Makefile(s) which will break
in a future release of Make containing 07fcee35. For instance, trying to
compile the pre-image of this patch with the tip of make.git results in
the following:

$ make -v | head -1 && make
GNU Make 4.4.90
config.mak.uname:842: *** missing 'endif'. Stop.

The kernel addressed this issue in 82175d1f9430 (kbuild: Replace tabs
with spaces when followed by conditionals, 2024-01-28). Address the
issues in Git's tree by applying the same strategy.

When a conditional word (ifeq, ifneq, ifdef, etc.) is preceded by one or
more tab characters, replace each tab character with 8 space characters
with the following:

find . -type f -not -path './.git/*' -name Makefile -or -name '*.mak' |
xargs perl -i -pe '
s/(\t+)(ifn?eq|ifn?def|else|endif)/" " x (length($1) * 8) . $2/ge unless /\\$/
'

The "unless /\\$/" removes any false-positives (like "\telse \"
appearing within a shell script as part of a recipe).

After doing so, Git compiles on newer versions of Make:

$ make -v | head -1 && make
GNU Make 4.4.90
GIT_VERSION = 2.44.0.414.gfac1dc44ca9
[...]

$ echo $?
0

Reported-by: Dario Gjorgjevski <dario.gjorgjevski@gmail.com>
Signed-off-by: Taylor Blau <me@ttaylorr.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

authored by

Taylor Blau and committed by
Junio C Hamano
728b9ac0 3c2a3fdc

+135 -135
+48 -48
Makefile
··· 1552 1552 endif 1553 1553 1554 1554 ifeq ($(uname_S),Darwin) 1555 - ifndef NO_FINK 1556 - ifeq ($(shell test -d /sw/lib && echo y),y) 1555 + ifndef NO_FINK 1556 + ifeq ($(shell test -d /sw/lib && echo y),y) 1557 1557 BASIC_CFLAGS += -I/sw/include 1558 1558 BASIC_LDFLAGS += -L/sw/lib 1559 - endif 1560 - endif 1561 - ifndef NO_DARWIN_PORTS 1562 - ifeq ($(shell test -d /opt/local/lib && echo y),y) 1559 + endif 1560 + endif 1561 + ifndef NO_DARWIN_PORTS 1562 + ifeq ($(shell test -d /opt/local/lib && echo y),y) 1563 1563 BASIC_CFLAGS += -I/opt/local/include 1564 1564 BASIC_LDFLAGS += -L/opt/local/lib 1565 - endif 1566 - endif 1567 - ifndef NO_APPLE_COMMON_CRYPTO 1565 + endif 1566 + endif 1567 + ifndef NO_APPLE_COMMON_CRYPTO 1568 1568 NO_OPENSSL = YesPlease 1569 1569 APPLE_COMMON_CRYPTO = YesPlease 1570 1570 COMPAT_CFLAGS += -DAPPLE_COMMON_CRYPTO 1571 - endif 1571 + endif 1572 1572 PTHREAD_LIBS = 1573 1573 endif 1574 1574 ··· 1607 1607 REMOTE_CURL_NAMES = 1608 1608 EXCLUDED_PROGRAMS += git-http-fetch git-http-push 1609 1609 else 1610 - ifdef CURLDIR 1610 + ifdef CURLDIR 1611 1611 # Try "-Wl,-rpath=$(CURLDIR)/$(lib)" in such a case. 1612 1612 CURL_CFLAGS = -I$(CURLDIR)/include 1613 1613 CURL_LIBCURL = $(call libpath_template,$(CURLDIR)/$(lib)) 1614 - else 1614 + else 1615 1615 CURL_CFLAGS = 1616 1616 CURL_LIBCURL = 1617 - endif 1617 + endif 1618 1618 1619 - ifndef CURL_LDFLAGS 1619 + ifndef CURL_LDFLAGS 1620 1620 CURL_LDFLAGS = $(eval CURL_LDFLAGS := $$(shell $$(CURL_CONFIG) --libs))$(CURL_LDFLAGS) 1621 - endif 1621 + endif 1622 1622 CURL_LIBCURL += $(CURL_LDFLAGS) 1623 1623 1624 - ifndef CURL_CFLAGS 1624 + ifndef CURL_CFLAGS 1625 1625 CURL_CFLAGS = $(eval CURL_CFLAGS := $$(shell $$(CURL_CONFIG) --cflags))$(CURL_CFLAGS) 1626 - endif 1626 + endif 1627 1627 BASIC_CFLAGS += $(CURL_CFLAGS) 1628 1628 1629 1629 REMOTE_CURL_PRIMARY = git-remote-http$X ··· 1631 1631 REMOTE_CURL_NAMES = $(REMOTE_CURL_PRIMARY) $(REMOTE_CURL_ALIASES) 1632 1632 PROGRAM_OBJS += http-fetch.o 1633 1633 PROGRAMS += $(REMOTE_CURL_NAMES) 1634 - ifndef NO_EXPAT 1634 + ifndef NO_EXPAT 1635 1635 PROGRAM_OBJS += http-push.o 1636 - endif 1636 + endif 1637 1637 curl_check := $(shell (echo 072200; $(CURL_CONFIG) --vernum | sed -e '/^70[BC]/s/^/0/') 2>/dev/null | sort -r | sed -ne 2p) 1638 - ifeq "$(curl_check)" "072200" 1638 + ifeq "$(curl_check)" "072200" 1639 1639 USE_CURL_FOR_IMAP_SEND = YesPlease 1640 - endif 1641 - ifdef USE_CURL_FOR_IMAP_SEND 1640 + endif 1641 + ifdef USE_CURL_FOR_IMAP_SEND 1642 1642 BASIC_CFLAGS += -DUSE_CURL_FOR_IMAP_SEND 1643 1643 IMAP_SEND_BUILDDEPS = http.o 1644 1644 IMAP_SEND_LDFLAGS += $(CURL_LIBCURL) 1645 - endif 1646 - ifndef NO_EXPAT 1647 - ifdef EXPATDIR 1645 + endif 1646 + ifndef NO_EXPAT 1647 + ifdef EXPATDIR 1648 1648 BASIC_CFLAGS += -I$(EXPATDIR)/include 1649 1649 EXPAT_LIBEXPAT = $(call libpath_template,$(EXPATDIR)/$(lib)) -lexpat 1650 - else 1650 + else 1651 1651 EXPAT_LIBEXPAT = -lexpat 1652 - endif 1653 - ifdef EXPAT_NEEDS_XMLPARSE_H 1652 + endif 1653 + ifdef EXPAT_NEEDS_XMLPARSE_H 1654 1654 BASIC_CFLAGS += -DEXPAT_NEEDS_XMLPARSE_H 1655 - endif 1656 - endif 1655 + endif 1656 + endif 1657 1657 endif 1658 1658 IMAP_SEND_LDFLAGS += $(OPENSSL_LINK) $(OPENSSL_LIBSSL) $(LIB_4_CRYPTO) 1659 1659 ··· 1665 1665 1666 1666 ifndef NO_OPENSSL 1667 1667 OPENSSL_LIBSSL = -lssl 1668 - ifdef OPENSSLDIR 1668 + ifdef OPENSSLDIR 1669 1669 BASIC_CFLAGS += -I$(OPENSSLDIR)/include 1670 1670 OPENSSL_LINK = $(call libpath_template,$(OPENSSLDIR)/$(lib)) 1671 - else 1671 + else 1672 1672 OPENSSL_LINK = 1673 - endif 1674 - ifdef NEEDS_CRYPTO_WITH_SSL 1673 + endif 1674 + ifdef NEEDS_CRYPTO_WITH_SSL 1675 1675 OPENSSL_LIBSSL += -lcrypto 1676 - endif 1676 + endif 1677 1677 else 1678 1678 BASIC_CFLAGS += -DNO_OPENSSL 1679 1679 OPENSSL_LIBSSL = ··· 1691 1691 endif 1692 1692 endif 1693 1693 ifndef NO_ICONV 1694 - ifdef NEEDS_LIBICONV 1695 - ifdef ICONVDIR 1694 + ifdef NEEDS_LIBICONV 1695 + ifdef ICONVDIR 1696 1696 BASIC_CFLAGS += -I$(ICONVDIR)/include 1697 1697 ICONV_LINK = $(call libpath_template,$(ICONVDIR)/$(lib)) 1698 - else 1698 + else 1699 1699 ICONV_LINK = 1700 - endif 1701 - ifdef NEEDS_LIBINTL_BEFORE_LIBICONV 1700 + endif 1701 + ifdef NEEDS_LIBINTL_BEFORE_LIBICONV 1702 1702 ICONV_LINK += -lintl 1703 - endif 1703 + endif 1704 1704 EXTLIBS += $(ICONV_LINK) -liconv 1705 - endif 1705 + endif 1706 1706 endif 1707 1707 ifdef ICONV_OMITS_BOM 1708 1708 BASIC_CFLAGS += -DICONV_OMITS_BOM ··· 1823 1823 COMPAT_CFLAGS += -DNO_MMAP 1824 1824 COMPAT_OBJS += compat/mmap.o 1825 1825 else 1826 - ifdef USE_WIN32_MMAP 1826 + ifdef USE_WIN32_MMAP 1827 1827 COMPAT_CFLAGS += -DUSE_WIN32_MMAP 1828 1828 COMPAT_OBJS += compat/win32mmap.o 1829 - endif 1829 + endif 1830 1830 endif 1831 1831 ifdef MMAP_PREVENTS_DELETE 1832 1832 BASIC_CFLAGS += -DMMAP_PREVENTS_DELETE ··· 1951 1951 BASIC_CFLAGS += -DSHA1_DC 1952 1952 LIB_OBJS += sha1dc_git.o 1953 1953 ifdef DC_SHA1_EXTERNAL 1954 - ifdef DC_SHA1_SUBMODULE 1955 - ifneq ($(DC_SHA1_SUBMODULE),auto) 1954 + ifdef DC_SHA1_SUBMODULE 1955 + ifneq ($(DC_SHA1_SUBMODULE),auto) 1956 1956 $(error Only set DC_SHA1_EXTERNAL or DC_SHA1_SUBMODULE, not both) 1957 - endif 1958 - endif 1957 + endif 1958 + endif 1959 1959 BASIC_CFLAGS += -DDC_SHA1_EXTERNAL 1960 1960 EXTLIBS += -lsha1detectcoll 1961 1961 else
+77 -77
config.mak.uname
··· 65 65 HAVE_PLATFORM_PROCINFO = YesPlease 66 66 COMPAT_OBJS += compat/linux/procinfo.o 67 67 # centos7/rhel7 provides gcc 4.8.5 and zlib 1.2.7. 68 - ifneq ($(findstring .el7.,$(uname_R)),) 68 + ifneq ($(findstring .el7.,$(uname_R)),) 69 69 BASIC_CFLAGS += -std=c99 70 - endif 70 + endif 71 71 endif 72 72 ifeq ($(uname_S),GNU/kFreeBSD) 73 73 HAVE_ALLOCA_H = YesPlease ··· 95 95 NO_MEMMEM = YesPlease 96 96 endif 97 97 ifeq ($(uname_S),SCO_SV) 98 - ifeq ($(uname_R),3.2) 98 + ifeq ($(uname_R),3.2) 99 99 CFLAGS = -O2 100 - endif 101 - ifeq ($(uname_R),5) 100 + endif 101 + ifeq ($(uname_R),5) 102 102 CC = cc 103 103 BASIC_CFLAGS += -Kthread 104 - endif 104 + endif 105 105 NEEDS_SOCKET = YesPlease 106 106 NEEDS_NSL = YesPlease 107 107 NEEDS_SSL_WITH_CRYPTO = YesPlease ··· 124 124 # - MacOS 10.0.* and MacOS 10.1.0 = Darwin 1.* 125 125 # - MacOS 10.x.* = Darwin (x+4).* for (1 <= x) 126 126 # i.e. "begins with [15678] and a dot" means "10.4.* or older". 127 - ifeq ($(shell expr "$(uname_R)" : '[15678]\.'),2) 127 + ifeq ($(shell expr "$(uname_R)" : '[15678]\.'),2) 128 128 OLD_ICONV = UnfortunatelyYes 129 129 NO_APPLE_COMMON_CRYPTO = YesPlease 130 - endif 131 - ifeq ($(shell expr "$(uname_R)" : '[15]\.'),2) 130 + endif 131 + ifeq ($(shell expr "$(uname_R)" : '[15]\.'),2) 132 132 NO_STRLCPY = YesPlease 133 - endif 134 - ifeq ($(shell test "`expr "$(uname_R)" : '\([0-9][0-9]*\)\.'`" -ge 11 && echo 1),1) 133 + endif 134 + ifeq ($(shell test "`expr "$(uname_R)" : '\([0-9][0-9]*\)\.'`" -ge 11 && echo 1),1) 135 135 HAVE_GETDELIM = YesPlease 136 - endif 137 - ifeq ($(shell test "`expr "$(uname_R)" : '\([0-9][0-9]*\)\.'`" -ge 20 && echo 1),1) 136 + endif 137 + ifeq ($(shell test "`expr "$(uname_R)" : '\([0-9][0-9]*\)\.'`" -ge 20 && echo 1),1) 138 138 OPEN_RETURNS_EINTR = UnfortunatelyYes 139 - endif 139 + endif 140 140 NO_MEMMEM = YesPlease 141 141 USE_ST_TIMESPEC = YesPlease 142 142 HAVE_DEV_TTY = YesPlease ··· 152 152 # Workaround for `gettext` being keg-only and not even being linked via 153 153 # `brew link --force gettext`, should be obsolete as of 154 154 # https://github.com/Homebrew/homebrew-core/pull/53489 155 - ifeq ($(shell test -d /usr/local/opt/gettext/ && echo y),y) 155 + ifeq ($(shell test -d /usr/local/opt/gettext/ && echo y),y) 156 156 BASIC_CFLAGS += -I/usr/local/include -I/usr/local/opt/gettext/include 157 157 BASIC_LDFLAGS += -L/usr/local/lib -L/usr/local/opt/gettext/lib 158 - ifeq ($(shell test -x /usr/local/opt/gettext/bin/msgfmt && echo y),y) 158 + ifeq ($(shell test -x /usr/local/opt/gettext/bin/msgfmt && echo y),y) 159 159 MSGFMT = /usr/local/opt/gettext/bin/msgfmt 160 - endif 160 + endif 161 161 # On newer ARM-based machines the default installation path has changed to 162 162 # /opt/homebrew. Include it in our search paths so that the user does not 163 163 # have to configure this manually. ··· 165 165 # Note that we do not employ the same workaround as above where we manually 166 166 # add gettext. The issue was fixed more than three years ago by now, and at 167 167 # that point there haven't been any ARM-based Macs yet. 168 - else ifeq ($(shell test -d /opt/homebrew/ && echo y),y) 168 + else ifeq ($(shell test -d /opt/homebrew/ && echo y),y) 169 169 BASIC_CFLAGS += -I/opt/homebrew/include 170 170 BASIC_LDFLAGS += -L/opt/homebrew/lib 171 - ifeq ($(shell test -x /opt/homebrew/bin/msgfmt && echo y),y) 171 + ifeq ($(shell test -x /opt/homebrew/bin/msgfmt && echo y),y) 172 172 MSGFMT = /opt/homebrew/bin/msgfmt 173 - endif 174 - endif 173 + endif 174 + endif 175 175 176 176 # The builtin FSMonitor on MacOS builds upon Simple-IPC. Both require 177 177 # Unix domain sockets and PThreads. 178 - ifndef NO_PTHREADS 179 - ifndef NO_UNIX_SOCKETS 178 + ifndef NO_PTHREADS 179 + ifndef NO_UNIX_SOCKETS 180 180 FSMONITOR_DAEMON_BACKEND = darwin 181 181 FSMONITOR_OS_SETTINGS = darwin 182 - endif 183 - endif 182 + endif 183 + endif 184 184 185 185 BASIC_LDFLAGS += -framework CoreServices 186 186 endif ··· 196 196 NO_REGEX = YesPlease 197 197 NO_MSGFMT_EXTENDED_OPTIONS = YesPlease 198 198 HAVE_DEV_TTY = YesPlease 199 - ifeq ($(uname_R),5.6) 199 + ifeq ($(uname_R),5.6) 200 200 SOCKLEN_T = int 201 201 NO_HSTRERROR = YesPlease 202 202 NO_IPV6 = YesPlease ··· 206 206 NO_STRLCPY = YesPlease 207 207 NO_STRTOUMAX = YesPlease 208 208 GIT_TEST_CMP = cmp 209 - endif 210 - ifeq ($(uname_R),5.7) 209 + endif 210 + ifeq ($(uname_R),5.7) 211 211 NEEDS_RESOLV = YesPlease 212 212 NO_IPV6 = YesPlease 213 213 NO_SOCKADDR_STORAGE = YesPlease ··· 216 216 NO_STRLCPY = YesPlease 217 217 NO_STRTOUMAX = YesPlease 218 218 GIT_TEST_CMP = cmp 219 - endif 220 - ifeq ($(uname_R),5.8) 219 + endif 220 + ifeq ($(uname_R),5.8) 221 221 NO_UNSETENV = YesPlease 222 222 NO_SETENV = YesPlease 223 223 NO_STRTOUMAX = YesPlease 224 224 GIT_TEST_CMP = cmp 225 - endif 226 - ifeq ($(uname_R),5.9) 225 + endif 226 + ifeq ($(uname_R),5.9) 227 227 NO_UNSETENV = YesPlease 228 228 NO_SETENV = YesPlease 229 229 NO_STRTOUMAX = YesPlease 230 230 GIT_TEST_CMP = cmp 231 - endif 231 + endif 232 232 INSTALL = /usr/ucb/install 233 233 TAR = gtar 234 234 BASIC_CFLAGS += -D__EXTENSIONS__ -D__sun__ 235 235 endif 236 236 ifeq ($(uname_O),Cygwin) 237 - ifeq ($(shell expr "$(uname_R)" : '1\.[1-6]\.'),4) 237 + ifeq ($(shell expr "$(uname_R)" : '1\.[1-6]\.'),4) 238 238 NO_D_TYPE_IN_DIRENT = YesPlease 239 239 NO_STRCASESTR = YesPlease 240 240 NO_MEMMEM = YesPlease ··· 245 245 # On some boxes NO_MMAP is needed, and not so elsewhere. 246 246 # Try commenting this out if you suspect MMAP is more efficient 247 247 NO_MMAP = YesPlease 248 - else 248 + else 249 249 NO_REGEX = UnfortunatelyYes 250 - endif 250 + endif 251 251 HAVE_ALLOCA_H = YesPlease 252 252 NEEDS_LIBICONV = YesPlease 253 253 NO_FAST_WORKING_DIRECTORY = UnfortunatelyYes ··· 263 263 NEEDS_LIBICONV = YesPlease 264 264 # Versions up to 10.1 require OLD_ICONV; 10.2 and beyond don't. 265 265 # A typical version string looks like "10.2-RELEASE". 266 - ifeq ($(shell expr "$(uname_R)" : '[1-9]\.'),2) 266 + ifeq ($(shell expr "$(uname_R)" : '[1-9]\.'),2) 267 267 OLD_ICONV = YesPlease 268 - endif 269 - ifeq ($(firstword $(subst -, ,$(uname_R))),10.0) 268 + endif 269 + ifeq ($(firstword $(subst -, ,$(uname_R))),10.0) 270 270 OLD_ICONV = YesPlease 271 - endif 272 - ifeq ($(firstword $(subst -, ,$(uname_R))),10.1) 271 + endif 272 + ifeq ($(firstword $(subst -, ,$(uname_R))),10.1) 273 273 OLD_ICONV = YesPlease 274 - endif 274 + endif 275 275 NO_MEMMEM = YesPlease 276 276 BASIC_CFLAGS += -I/usr/local/include 277 277 BASIC_LDFLAGS += -L/usr/local/lib 278 278 DIR_HAS_BSD_GROUP_SEMANTICS = YesPlease 279 279 USE_ST_TIMESPEC = YesPlease 280 - ifeq ($(shell expr "$(uname_R)" : '4\.'),2) 280 + ifeq ($(shell expr "$(uname_R)" : '4\.'),2) 281 281 PTHREAD_LIBS = -pthread 282 282 NO_UINTMAX_T = YesPlease 283 283 NO_STRTOUMAX = YesPlease 284 - endif 284 + endif 285 285 PYTHON_PATH = /usr/local/bin/python 286 286 PERL_PATH = /usr/local/bin/perl 287 287 HAVE_PATHS_H = YesPlease ··· 317 317 CSPRNG_METHOD = arc4random 318 318 endif 319 319 ifeq ($(uname_S),NetBSD) 320 - ifeq ($(shell expr "$(uname_R)" : '[01]\.'),2) 320 + ifeq ($(shell expr "$(uname_R)" : '[01]\.'),2) 321 321 NEEDS_LIBICONV = YesPlease 322 - endif 322 + endif 323 323 BASIC_CFLAGS += -I/usr/pkg/include 324 324 BASIC_LDFLAGS += -L/usr/pkg/lib $(CC_LD_DYNPATH)/usr/pkg/lib 325 325 USE_ST_TIMESPEC = YesPlease ··· 343 343 BASIC_CFLAGS += -D_LARGE_FILES 344 344 FILENO_IS_A_MACRO = UnfortunatelyYes 345 345 NEED_ACCESS_ROOT_HANDLER = UnfortunatelyYes 346 - ifeq ($(shell expr "$(uname_V)" : '[1234]'),1) 346 + ifeq ($(shell expr "$(uname_V)" : '[1234]'),1) 347 347 NO_PTHREADS = YesPlease 348 - else 348 + else 349 349 PTHREAD_LIBS = -lpthread 350 - endif 351 - ifeq ($(shell expr "$(uname_V).$(uname_R)" : '5\.1'),3) 350 + endif 351 + ifeq ($(shell expr "$(uname_V).$(uname_R)" : '5\.1'),3) 352 352 INLINE = '' 353 - endif 353 + endif 354 354 GIT_TEST_CMP = cmp 355 355 endif 356 356 ifeq ($(uname_S),GNU) ··· 410 410 NO_SYS_SELECT_H = YesPlease 411 411 SNPRINTF_RETURNS_BOGUS = YesPlease 412 412 NO_NSEC = YesPlease 413 - ifeq ($(uname_R),B.11.00) 413 + ifeq ($(uname_R),B.11.00) 414 414 NO_INET_NTOP = YesPlease 415 415 NO_INET_PTON = YesPlease 416 - endif 417 - ifeq ($(uname_R),B.10.20) 416 + endif 417 + ifeq ($(uname_R),B.10.20) 418 418 # Override HP-UX 11.x setting: 419 419 INLINE = 420 420 SOCKLEN_T = size_t 421 421 NO_PREAD = YesPlease 422 422 NO_INET_NTOP = YesPlease 423 423 NO_INET_PTON = YesPlease 424 - endif 424 + endif 425 425 GIT_TEST_CMP = cmp 426 426 endif 427 427 ifeq ($(uname_S),Windows) 428 428 GIT_VERSION := $(GIT_VERSION).MSVC 429 429 pathsep = ; 430 430 # Assume that this is built in Git for Windows' SDK 431 - ifeq (MINGW32,$(MSYSTEM)) 431 + ifeq (MINGW32,$(MSYSTEM)) 432 432 prefix = /mingw32 433 - else 433 + else 434 434 prefix = /mingw64 435 - endif 435 + endif 436 436 # Prepend MSVC 64-bit tool-chain to PATH. 437 437 # 438 438 # A regular Git Bash *does not* have cl.exe in its $PATH. As there is a ··· 550 550 NO_MKDTEMP = YesPlease 551 551 NO_STRTOUMAX = YesPlease 552 552 NO_NSEC = YesPlease 553 - ifeq ($(uname_R),3.5) 553 + ifeq ($(uname_R),3.5) 554 554 NO_INET_NTOP = YesPlease 555 555 NO_INET_PTON = YesPlease 556 556 NO_SOCKADDR_STORAGE = YesPlease 557 - endif 558 - ifeq ($(uname_R),5.2) 557 + endif 558 + ifeq ($(uname_R),5.2) 559 559 NO_INET_NTOP = YesPlease 560 560 NO_INET_PTON = YesPlease 561 561 NO_SOCKADDR_STORAGE = YesPlease 562 - endif 562 + endif 563 563 endif 564 564 ifeq ($(uname_S),Minix) 565 565 NO_IPV6 = YesPlease ··· 579 579 # still not compile in c89 mode, due to non-const array initializations. 580 580 CC = cc -c99 581 581 # Build down-rev compatible objects that don't use our new getopt_long. 582 - ifeq ($(uname_R).$(uname_V),J06.21) 582 + ifeq ($(uname_R).$(uname_V),J06.21) 583 583 CC += -WRVU=J06.20 584 - endif 585 - ifeq ($(uname_R).$(uname_V),L17.02) 584 + endif 585 + ifeq ($(uname_R).$(uname_V),L17.02) 586 586 CC += -WRVU=L16.05 587 - endif 587 + endif 588 588 # Disable all optimization, seems to result in bad code, with -O or -O2 589 589 # or even -O1 (default), /usr/local/libexec/git-core/git-pack-objects 590 590 # abends on "git push". Needs more investigation. ··· 639 639 SHELL_PATH = /usr/coreutils/bin/bash 640 640 endif 641 641 ifeq ($(uname_S),MINGW) 642 - ifeq ($(shell expr "$(uname_R)" : '1\.'),2) 642 + ifeq ($(shell expr "$(uname_R)" : '1\.'),2) 643 643 $(error "Building with MSys is no longer supported") 644 - endif 644 + endif 645 645 pathsep = ; 646 646 HAVE_ALLOCA_H = YesPlease 647 647 NO_PREAD = YesPlease ··· 700 700 # Enable DEP 701 701 BASIC_LDFLAGS += -Wl,--nxcompat 702 702 # Enable ASLR (unless debugging) 703 - ifneq (,$(findstring -O,$(filter-out -O0 -Og,$(CFLAGS)))) 703 + ifneq (,$(findstring -O,$(filter-out -O0 -Og,$(CFLAGS)))) 704 704 BASIC_LDFLAGS += -Wl,--dynamicbase 705 - endif 706 - ifeq (MINGW32,$(MSYSTEM)) 705 + endif 706 + ifeq (MINGW32,$(MSYSTEM)) 707 707 prefix = /mingw32 708 708 HOST_CPU = i686 709 709 BASIC_LDFLAGS += -Wl,--pic-executable,-e,_mainCRTStartup 710 - endif 711 - ifeq (MINGW64,$(MSYSTEM)) 710 + endif 711 + ifeq (MINGW64,$(MSYSTEM)) 712 712 prefix = /mingw64 713 713 HOST_CPU = x86_64 714 714 BASIC_LDFLAGS += -Wl,--pic-executable,-e,mainCRTStartup 715 - else 715 + else 716 716 COMPAT_CFLAGS += -D_USE_32BIT_TIME_T 717 717 BASIC_LDFLAGS += -Wl,--large-address-aware 718 - endif 718 + endif 719 719 CC = gcc 720 720 COMPAT_CFLAGS += -D__USE_MINGW_ANSI_STDIO=0 -DDETECT_MSYS_TTY \ 721 721 -fstack-protector-strong ··· 727 727 USE_GETTEXT_SCHEME = fallthrough 728 728 USE_LIBPCRE = YesPlease 729 729 USE_NED_ALLOCATOR = YesPlease 730 - ifeq (/mingw64,$(subst 32,64,$(prefix))) 730 + ifeq (/mingw64,$(subst 32,64,$(prefix))) 731 731 # Move system config into top-level /etc/ 732 732 ETC_GITCONFIG = ../etc/gitconfig 733 733 ETC_GITATTRIBUTES = ../etc/gitattributes 734 - endif 734 + endif 735 735 endif 736 736 ifeq ($(uname_S),QNX) 737 737 COMPAT_CFLAGS += -DSA_RESTART=0
+8 -8
git-gui/Makefile
··· 107 107 108 108 ifeq ($(uname_S),Darwin) 109 109 TKFRAMEWORK = /Library/Frameworks/Tk.framework/Resources/Wish.app 110 - ifeq ($(shell echo "$(uname_R)" | awk -F. '{if ($$1 >= 9) print "y"}')_$(shell test -d $(TKFRAMEWORK) || echo n),y_n) 110 + ifeq ($(shell echo "$(uname_R)" | awk -F. '{if ($$1 >= 9) print "y"}')_$(shell test -d $(TKFRAMEWORK) || echo n),y_n) 111 111 TKFRAMEWORK = /System/Library/Frameworks/Tk.framework/Resources/Wish.app 112 - ifeq ($(shell test -d $(TKFRAMEWORK) || echo n),n) 112 + ifeq ($(shell test -d $(TKFRAMEWORK) || echo n),n) 113 113 TKFRAMEWORK = /System/Library/Frameworks/Tk.framework/Resources/Wish\ Shell.app 114 - endif 115 - endif 114 + endif 115 + endif 116 116 TKEXECUTABLE = $(shell basename "$(TKFRAMEWORK)" .app) 117 117 endif 118 118 ··· 143 143 endif 144 144 gg_libdir_sed_in := $(gg_libdir) 145 145 ifeq ($(uname_S),Darwin) 146 - ifeq ($(shell test -d $(TKFRAMEWORK) && echo y),y) 146 + ifeq ($(shell test -d $(TKFRAMEWORK) && echo y),y) 147 147 GITGUI_MACOSXAPP := YesPlease 148 - endif 148 + endif 149 149 endif 150 150 ifneq (,$(findstring MINGW,$(uname_S))) 151 151 ifeq ($(shell expr "$(uname_R)" : '1\.'),2) ··· 220 220 MSGFMT ?= $(TCL_PATH) po/po2msg.sh 221 221 else 222 222 MSGFMT ?= msgfmt 223 - ifneq ($(shell $(MSGFMT) --tcl -l C -d . /dev/null 2>/dev/null; echo $$?),0) 223 + ifneq ($(shell $(MSGFMT) --tcl -l C -d . /dev/null 2>/dev/null; echo $$?),0) 224 224 MSGFMT := $(TCL_PATH) po/po2msg.sh 225 - endif 225 + endif 226 226 endif 227 227 228 228 msgsdir = $(gg_libdir)/msgs
+2 -2
gitk-git/Makefile
··· 33 33 MSGFMT ?= $(TCL_PATH) po/po2msg.sh 34 34 else 35 35 MSGFMT ?= msgfmt 36 - ifneq ($(shell $(MSGFMT) --tcl -l C -d . /dev/null 2>/dev/null; echo $$?),0) 36 + ifneq ($(shell $(MSGFMT) --tcl -l C -d . /dev/null 2>/dev/null; echo $$?),0) 37 37 MSGFMT := $(TCL_PATH) po/po2msg.sh 38 - endif 38 + endif 39 39 endif 40 40 41 41 PO_TEMPLATE = po/gitk.pot