From 3ba5c4042e81e109d81bec2fb9b2846d931f14ae Mon Sep 17 00:00:00 2001 From: ezsh <ezsh.junk@gmail.com> Date: Fri, 31 May 2019 23:07:45 +0200 Subject: [PATCH] Fix Makefile work with zsh In Zsh type prints not only executable path: $ type tweego tweego is /usr/bin/tweego These additional words break the Makefile Fixes #794 and closes #796. --- Makefile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 852c94cb980..28ec6b6baba 100644 --- a/Makefile +++ b/Makefile @@ -2,11 +2,11 @@ MAKEFLAGS += -r export TWEEGO_PATH=devTools/tweeGo/storyFormats HASH := $(shell git rev-list -n 1 --abbrev-commit HEAD) COMMIT := $(shell git rev-parse --short HEAD) -uname := $(shell uname -s) -arch := $(shell uname -m) -arch := $(shell if test $(arch) = x86_64 -o $(arch) = amd64; then echo 64; else echo 32; fi) -TWEEGO := $(shell if type tweego; then echo tweego; else echo 1; fi) -ifeq ($(TWEEGO),1) +TWEEGO := $(shell command -v tweego 2>/dev/null) +ifndef TWEEGO + uname := $(shell uname -s) + arch := $(shell uname -m) + arch := $(shell if test $(arch) = x86_64 -o $(arch) = amd64; then echo 64; else echo 32; fi) ifeq ($(uname),Linux) ifeq ($(arch),64) TWEEGO := devTools/tweeGo/tweego_nix64 -- GitLab