Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/share/mk Add _NETBSD_VERSION_DEPENDS in bsd.own.mk. Targets...
details: https://anonhg.NetBSD.org/src/rev/13c2f26142cf
branches: trunk
changeset: 782476:13c2f26142cf
user: apb <apb%NetBSD.org@localhost>
date: Sun Nov 04 10:59:13 2012 +0000
description:
Add _NETBSD_VERSION_DEPENDS in bsd.own.mk. Targets that need
to be re-generated when the NetBSD version numberchanges,
or when any build-related variables change, may depend on
${_NETBSD_VERSION_DEPENDS}.
diffstat:
share/mk/bsd.README | 24 +++++++++++++++++++++++-
share/mk/bsd.own.mk | 15 ++++++++++++---
2 files changed, 35 insertions(+), 4 deletions(-)
diffs (74 lines):
diff -r e5eb6357c07e -r 13c2f26142cf share/mk/bsd.README
--- a/share/mk/bsd.README Sun Nov 04 10:57:33 2012 +0000
+++ b/share/mk/bsd.README Sun Nov 04 10:59:13 2012 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.README,v 1.304 2012/10/02 04:53:11 jkoshy Exp $
+# $NetBSD: bsd.README,v 1.305 2012/11/04 10:59:13 apb Exp $
# @(#)bsd.README 8.2 (Berkeley) 4/2/94
This is the README file for the make "include" files for the NetBSD
@@ -499,6 +499,28 @@
is "internal" to <bsd.own.mk>, although its value is only
determined once and then propagated to all sub-makes.
+_NETBSD_VERSION_DEPENDS
+ A list of files which contain information about
+ the version of the NetBSD being built. This is
+ defined only if the current directory appears
+ to be inside a NetBSD source tree. The list of
+ files includes ${NETBSDSRCDIR}/sys/sys/param.h
+ (which contains the kernel version number),
+ ${NETBSDSRCDIR}/sys/conf/newvers.sh and
+ ${NETBSDSRCDIR}/sys/conf/osrelease.sh (which
+ interpret the information in sys/sys/param.h), and
+ ${_SRC_TOP_OBJ_}/params (which is an optional file,
+ created by "make build" in ${_SRC_TOP_}/Makefile,
+ containing all the variables that may influence the
+ build).
+
+ Targets that depend on the NetBSD version, or on
+ variables defined at build time, can declare a
+ dependency on ${_NETBSD_VERSION_DEPENDS}, like this:
+
+ version.c: ${_NETBSD_VERSION_DEPENDS}
+ commands to create version.c
+
BSDSRCDIR The real path to the system sources, so that 'make obj'
will work correctly. [/usr/src]
diff -r e5eb6357c07e -r 13c2f26142cf share/mk/bsd.own.mk
--- a/share/mk/bsd.own.mk Sun Nov 04 10:57:33 2012 +0000
+++ b/share/mk/bsd.own.mk Sun Nov 04 10:59:13 2012 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.own.mk,v 1.706 2012/08/16 05:30:55 matt Exp $
+# $NetBSD: bsd.own.mk,v 1.707 2012/11/04 10:59:13 apb Exp $
# This needs to be before bsd.init.mk
.if defined(BSD_MK_COMPAT_FILE)
@@ -107,8 +107,11 @@
.endif # }
#
-# If _SRC_TOP_ != "", we're within the NetBSD source tree, so set
-# defaults for NETBSDSRCDIR and _SRC_TOP_OBJ_.
+# If _SRC_TOP_ != "", we're within the NetBSD source tree.
+# * Set defaults for NETBSDSRCDIR and _SRC_TOP_OBJ_.
+# * Define _NETBSD_VERSION_DEPENDS. Targets that depend on the
+# NetBSD version, or on variables defined at build time, can
+# declare a dependency on ${_NETBSD_VERSION_DEPENDS}.
#
.if (${_SRC_TOP_} != "") # {
@@ -119,6 +122,12 @@
.MAKEOVERRIDES+= _SRC_TOP_OBJ_
.endif
+_NETBSD_VERSION_DEPENDS= ${_SRC_TOP_OBJ_}/params
+_NETBSD_VERSION_DEPENDS+= ${NETBSDSRCDIR}/sys/sys/param.h
+_NETBSD_VERSION_DEPENDS+= ${NETBSDSRCDIR}/sys/conf/newvers.sh
+_NETBSD_VERSION_DEPENDS+= ${NETBSDSRCDIR}/sys/conf/osrelease.sh
+${_SRC_TOP_OBJ_}/params: .NOTMAIN .OPTIONAL # created by top level "make build"
+
.endif # _SRC_TOP_ != "" # }
Home |
Main Index |
Thread Index |
Old Index