From 1a24696be5d50036630ac8d5502d356034751e85 Mon Sep 17 00:00:00 2001 From: Wolf Date: Fri, 28 Oct 2016 16:17:40 +0200 Subject: [PATCH] applying patch by @mic92 less buggy test for interpreter --- Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 12d09d0..ca5b5f5 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,4 @@ +INTERPRETER := ruby GENERATOR='./generate.rb' MAKE_TARGETS=$(patsubst dates/%.yaml, dates/%/ALL, $(wildcard dates/*.yaml)) @@ -12,7 +13,8 @@ clean: dates/%/Makefile: dates/%.yaml $(wildcard decks/*.yaml) mkdir -p $(shell dirname $@) - $(GENERATOR) $< $(shell dirname $@) || printf "\033[1;31minterpreter or script missing\033[0m\n" + command -v $(INTERPRETER) || (printf "Could not find '%s' – Please install or add it to PATH!\n" $(INTERPRETER); exit 1) + $(INTERPRETER) $(GENERATOR) $< $(shell dirname $@) dates/%/ALL: dates/%/Makefile $(MAKE) -C $(shell dirname $@)