From 252b6ef32992d4067cd703d97ac7233c12882235 Mon Sep 17 00:00:00 2001 From: Manuel Messner Date: Thu, 8 Feb 2018 11:49:15 +0100 Subject: Makefile: repair check_rootpw function https://stackoverflow.com/questions/20389064/using-gnu-make-functions-to-check-if-variables-are-defined --- Makefile | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 1a91b0b..82993a4 100644 --- a/Makefile +++ b/Makefile @@ -48,11 +48,7 @@ ifdef DEBUG PACKER_OPTS += -var='headless=false' endif -define check_rootpw - ifndef ROOTPW - $(error No root password is set, set it as ROOTPW in your environment.) - endif -endef +check_rootpw = $(if $(strip $(ROOTPW)),,$(error No root password is set, set it as ROOTPW in your environment.)) .PHONY: all help clean all: help -- cgit v1.2.3-55-g7522