diff options
author | Christian Marangi <ansuelsmth@gmail.com> | 2023-01-22 01:42:10 +0100 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2023-02-06 13:04:52 -0500 |
commit | 748c1ab464852eaca06a57af067565e73223e7bb (patch) | |
tree | 80dce5b56d4d979a70ac62f1beae2078b0f2ec8e /Makefile | |
parent | c5279ea1c300d52a5cb4b47881f21cf08caec790 (diff) | |
download | u-boot-748c1ab464852eaca06a57af067565e73223e7bb.tar.gz |
Makefile: fix shell error for darwin major/minor version check
Fix shell error:
/bin/sh: line 0: [: too many arguments
for the darwin major/minor version check.
It seems for os_x_before for some reason DARWIN_MAJOR_VERSION and
DARWIN_MINOR_VERSION are empty. To fix this set DARWIN_MAJOR_VERSION
and DARWIN_MINOR_VERSION to be evaluated once so the value is retained.
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -318,8 +318,8 @@ endif # ifeq ($(HOSTOS),darwin) # get major and minor product version (e.g. '10' and '6' for Snow Leopard) -DARWIN_MAJOR_VERSION = $(shell sw_vers -productVersion | cut -f 1 -d '.') -DARWIN_MINOR_VERSION = $(shell sw_vers -productVersion | cut -f 2 -d '.') +DARWIN_MAJOR_VERSION := $(shell sw_vers -productVersion | cut -f 1 -d '.') +DARWIN_MINOR_VERSION := $(shell sw_vers -productVersion | cut -f 2 -d '.') os_x_before = $(shell if [ $(DARWIN_MAJOR_VERSION) -le $(1) -a \ $(DARWIN_MINOR_VERSION) -le $(2) ] ; then echo "$(3)"; else echo "$(4)"; fi ;) |