diff --git a/distrib/bebox/floppies/Makefile.inc b/distrib/bebox/floppies/Makefile.inc index b56721125f54..715f3df531d6 100644 --- a/distrib/bebox/floppies/Makefile.inc +++ b/distrib/bebox/floppies/Makefile.inc @@ -1,9 +1,9 @@ -# $NetBSD: Makefile.inc,v 1.2 2000/05/02 16:06:47 sjg Exp $ +# $NetBSD: Makefile.inc,v 1.3 2002/04/10 15:05:41 lukem Exp $ .include "../../../Makefile.inc" # REV is revision without dots, as in "12C" # VER is revision with dots, as in "1.2C" -REV!=sh ${BSDSRCDIR}/sys/conf/osrelease.sh -s -VER!=sh ${BSDSRCDIR}/sys/conf/osrelease.sh +REV!=sh ${_SRC_TOP_}/sys/conf/osrelease.sh -s +VER!=sh ${_SRC_TOP_}/sys/conf/osrelease.sh diff --git a/distrib/evbsh3/rom/Makefile.inc b/distrib/evbsh3/rom/Makefile.inc index 0a71000640cd..e8b2cf2e6dcd 100644 --- a/distrib/evbsh3/rom/Makefile.inc +++ b/distrib/evbsh3/rom/Makefile.inc @@ -1,8 +1,8 @@ -# $NetBSD: Makefile.inc,v 1.1 2000/09/18 07:21:01 msaitoh Exp $ +# $NetBSD: Makefile.inc,v 1.2 2002/04/10 15:05:42 lukem Exp $ .include "../../../Makefile.inc" # REV is revision without dots, as in "12C" # VER is revision with dots, as in "1.2C" -REV!=sh ${BSDSRCDIR}/sys/conf/osrelease.sh -s -VER!=sh ${BSDSRCDIR}/sys/conf/osrelease.sh +REV!=sh ${_SRC_TOP_}/sys/conf/osrelease.sh -s +VER!=sh ${_SRC_TOP_}/sys/conf/osrelease.sh diff --git a/distrib/mipsco/Makefile.inc b/distrib/mipsco/Makefile.inc index c31d241e4c17..d253d9a17b37 100644 --- a/distrib/mipsco/Makefile.inc +++ b/distrib/mipsco/Makefile.inc @@ -1,9 +1,9 @@ -# $NetBSD: Makefile.inc,v 1.1 2001/02/19 07:45:38 wdk Exp $ +# $NetBSD: Makefile.inc,v 1.2 2002/04/10 15:05:42 lukem Exp $ .include "../../Makefile.inc" .include # REV is revision without dots, as in "15R" # VER is revision with dots, as in "1.5R" -REV!=sh ${BSDSRCDIR}/sys/conf/osrelease.sh -s -VER!=sh ${BSDSRCDIR}/sys/conf/osrelease.sh +REV!=sh ${_SRC_TOP_}/sys/conf/osrelease.sh -s +VER!=sh ${_SRC_TOP_}/sys/conf/osrelease.sh diff --git a/distrib/mvme68k/Makefile.inc b/distrib/mvme68k/Makefile.inc index 7cd72dfb5ab5..caebda9026e4 100644 --- a/distrib/mvme68k/Makefile.inc +++ b/distrib/mvme68k/Makefile.inc @@ -1,11 +1,10 @@ -# $NetBSD: Makefile.inc,v 1.3 2000/05/02 16:06:51 sjg Exp $ +# $NetBSD: Makefile.inc,v 1.4 2002/04/10 15:05:43 lukem Exp $ .include "../../../Makefile.inc" -REV!=sh ${BSDSRCDIR}/sys/conf/osrelease.sh -s +REV!=sh ${_SRC_TOP_}/sys/conf/osrelease.sh -s LDSTATIC= -static # only static compilation makes sense here # Hack needed to find kernel images... -BSDSRCDIR?= /usr/src -SRCSYSDIR?= ${BSDSRCDIR}/sys +SRCSYSDIR?= ${_SRC_TOP_}/sys diff --git a/distrib/newsmips/floppies/Makefile.inc b/distrib/newsmips/floppies/Makefile.inc index 4e9ce4051628..c47cc4b8ead9 100644 --- a/distrib/newsmips/floppies/Makefile.inc +++ b/distrib/newsmips/floppies/Makefile.inc @@ -1,8 +1,8 @@ -# $NetBSD: Makefile.inc,v 1.2 2000/05/02 16:06:52 sjg Exp $ +# $NetBSD: Makefile.inc,v 1.3 2002/04/10 15:05:43 lukem Exp $ .include "../../../Makefile.inc" # REV is revision without dots, as in "14A" # VER is revision with dots, as in "1.4A" -REV!=sh ${BSDSRCDIR}/sys/conf/osrelease.sh -s -VER!=sh ${BSDSRCDIR}/sys/conf/osrelease.sh +REV!=sh ${_SRC_TOP_}/sys/conf/osrelease.sh -s +VER!=sh ${_SRC_TOP_}/sys/conf/osrelease.sh diff --git a/distrib/pc532/floppies/Makefile.inc b/distrib/pc532/floppies/Makefile.inc index 4b58f5a36c60..d7e86f328d12 100644 --- a/distrib/pc532/floppies/Makefile.inc +++ b/distrib/pc532/floppies/Makefile.inc @@ -1,5 +1,5 @@ -# $NetBSD: Makefile.inc,v 1.8 2000/05/02 16:06:53 sjg Exp $ +# $NetBSD: Makefile.inc,v 1.9 2002/04/10 15:05:44 lukem Exp $ .include "../../../Makefile.inc" -REV!=sh ${BSDSRCDIR}/sys/conf/osrelease.sh -s +REV!=sh ${_SRC_TOP_}/sys/conf/osrelease.sh -s diff --git a/distrib/sun3/Makefile.inc b/distrib/sun3/Makefile.inc index 357b2c0af357..1ad1b1db88b6 100644 --- a/distrib/sun3/Makefile.inc +++ b/distrib/sun3/Makefile.inc @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.9 2002/03/06 12:15:19 lukem Exp $ +# $NetBSD: Makefile.inc,v 1.10 2002/04/10 15:05:44 lukem Exp $ .include "../../Makefile.inc" @@ -6,4 +6,4 @@ LDSTATIC= -static # only static compilation makes sense here # Where to find kernel images... .include -SRCSYSDIR?= ${BSDSRCDIR}/sys +SRCSYSDIR?= ${_SRC_TOP_}/sys diff --git a/distrib/sun3/common/Make.crunch b/distrib/sun3/common/Make.crunch index 144f5cf8e10e..88bd40cd130a 100644 --- a/distrib/sun3/common/Make.crunch +++ b/distrib/sun3/common/Make.crunch @@ -1,4 +1,4 @@ -# $NetBSD: Make.crunch,v 1.5 2000/11/01 07:58:01 garbled Exp $ +# $NetBSD: Make.crunch,v 1.6 2002/04/10 15:05:44 lukem Exp $ # # This is included by subdirectories building a crunched binary. # Assume the following are already defined: TOP, CBIN @@ -19,5 +19,5 @@ ${CBIN}: ${CBIN}.mk ${CBIN}.cache ${CBIN}.c ${STRIP} ${CBIN} ${CBIN}.mk ${CBIN}.cache ${CBIN}.c: ${CRUNCHCONF} - ${CRUNCHGEN} -D ${BSDSRCDIR} -L ${DESTDIR}/usr/lib ${CRUNCHCONF} + ${CRUNCHGEN} -D ${_SRC_TOP_} -L ${DESTDIR}/usr/lib ${CRUNCHCONF} diff --git a/share/mk/bsd.README b/share/mk/bsd.README index 6c273350678a..90a1c40e539b 100644 --- a/share/mk/bsd.README +++ b/share/mk/bsd.README @@ -1,4 +1,4 @@ -# $NetBSD: bsd.README,v 1.94 2002/03/22 18:12:08 thorpej Exp $ +# $NetBSD: bsd.README,v 1.95 2002/04/10 15:05:45 lukem Exp $ # @(#)bsd.README 8.2 (Berkeley) 4/2/94 This is the README file for the new make "include" files for the BSD @@ -192,6 +192,9 @@ is included. These files may define any of the variables described below. bsd.own.mk sets the following variables, if they are not already defined (defaults are in brackets): +_SRC_TOP_ Top of the system source tree, as determined by + based on the presence of build.sh and tools/ . + BSDSRCDIR The real path to the system sources, so that 'make obj' will work correctly. [/usr/src] @@ -728,10 +731,7 @@ The include file defines variables related to the location of kernel sources and object directories. KERNSRCDIR Is the location of the top of the kernel src. - It defaults to ${BSDSRCDIR}/sys, but the top-level - Makefile.inc sets it to ${ABSTOP}/sys (ABSTOP is the - absolute path to the directory where the top-level - Makefile.inc was found. + It defaults to ${_SRC_TOP_}/sys KERNARCHDIR Is the location of the machine dependent kernel sources. It defaults to arch/${MACHINE} diff --git a/share/mk/bsd.kernobj.mk b/share/mk/bsd.kernobj.mk index d3b6b0aaade1..a234c186ba4b 100644 --- a/share/mk/bsd.kernobj.mk +++ b/share/mk/bsd.kernobj.mk @@ -1,10 +1,7 @@ -# $NetBSD: bsd.kernobj.mk,v 1.7 2001/11/27 05:39:03 jmc Exp $ +# $NetBSD: bsd.kernobj.mk,v 1.8 2002/04/10 15:05:45 lukem Exp $ # KERNSRCDIR Is the location of the top of the kernel src. -# It defaults to ${BSDSRCDIR}/sys, but the top-level -# Makefile.inc sets it to ${ABSTOP}/sys (ABSTOP is the -# absolute path to the directory where the top-level -# Makefile.inc was found. +# It defaults to ${_SRC_TOP_}/sys # # KERNARCHDIR Is the location of the machine dependent kernel # sources. It defaults to arch/${MACHINE} @@ -31,7 +28,7 @@ .include -KERNSRCDIR?= ${BSDSRCDIR}/sys +KERNSRCDIR?= ${_SRC_TOP_}/sys # just incase ${MACHINE} is not always correct KERNARCHDIR?= arch/${MACHINE} diff --git a/share/mk/bsd.lib.mk b/share/mk/bsd.lib.mk index 8abdb49cd78c..8340c535550d 100644 --- a/share/mk/bsd.lib.mk +++ b/share/mk/bsd.lib.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.lib.mk,v 1.199 2002/03/19 22:17:23 lukem Exp $ +# $NetBSD: bsd.lib.mk,v 1.200 2002/04/10 15:05:45 lukem Exp $ # @(#)bsd.lib.mk 8.3 (Berkeley) 4/22/94 .include @@ -19,10 +19,10 @@ SHLIB_TEENY != . ${SHLIB_VERSION_FILE} ; echo $$teeny # Check for higher installed library versions. .if !defined(NOCHECKVER) && !defined(NOCHECKVER_${LIB}) && \ - exists(${BSDSRCDIR}/lib/checkver) + exists(${_SRC_TOP_}/lib/checkver) checkver: @(cd ${.CURDIR} && \ - sh ${BSDSRCDIR}/lib/checkver -v ${SHLIB_VERSION_FILE} \ + sh ${_SRC_TOP_}/lib/checkver -v ${SHLIB_VERSION_FILE} \ -d ${DESTDIR}${_LIBSODIR} ${LIB}) .endif .endif diff --git a/share/mk/bsd.own.mk b/share/mk/bsd.own.mk index e8f4c52730dc..d975a2de601f 100644 --- a/share/mk/bsd.own.mk +++ b/share/mk/bsd.own.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.own.mk,v 1.283 2002/04/08 12:25:22 wiz Exp $ +# $NetBSD: bsd.own.mk,v 1.284 2002/04/10 15:05:45 lukem Exp $ .if !defined(_BSD_OWN_MK_) _BSD_OWN_MK_=1 @@ -31,7 +31,7 @@ PRINTOBJDIR= echo # prevent infinite recursion .endif .if !defined(_SRC_TOP_) -# Find the top of the source tree to see if we're inside of $BSDSRCDIR +# Find the actual top of the source tree _SRC_TOP_!= cd ${.CURDIR}; while :; do \ here=`pwd`; \ [ -f build.sh ] && [ -d tools ] && { echo $$here; break; }; \