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:
parent
821aff4e19
commit
84b6ac3864
5
Makefile
5
Makefile
|
@ -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:
|
||||||
|
|
Loading…
Reference in New Issue