summaryrefslogtreecommitdiff
path: root/Makefile.in
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile.in')
-rw-r--r--Makefile.in12
1 files changed, 10 insertions, 2 deletions
diff --git a/Makefile.in b/Makefile.in
index 2e56569a91a5..cd6c01833e6a 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -9,7 +9,7 @@
gb_Top_MODULE_CHECK_TARGETS := slowcheck unitcheck subsequentcheck perfcheck uicheck screenshot
-.PHONY : all bootstrap gbuild build build-non-l10n-only build-l10n-only check clean clean-build clean-host test-install distclean distro-pack-install docs download etags fetch findunusedcode get-submodules id install install-strip tags debugrun help showmodules translations packageinfo internal.clean $(gb_Top_MODULE_CHECK_TARGETS)
+.PHONY : all check-if-root bootstrap gbuild build build-non-l10n-only build-l10n-only check clean clean-build clean-host test-install distclean distro-pack-install docs download etags fetch findunusedcode get-submodules id install install-strip tags debugrun help showmodules translations packageinfo internal.clean $(gb_Top_MODULE_CHECK_TARGETS)
MAKECMDGOALS?=all
build_goal:=$(if $(filter build check,$(MAKECMDGOALS)),all)\
@@ -54,6 +54,14 @@ else # MAKE_RESTARTS
all: build
+check-if-root:
+ @if test `id -u` = 0 && ! grep -q 'lxc\|docker' /proc/self/cgroup; then \
+ echo; \
+ echo 'No. You make ME a sandwich.'; \
+ echo; \
+ exit 1; \
+ fi
+
gb_Side ?= host
include $(BUILDDIR)/config_$(gb_Side).mk
@@ -243,7 +251,7 @@ endif
#
# Bootstrap
#
-bootstrap: compilerplugins
+bootstrap: check-if-root compilerplugins
#
# Build