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 <didi.debian@cknow.org>
This commit is contained in:
Diederik de Haas 2021-06-24 20:22:55 +02:00
parent 821aff4e19
commit 84b6ac3864
No known key found for this signature in database
GPG Key ID: D76E5BCE787EDB6E
1 changed files with 4 additions and 1 deletions

View File

@ -14,8 +14,11 @@ yaml: $(addsuffix .yaml,$(platforms))
ifeq ($(shell id -u),0) ifeq ($(shell id -u),0)
as_root = 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) as_root = fakemachine -v $(CURDIR) -- env --chdir $(CURDIR)
else
$(error "This must be run as root")
endif endif
target_platforms: target_platforms: