diff options
author | Issam E. Maghni <issam.e.maghni@mailbox.org> | 2021-05-19 06:15:53 +0300 |
---|---|---|
committer | James M Snell <jasnell@gmail.com> | 2021-05-22 01:47:16 +0300 |
commit | 7afa7b9ab34b4f7c7ddf113e5c9e9b4ff6c60915 (patch) | |
tree | 2ccc1346b3ba1aaf57c51a5f90e806f50ebabda5 /Makefile | |
parent | a1f590ebd609c72587fc9adda43c1b530e15bf11 (diff) |
build: replace non-POSIX test -a|o
test/[ from sbase unix tools[1] throws "too many arguments" if -a or
-o is provided. The syntax has been marked obsolescent as per the
manual[2].
[1] http://core.suckless.org/sbase/
[2] https://pubs.opengroup.org/onlinepubs/9699919799/utilities/test.html#tag_20_128_16
PR-URL: https://github.com/nodejs/node/pull/38731
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -103,7 +103,7 @@ $(NODE_EXE): build_type:=Release $(NODE_G_EXE): build_type:=Debug $(NODE_EXE) $(NODE_G_EXE): config.gypi out/Makefile $(MAKE) -C out BUILDTYPE=${build_type} V=$(V) - if [ ! -r $@ -o ! -L $@ ]; then \ + if [ ! -r $@ ] || [ ! -L $@ ]; then \ ln -fs out/${build_type}/$(NODE_EXE) $@; fi else ifeq ($(BUILD_WITH), ninja) @@ -117,11 +117,11 @@ else endif $(NODE_EXE): config.gypi out/Release/build.ninja ninja -C out/Release $(NINJA_ARGS) - if [ ! -r $@ -o ! -L $@ ]; then ln -fs out/Release/$(NODE_EXE) $@; fi + if [ ! -r $@ ] || [ ! -L $@ ]; then ln -fs out/Release/$(NODE_EXE) $@; fi $(NODE_G_EXE): config.gypi out/Debug/build.ninja ninja -C out/Debug $(NINJA_ARGS) - if [ ! -r $@ -o ! -L $@ ]; then ln -fs out/Debug/$(NODE_EXE) $@; fi + if [ ! -r $@ ] || [ ! -L $@ ]; then ln -fs out/Debug/$(NODE_EXE) $@; fi else $(NODE_EXE) $(NODE_G_EXE): $(warning This Makefile currently only supports building with 'make' or 'ninja') @@ -908,7 +908,7 @@ BINARYTAR=$(BINARYNAME).tar HAS_XZ ?= $(shell command -v 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) -eq 1 -a $(SKIP_XZ) -eq 0 ] && echo 1 || echo 0) +XZ = $(shell [ $(HAS_XZ) -eq 1 ] && [ $(SKIP_XZ) -eq 0 ] && echo 1 || echo 0) XZ_COMPRESSION ?= 9e PKG=$(TARNAME).pkg MACOSOUTDIR=out/macos @@ -949,7 +949,7 @@ release-only: check-xz echo "" >&2 ; \ exit 1 ; \ fi - @if [ "$(DISTTYPE)" != "release" -o "$(RELEASE)" = "1" ]; then \ + @if [ "$(DISTTYPE)" != "release" ] || [ "$(RELEASE)" = "1" ]; then \ exit 0; \ else \ echo "" >&2 ; \ @@ -958,7 +958,7 @@ release-only: check-xz echo "" >&2 ; \ exit 1 ; \ fi - @if [ "$(RELEASE)" = "0" -o -f "$(CHANGELOG)" ]; then \ + @if [ "$(RELEASE)" = "0" ] || [ -f "$(CHANGELOG)" ]; then \ exit 0; \ else \ echo "" >&2 ; \ |