allow generated kernel includes and support mips pubassym.cf mechanism

This commit is contained in:
castor 1999-01-15 10:57:36 +00:00
parent c729b2ffeb
commit 45a22daf10
3 changed files with 60 additions and 8 deletions

View File

@ -1,10 +1,5 @@
# $NetBSD: bsd.kinc.mk,v 1.3 1998/12/31 15:28:52 castor Exp $
# $NetBSD: bsd.kinc.mk,v 1.4 1999/01/15 10:57:36 castor Exp $
# Notes:
# * no obj dir support
# * kernel headers are supposed to exist, i.e. they're not
# expected to be built.
#
# System configuration variables:
#
# SYS_INCLUDE "symlinks": symlinks to include directories are created.
@ -24,6 +19,8 @@
#
# INCS Headers to install, if SYS_INCLUDE is copies.
#
# DEPINCS Headers to install which are built dynamically.
#
# SUBDIR Subdirectories to enter
#
# SYMLINKS Symlinks to make (unconditionally), a la bsd.links.mk.
@ -82,6 +79,23 @@ incinstall:: ${DESTDIR}${INCSDIR}
.for I in ${INCS}
incinstall:: ${DESTDIR}${INCSDIR}/$I
.PRECIOUS: ${DESTDIR}${INCSDIR}/$I
.if !defined(UPDATE)
.PHONY: ${DESTDIR}${INCSDIR}/$I
.endif
${DESTDIR}${INCSDIR}/$I: ${DESTDIR}${INCSDIR} $I
@cmp -s ${.CURDIR}/$I ${.TARGET} > /dev/null 2>&1 || \
(echo "${INSTALL} ${PRESERVE} -c -o ${BINOWN} -g ${BINGRP} \
-m ${NONBINMODE} ${.CURDIR}/$I ${.TARGET}" && \
${INSTALL} ${PRESERVE} -c -o ${BINOWN} -g ${BINGRP} \
-m ${NONBINMODE} ${.CURDIR}/$I ${.TARGET})
.endfor
.endif
.if defined(DEPINCS)
.for I in ${DEPINCS}
incinstall:: ${DESTDIR}${INCSDIR}/$I
.PRECIOUS: ${DESTDIR}${INCSDIR}/$I
.if !defined(UPDATE)
.PHONY: ${DESTDIR}${INCSDIR}/$I

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.1 1998/06/12 23:22:41 cgd Exp $
# $NetBSD: Makefile,v 1.2 1999/01/15 10:57:36 castor Exp $
KDIR= /sys/arch/newsmips/include
INCSDIR= /usr/include/newsmips
@ -11,4 +11,23 @@ INCS= adrsmap.h ansi.h aout_machdep.h autoconf.h bsd-aout.h cdefs.h conf.h \
regdef.h regnum.h reloc.h setjmp.h signal.h stdarg.h trap.h types.h \
va-mips.h varargs.h vmparam.h z8530var.h
DEPINCS= pubassym.h
.ifndef S
S= ${.CURDIR}/../../..
.endif
MIPS=$S/arch/mips
CFLAGS+= -I. -D_LKM
pubassym.h: ${MIPS}/mips/genpubassym.cf
ln -sf ${MIPS}/include mips && \
ln -sf ${S}/sys sys && \
ln -sf ${S}/uvm uvm && \
ln -sf ${S}/arch/${MACHINE}/include machine && \
sh ${S}/kern/genassym.sh ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} \
< ${.ALLSRC} > pubassym.h.tmp && \
mv -f pubassym.h.tmp pubassym.h
.include <bsd.kinc.mk>
.include <bsd.obj.mk>

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.1 1998/06/12 23:22:44 cgd Exp $
# $NetBSD: Makefile,v 1.2 1999/01/15 10:57:37 castor Exp $
KDIR= /sys/arch/pmax/include
INCSDIR= /usr/include/pmax
@ -11,4 +11,23 @@ INCS= ansi.h aout_machdep.h autoconf.h bsd-aout.h bus.h cdefs.h \
reg.h regdef.h regnum.h reloc.h setjmp.h signal.h stdarg.h sysconf.h \
tc_machdep.h trap.h types.h varargs.h vmparam.h
DEPINCS= pubassym.h
.ifndef S
S= ${.CURDIR}/../../..
.endif
MIPS=$S/arch/mips
CFLAGS+= -I. -D_LKM
pubassym.h: ${MIPS}/mips/genpubassym.cf
ln -sf ${MIPS}/include mips && \
ln -sf ${S}/sys sys && \
ln -sf ${S}/uvm uvm && \
ln -sf ${S}/arch/${MACHINE}/include machine && \
sh ${S}/kern/genassym.sh ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} \
< ${.ALLSRC} > pubassym.h.tmp && \
mv -f pubassym.h.tmp ${.TARGET}
.include <bsd.kinc.mk>
.include <bsd.obj.mk>