From 84b6ac3864d287ab53e1d207b4418546991c108c Mon Sep 17 00:00:00 2001 From: Diederik de Haas Date: Thu, 24 Jun 2021 20:22:55 +0200 Subject: [PATCH] Add check whether 'fakemachine' exists. Give a warning message if it does and an error when it does not. Signed-off-by: Diederik de Haas --- Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 0da3f06..b654059 100644 --- a/Makefile +++ b/Makefile @@ -14,8 +14,11 @@ yaml: $(addsuffix .yaml,$(platforms)) ifeq ($(shell id -u),0) as_root = -else +else ifneq (,$(wildcard /usr/bin/fakemachine)) +$(warning "This should normally be run as root, but found 'fakemachine', so using that.") as_root = fakemachine -v $(CURDIR) -- env --chdir $(CURDIR) +else +$(error "This must be run as root") endif target_platforms: