summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorRod Vagg <rod@vagg.org>2018-12-05 10:56:02 +1100
committerRich Trott <rtrott@gmail.com>2018-12-04 22:01:01 -0800
commit6ccc80c82a7e21bc9315d6fdccea62ce8e2712a7 (patch)
tree43d1908a70d558bd6074fd02fa006b70f02394b0 /Makefile
parent06e5afa9485c29301ec622be0487afe8d9c597d7 (diff)
downloadnode-new-6ccc80c82a7e21bc9315d6fdccea62ce8e2712a7.tar.gz
build: fix check-xz for platforms defaulting to sh
5e80a9a160 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: https://github.com/nodejs/node/pull/24551 PR-URL: https://github.com/nodejs/node/pull/24841 Refs: https://github.com/nodejs/node/pull/24551 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile4
1 files changed, 2 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 803a1f96e7..6fdd9b8d4b 100644
--- a/Makefile
+++ b/Makefile
@@ -851,10 +851,10 @@ BINARYNAME=$(TARNAME)-$(PLATFORM)-$(ARCH)
endif
BINARYTAR=$(BINARYNAME).tar
# OSX doesn't have xz installed by default, http://macpkg.sourceforge.net/
-HAS_XZ ?= $(shell which xz > /dev/null 2>&1; [[ $$? = 0 ]] && echo 1 || echo 0)
+HAS_XZ ?= $(shell which xz > /dev/null 2>&1; [ $$? -eq 0 ] && echo 1 || echo 0)
# Supply SKIP_XZ=1 to explicitly skip .tar.xz creation
SKIP_XZ ?= 0
-XZ = $(shell [[ $(HAS_XZ) = 1 && $(SKIP_XZ) = 0 ]] && echo 1 || echo 0)
+XZ = $(shell [ $(HAS_XZ) -eq 1 -a $(SKIP_XZ) -eq 0 ] && echo 1 || echo 0)
XZ_COMPRESSION ?= 9e
PKG=$(TARNAME).pkg
MACOSOUTDIR=out/macos