Skip to content

Commit 02e9a93

Browse files
rvaggBethGriggs
authored andcommitted
build: fix check-xz for platforms defaulting to sh
5e80a9a introduced check-xz, using `[[ .. ]]` syntax, but this is a bash builtin and some platforms default to `sh` when doing `$(shell ...)` in Makefiles. Fix is to make it sh friendly. Ref: #24551 PR-URL: #24841 Refs: #24551 Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Richard Lau <[email protected]>
1 parent ff90d17 commit 02e9a93

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Makefile

+2-2
Original file line numberDiff line numberDiff line change
@@ -806,10 +806,10 @@ BINARYNAME=$(TARNAME)-$(PLATFORM)-$(ARCH)
806806
endif
807807
BINARYTAR=$(BINARYNAME).tar
808808
# OSX doesn't have xz installed by default, http://macpkg.sourceforge.net/
809-
HAS_XZ ?= $(shell which xz > /dev/null 2>&1; [[ $$? = 0 ]] && echo 1 || echo 0)
809+
HAS_XZ ?= $(shell which xz > /dev/null 2>&1; [ $$? -eq 0 ] && echo 1 || echo 0)
810810
# Supply SKIP_XZ=1 to explicitly skip .tar.xz creation
811811
SKIP_XZ ?= 0
812-
XZ = $(shell [[ $(HAS_XZ) = 1 && $(SKIP_XZ) = 0 ]] && echo 1 || echo 0)
812+
XZ = $(shell [ $(HAS_XZ) -eq 1 -a $(SKIP_XZ) -eq 0 ] && echo 1 || echo 0)
813813
XZ_COMPRESSION ?= 9e
814814
PKG=$(TARNAME).pkg
815815
MACOSOUTDIR=out/macos

0 commit comments

Comments
 (0)