Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/share/mk Add protection against direct inclusion of this fil...



details:   https://anonhg.NetBSD.org/src/rev/dc7e1d59ccd8
branches:  trunk
changeset: 325881:dc7e1d59ccd8
user:      christos <christos%NetBSD.org@localhost>
date:      Fri Jan 10 16:16:57 2014 +0000

description:
Add protection against direct inclusion of this file from other Makefiles.
This file is only intended to be included from the other rules files like
bsd.lib.mk or bsd.prog.mk. If you need things to be defined early, use
bsd.own.mk.

diffstat:

 share/mk/bsd.sys.mk |  7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diffs (20 lines):

diff -r 114488b796ff -r dc7e1d59ccd8 share/mk/bsd.sys.mk
--- a/share/mk/bsd.sys.mk       Fri Jan 10 16:12:52 2014 +0000
+++ b/share/mk/bsd.sys.mk       Fri Jan 10 16:16:57 2014 +0000
@@ -1,10 +1,15 @@
-#      $NetBSD: bsd.sys.mk,v 1.232 2014/01/07 02:16:41 joerg Exp $
+#      $NetBSD: bsd.sys.mk,v 1.233 2014/01/10 16:16:57 christos Exp $
 #
 # Build definitions used for NetBSD source tree builds.
 
 .if !defined(_BSD_SYS_MK_)
 _BSD_SYS_MK_=1
 
+.if !empty(.INCLUDEDFROMFILE:MMakefile*)
+error:
+       @(echo "bsd.sys.mk should not be included from Makefiles" >& 2; exit 1)
+.endif
+
 .if ${MKREPRO:Uno} == "yes"
 CPPFLAGS+=     -Wp,-iremap,${NETBSDSRCDIR}:/usr/src
 CPPFLAGS+=     -Wp,-iremap,${DESTDIR}/:/



Home | Main Index | Thread Index | Old Index