diff --git a/makefile b/makefile
index 9f9dbd72adfcf94a89bade5c9876f5990822635f..c0ae7ef55ed0f90bba3f1b6fe2cdc02b7dd6efcf 100644
--- a/makefile
+++ b/makefile
@@ -3,8 +3,8 @@ HASH := $(shell git rev-list -n 1 --abbrev-commit HEAD)
 COMMIT := $(git rev-parse --short HEAD)
 uname := $(shell uname -s)
 arch := $(shell uname -m)
-TWEEGO := $(shell command -v tweego ; echo "$?")
-ifneq ($(TWEEGO),0)
+TWEEGO := $(shell command -v tweego || echo "$$?")
+ifeq ($(TWEEGO),1)
 	ifeq ($(uname),Linux)
 		ifeq ($(arch),x86_64)
 			TWEEGO := ./devTools/tweeGo/tweego_nix64
@@ -18,8 +18,6 @@ ifneq ($(TWEEGO),0)
 			TWEEGO := ./devTools/tweeGo/tweego_osx86
 		endif
 	endif
-else
-	TWEEGO := "tweego"
 endif
 
 all: bin/FC_pregmod.html bin/resources