summaryrefslogtreecommitdiff
path: root/make
diff options
context:
space:
mode:
authordanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2010-01-16 20:34:34 +0000
committerdanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2010-01-16 20:34:34 +0000
commit4b5dc58bc75121f5d0f69792a3260b84c91479cf (patch)
tree52156536b335eaf4851ac31a2bea4f6a72488920 /make
parente8c617b7749a18b353290471491e23b0573ebd7c (diff)
Break compilation when running as root to discourage stupid user mistakes
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12269 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'make')
-rw-r--r--make/template/main.mk1
1 files changed, 1 insertions, 0 deletions
diff --git a/make/template/main.mk b/make/template/main.mk
index d2a040f97..3dce24de4 100644
--- a/make/template/main.mk
+++ b/make/template/main.mk
@@ -100,6 +100,7 @@ all: $(FOOTER)
target: $(HEADER)
$(MAKEENV) perl make/calcdep.pl
+ @if [ `id -u` = 0 ]; then echo "Don't compile or install as root!"; exit 1; fi
cd $(BUILDPATH); $(MAKEENV) $(MAKE) -f real.mk $(TARGET)
debug: