2003-10-26 10:25:33 +03:00
|
|
|
# $NetBSD: Makefile,v 1.11 2003/10/26 07:25:38 lukem Exp $
|
1998-01-09 11:03:16 +03:00
|
|
|
#
|
|
|
|
# from: @(#)Makefile 8.2 (Berkeley) 3/21/94
|
1994-12-03 10:42:51 +03:00
|
|
|
|
|
|
|
# Makefile for kernel tags files, init_sysent, etc.
|
|
|
|
|
2003-10-26 10:25:33 +03:00
|
|
|
.include <bsd.sys.mk> # for HOST_SH
|
|
|
|
|
1994-12-03 10:42:51 +03:00
|
|
|
all:
|
1996-02-29 23:54:58 +03:00
|
|
|
@echo "make tags, links, init_sysent.c, or vnode_if.c only"
|
|
|
|
@false
|
1994-12-03 10:42:51 +03:00
|
|
|
|
1994-12-23 13:08:25 +03:00
|
|
|
SYSCALLSRC = makesyscalls.sh syscalls.conf syscalls.master
|
1996-02-29 19:02:30 +03:00
|
|
|
init_sysent.c syscalls.c ../sys/syscall.h ../sys/syscallargs.h: ${SYSCALLSRC}
|
1994-12-03 10:42:51 +03:00
|
|
|
-mv -f init_sysent.c init_sysent.c.bak
|
|
|
|
-mv -f syscalls.c syscalls.c.bak
|
|
|
|
-mv -f ../sys/syscall.h ../sys/syscall.h.bak
|
1995-11-23 02:11:32 +03:00
|
|
|
-mv -f ../sys/syscallargs.h ../sys/syscallargs.h.bak
|
2003-10-26 10:25:33 +03:00
|
|
|
${HOST_SH} makesyscalls.sh syscalls.conf syscalls.master
|
1994-12-03 10:42:51 +03:00
|
|
|
|
1996-02-29 23:54:58 +03:00
|
|
|
VNODEIFSRC = vnode_if.sh vnode_if.src
|
|
|
|
vnode_if.c ../sys/vnode_if.h: ${VNODEIFSRC}
|
|
|
|
-mv -f vnode_if.c vnode_if.c.bak
|
|
|
|
-mv -f ../sys/vnode_if.h ../sys/vnode_if.h.bak
|
2003-10-26 10:25:33 +03:00
|
|
|
${HOST_SH} vnode_if.sh vnode_if.src
|
1996-02-29 23:54:58 +03:00
|
|
|
|
1998-09-14 03:50:39 +04:00
|
|
|
|
1994-12-03 10:42:51 +03:00
|
|
|
# Kernel tags:
|
|
|
|
# Tags files are built in the top-level directory for each architecture,
|
|
|
|
# with a makefile listing the architecture-dependent files, etc. The list
|
|
|
|
# of common files is in ./Make.tags.inc. Links to the correct tags file
|
|
|
|
# are placed in each source directory. We need to have links to tags files
|
|
|
|
# from the generic directories that are relative to the machine type, even
|
|
|
|
# via remote mounts; therefore we use symlinks to $SYSTAGS, which points at
|
1998-11-15 23:36:30 +03:00
|
|
|
# ${SYSDIR}/arch/${MACHINE}/tags.
|
1994-12-03 10:42:51 +03:00
|
|
|
|
1998-11-15 23:36:30 +03:00
|
|
|
# Note: only a couple of architectures are currently working right. Add more
|
|
|
|
# to ARCH as you fix them. Use the i386 as a model.
|
|
|
|
|
|
|
|
ARCH= i386 mac68k
|
1998-09-14 03:50:39 +04:00
|
|
|
|
1994-12-03 10:42:51 +03:00
|
|
|
SYSTAGS=/var/db/sys_tags
|
2001-04-05 23:49:40 +04:00
|
|
|
SYSDIR=..
|
1994-12-03 10:42:51 +03:00
|
|
|
|
1998-11-15 23:36:30 +03:00
|
|
|
.ifmake links
|
|
|
|
# Directories in which to place tags links (other than machine-dependent):
|
|
|
|
# The invocation below returns every directory that contains sources, the idea
|
|
|
|
# being, in the face of a constantly varying source tree, that this will be
|
|
|
|
# easier to maintain than a fixed list.
|
2001-04-05 23:49:40 +04:00
|
|
|
DGEN!= (cd ${SYSDIR}; \
|
|
|
|
find -H . -name arch -prune -o -name "*.[chs]" -print | \
|
|
|
|
sed -e 's@^\./@@' -e 's@/[^/]*\..*@@' | sort -t / -u )
|
1998-11-15 23:36:30 +03:00
|
|
|
.endif
|
1994-12-03 10:42:51 +03:00
|
|
|
|
|
|
|
tags::
|
|
|
|
-for i in ${ARCH}; do \
|
2000-08-31 03:51:46 +04:00
|
|
|
(cd ../arch/$$i && ${MAKE} ${MFLAGS} tags); done
|
1994-12-03 10:42:51 +03:00
|
|
|
|
|
|
|
links::
|
|
|
|
rm -f ${SYSTAGS}
|
1998-11-15 23:36:30 +03:00
|
|
|
ln -s ${SYSDIR}/arch/${MACHINE}/tags ${SYSTAGS}
|
1994-12-03 10:42:51 +03:00
|
|
|
-for i in ${DGEN}; do \
|
1998-11-15 23:36:30 +03:00
|
|
|
(cd ../$$i && { rm -f tags; ln -s ${SYSTAGS} tags; }); done
|
1994-12-03 10:42:51 +03:00
|
|
|
-for i in ${ARCH}; do \
|
2000-08-31 03:51:46 +04:00
|
|
|
(cd ../arch/$$i && ${MAKE} ${MFLAGS} SYSTAGS=${SYSTAGS} links); done
|