aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
authorLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2018-04-28 22:20:12 +0200
committerLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2018-05-01 17:11:29 +0200
commit990cd371925f82035c7a8ce57abbc70851bb5ac8 (patch)
tree0d7f1fc93a94ea9b84ebac0e64eab87d91b1ed26
parentee33a893f0514344b44536576bb5f0c714d4c423 (diff)
downloadsparse-dev-990cd371925f82035c7a8ce57abbc70851bb5ac8.tar.gz
build: use a variable for $(shell uname -m)
This avoids a second call to uname later but first at all it's a preparation for more checks done on the arch. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com> Acked-by: Ramsay Jones <ramsay@ramsayjones.plus.com>
-rw-r--r--Makefile5
1 files changed, 3 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 5548f848..6dcbb1f2 100644
--- a/Makefile
+++ b/Makefile
@@ -143,7 +143,8 @@ endif
LLVM_CONFIG:=llvm-config
HAVE_LLVM:=$(shell $(LLVM_CONFIG) --version >/dev/null 2>&1 && echo 'yes')
ifeq ($(HAVE_LLVM),yes)
-ifeq ($(shell uname -m | grep -q '\(i[3456]86\|x86\|amd64\)' && echo ok),ok)
+arch := $(shell uname -m)
+ifeq ($(shell echo ${arch} | grep -q '\(i[3456]86\|x86\|amd64\)' && echo ok),ok)
LLVM_VERSION:=$(shell $(LLVM_CONFIG) --version)
ifeq ($(shell expr "$(LLVM_VERSION)" : '[3-9]\.'),2)
LLVM_PROGS := sparse-llvm
@@ -161,7 +162,7 @@ else
$(warning LLVM 3.0 or later required. Your system has version $(LLVM_VERSION) installed.)
endif
else
-$(warning sparse-llvm disabled on $(shell uname -m))
+$(warning sparse-llvm disabled on ${arch})
endif
else
$(warning Your system does not have llvm, disabling sparse-llvm)