summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu@cvs.openbsd.org>2015-07-19 10:44:06 +0000
committerMatthieu Herrb <matthieu@cvs.openbsd.org>2015-07-19 10:44:06 +0000
commitb7c32f93eb1f70309d0551878e4cd3039d7fe84e (patch)
tree4e937e7f3cd5d98b611bcb4b70b832a575bb7f49
parent917e44c6608a14aea1f17f0faf31708121547906 (diff)
Complain if 'make build' is run with DESTDIR set.
-rw-r--r--Makefile8
1 files changed, 7 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 9a89ec28f..8a71668be 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.65 2015/07/01 20:10:39 deraadt Exp $
+# $OpenBSD: Makefile,v 1.66 2015/07/19 10:44:05 matthieu Exp $
.include <bsd.own.mk>
.include <bsd.xconf.mk>
@@ -29,12 +29,18 @@ SUBDIR+= distrib/notes
NOOBJ=
+.if defined(DESTDIR)
+build:
+ @echo "Cannot run ${MAKE} build with DESTDIR set"
+ @exit 2
+.else
build:
exec ${SUDO} ${MAKE} bootstrap-root
cd util/macros && exec ${MAKE} -f Makefile.bsd-wrapper
exec ${SUDO} ${MAKE} beforebuild
exec ${MAKE} realbuild
exec ${SUDO} ${MAKE} afterbuild
+.endif
realbuild: _SUBDIRUSE
# that's all folks