replace BSDSRCDIR with _SRC_TOP_, since the latter is more likely to

be "accurate".  document _SRC_TOP_.
This commit is contained in:
lukem 2002-04-10 15:05:41 +00:00
parent 7cd3221242
commit 0476c683f0
12 changed files with 34 additions and 38 deletions

View File

@ -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" .include "../../../Makefile.inc"
# REV is revision without dots, as in "12C" # REV is revision without dots, as in "12C"
# VER is revision with dots, as in "1.2C" # VER is revision with dots, as in "1.2C"
REV!=sh ${BSDSRCDIR}/sys/conf/osrelease.sh -s REV!=sh ${_SRC_TOP_}/sys/conf/osrelease.sh -s
VER!=sh ${BSDSRCDIR}/sys/conf/osrelease.sh VER!=sh ${_SRC_TOP_}/sys/conf/osrelease.sh

View File

@ -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" .include "../../../Makefile.inc"
# REV is revision without dots, as in "12C" # REV is revision without dots, as in "12C"
# VER is revision with dots, as in "1.2C" # VER is revision with dots, as in "1.2C"
REV!=sh ${BSDSRCDIR}/sys/conf/osrelease.sh -s REV!=sh ${_SRC_TOP_}/sys/conf/osrelease.sh -s
VER!=sh ${BSDSRCDIR}/sys/conf/osrelease.sh VER!=sh ${_SRC_TOP_}/sys/conf/osrelease.sh

View File

@ -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 "../../Makefile.inc"
.include <bsd.own.mk> .include <bsd.own.mk>
# REV is revision without dots, as in "15R" # REV is revision without dots, as in "15R"
# VER is revision with dots, as in "1.5R" # VER is revision with dots, as in "1.5R"
REV!=sh ${BSDSRCDIR}/sys/conf/osrelease.sh -s REV!=sh ${_SRC_TOP_}/sys/conf/osrelease.sh -s
VER!=sh ${BSDSRCDIR}/sys/conf/osrelease.sh VER!=sh ${_SRC_TOP_}/sys/conf/osrelease.sh

View File

@ -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" .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 LDSTATIC= -static # only static compilation makes sense here
# Hack needed to find kernel images... # Hack needed to find kernel images...
BSDSRCDIR?= /usr/src SRCSYSDIR?= ${_SRC_TOP_}/sys
SRCSYSDIR?= ${BSDSRCDIR}/sys

View File

@ -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" .include "../../../Makefile.inc"
# REV is revision without dots, as in "14A" # REV is revision without dots, as in "14A"
# VER is revision with dots, as in "1.4A" # VER is revision with dots, as in "1.4A"
REV!=sh ${BSDSRCDIR}/sys/conf/osrelease.sh -s REV!=sh ${_SRC_TOP_}/sys/conf/osrelease.sh -s
VER!=sh ${BSDSRCDIR}/sys/conf/osrelease.sh VER!=sh ${_SRC_TOP_}/sys/conf/osrelease.sh

View File

@ -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" .include "../../../Makefile.inc"
REV!=sh ${BSDSRCDIR}/sys/conf/osrelease.sh -s REV!=sh ${_SRC_TOP_}/sys/conf/osrelease.sh -s

View File

@ -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" .include "../../Makefile.inc"
@ -6,4 +6,4 @@ LDSTATIC= -static # only static compilation makes sense here
# Where to find kernel images... # Where to find kernel images...
.include <bsd.kernobj.mk> .include <bsd.kernobj.mk>
SRCSYSDIR?= ${BSDSRCDIR}/sys SRCSYSDIR?= ${_SRC_TOP_}/sys

View File

@ -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. # This is included by subdirectories building a crunched binary.
# Assume the following are already defined: TOP, CBIN # Assume the following are already defined: TOP, CBIN
@ -19,5 +19,5 @@ ${CBIN}: ${CBIN}.mk ${CBIN}.cache ${CBIN}.c
${STRIP} ${CBIN} ${STRIP} ${CBIN}
${CBIN}.mk ${CBIN}.cache ${CBIN}.c: ${CRUNCHCONF} ${CBIN}.mk ${CBIN}.cache ${CBIN}.c: ${CRUNCHCONF}
${CRUNCHGEN} -D ${BSDSRCDIR} -L ${DESTDIR}/usr/lib ${CRUNCHCONF} ${CRUNCHGEN} -D ${_SRC_TOP_} -L ${DESTDIR}/usr/lib ${CRUNCHCONF}

View File

@ -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 # @(#)bsd.README 8.2 (Berkeley) 4/2/94
This is the README file for the new make "include" files for the BSD 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 bsd.own.mk sets the following variables, if they are not already defined
(defaults are in brackets): (defaults are in brackets):
_SRC_TOP_ Top of the system source tree, as determined by <bsd.own.mk>
based on the presence of build.sh and tools/ .
BSDSRCDIR The real path to the system sources, so that 'make obj' BSDSRCDIR The real path to the system sources, so that 'make obj'
will work correctly. [/usr/src] will work correctly. [/usr/src]
@ -728,10 +731,7 @@ The include file <bsd.kernobj.mk> defines variables related to the
location of kernel sources and object directories. location of kernel sources and object directories.
KERNSRCDIR Is the location of the top of the kernel src. KERNSRCDIR Is the location of the top of the kernel src.
It defaults to ${BSDSRCDIR}/sys, but the top-level It defaults to ${_SRC_TOP_}/sys
Makefile.inc sets it to ${ABSTOP}/sys (ABSTOP is the
absolute path to the directory where the top-level
Makefile.inc was found.
KERNARCHDIR Is the location of the machine dependent kernel KERNARCHDIR Is the location of the machine dependent kernel
sources. It defaults to arch/${MACHINE} sources. It defaults to arch/${MACHINE}

View File

@ -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. # KERNSRCDIR Is the location of the top of the kernel src.
# It defaults to ${BSDSRCDIR}/sys, but the top-level # It defaults to ${_SRC_TOP_}/sys
# Makefile.inc sets it to ${ABSTOP}/sys (ABSTOP is the
# absolute path to the directory where the top-level
# Makefile.inc was found.
# #
# KERNARCHDIR Is the location of the machine dependent kernel # KERNARCHDIR Is the location of the machine dependent kernel
# sources. It defaults to arch/${MACHINE} # sources. It defaults to arch/${MACHINE}
@ -31,7 +28,7 @@
.include <bsd.own.mk> .include <bsd.own.mk>
KERNSRCDIR?= ${BSDSRCDIR}/sys KERNSRCDIR?= ${_SRC_TOP_}/sys
# just incase ${MACHINE} is not always correct # just incase ${MACHINE} is not always correct
KERNARCHDIR?= arch/${MACHINE} KERNARCHDIR?= arch/${MACHINE}

View File

@ -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 # @(#)bsd.lib.mk 8.3 (Berkeley) 4/22/94
.include <bsd.init.mk> .include <bsd.init.mk>
@ -19,10 +19,10 @@ SHLIB_TEENY != . ${SHLIB_VERSION_FILE} ; echo $$teeny
# Check for higher installed library versions. # Check for higher installed library versions.
.if !defined(NOCHECKVER) && !defined(NOCHECKVER_${LIB}) && \ .if !defined(NOCHECKVER) && !defined(NOCHECKVER_${LIB}) && \
exists(${BSDSRCDIR}/lib/checkver) exists(${_SRC_TOP_}/lib/checkver)
checkver: checkver:
@(cd ${.CURDIR} && \ @(cd ${.CURDIR} && \
sh ${BSDSRCDIR}/lib/checkver -v ${SHLIB_VERSION_FILE} \ sh ${_SRC_TOP_}/lib/checkver -v ${SHLIB_VERSION_FILE} \
-d ${DESTDIR}${_LIBSODIR} ${LIB}) -d ${DESTDIR}${_LIBSODIR} ${LIB})
.endif .endif
.endif .endif

View File

@ -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_) .if !defined(_BSD_OWN_MK_)
_BSD_OWN_MK_=1 _BSD_OWN_MK_=1
@ -31,7 +31,7 @@ PRINTOBJDIR= echo # prevent infinite recursion
.endif .endif
.if !defined(_SRC_TOP_) .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 \ _SRC_TOP_!= cd ${.CURDIR}; while :; do \
here=`pwd`; \ here=`pwd`; \
[ -f build.sh ] && [ -d tools ] && { echo $$here; break; }; \ [ -f build.sh ] && [ -d tools ] && { echo $$here; break; }; \