From a434bb704515c0ca25c449f8d2ea8372b2dc492c Mon Sep 17 00:00:00 2001 From: sjg Date: Tue, 2 May 2000 03:43:15 +0000 Subject: [PATCH] Added bsd.kernobj.mk to centralize the magic for the location of kernel configs and compiles. Relies on BSDSRCDIR being set which is now handled by src/Makefile.inc if need be. --- share/mk/Makefile | 4 ++-- share/mk/bsd.kernobj.mk | 26 ++++++++++++++++++++++++++ 2 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 share/mk/bsd.kernobj.mk diff --git a/share/mk/Makefile b/share/mk/Makefile index 45885a34c885..e8a0d93b7c7d 100644 --- a/share/mk/Makefile +++ b/share/mk/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.27 1999/09/14 01:31:11 perry Exp $ +# $NetBSD: Makefile,v 1.28 2000/05/02 03:43:15 sjg Exp $ # @(#)Makefile 8.1 (Berkeley) 6/8/93 .include @@ -6,7 +6,7 @@ .if ${MKSHARE} != "no" FILES= bsd.README bsd.crypto.mk bsd.doc.mk bsd.dep.mk \ bsd.depall.mk bsd.files.mk bsd.hostprog.mk \ - bsd.inc.mk bsd.info.mk bsd.kinc.mk bsd.kmod.mk \ + bsd.inc.mk bsd.info.mk bsd.kernobj.mk bsd.kinc.mk bsd.kmod.mk \ bsd.lib.mk bsd.links.mk bsd.man.mk bsd.nls.mk \ bsd.obj.mk bsd.own.mk bsd.prog.mk \ bsd.subdir.mk bsd.sys.mk sys.mk diff --git a/share/mk/bsd.kernobj.mk b/share/mk/bsd.kernobj.mk new file mode 100644 index 000000000000..ac139bef327c --- /dev/null +++ b/share/mk/bsd.kernobj.mk @@ -0,0 +1,26 @@ +# $NetBSD: bsd.kernobj.mk,v 1.1 2000/05/02 03:43:15 sjg Exp $ + +# KERNSRCDIR points to kernel source; it is set by default to ../sys, +# but can be overridden. +# KERNARCHDIR is the directory under kernel source that holds the md +# stuff. Default is arch/${MACHINE}. +# KERNOBJDIR is the kernel build directory, it defaults to +# ${MAKEOBJDIRPREFIX}${KERNSRCDIR}/${KERNARCHDIR}/compile/KERNELNAME +# if ${MAKEOBJDIRPREFIX}${KERNSRCDIR}/${KERNARCHDIR}/compile +# exists otherwise it defaults to +# ${KERNSRCDIR}/${KERNARCHDIR}/compile/KERNELNAME, but can be +# overridden. Or +# KERNCONFDIR is where the configuration files for kernels are found; +# default is ${KERNSRCDIR}/${KERNARCHDIR}/conf but can be overridden. + +# we need a top level Makefile.inc to set BSDSRCDIR +KERNSRCDIR?= ${BSDSRCDIR}/sys +# just incase ${MACHINE} is not always correct +KERNARCHDIR?= arch/${MACHINE} + +.if exists(${MAKEOBJDIRPREFIX}${KERNSRCDIR}/${KERNARCHDIR}/compile) +KERNOBJDIR?= ${MAKEOBJDIRPREFIX}${KERNSRCDIR}/${KERNARCHDIR}/compile +.else +KERNOBJDIR?= ${KERNSRCDIR}/${KERNARCHDIR}/compile +.endif +KERNCONFDIR?= ${KERNSRCDIR}/${KERNARCHDIR}/conf