Makefile revision 1.6
11.6Sperry#	$NetBSD: Makefile,v 1.6 1998/01/09 08:05:20 perry Exp $
21.6Sperry#
31.6Sperry#	from: @(#)Makefile	8.2 (Berkeley) 3/21/94
41.1Scgd
51.1Scgd# Makefile for kernel tags files, init_sysent, etc.
61.1Scgd
71.1ScgdARCH=	hp300 i386 luna68k news3400 pmax sparc tahoe vax
81.1Scgd
91.1Scgdall:
101.5Scgd	@echo "make tags, links, init_sysent.c, or vnode_if.c only"
111.5Scgd	@false
121.1Scgd
131.2ScgdSYSCALLSRC = makesyscalls.sh syscalls.conf syscalls.master
141.4Smycroftinit_sysent.c syscalls.c ../sys/syscall.h ../sys/syscallargs.h: ${SYSCALLSRC}
151.1Scgd	-mv -f init_sysent.c init_sysent.c.bak
161.1Scgd	-mv -f syscalls.c syscalls.c.bak
171.1Scgd	-mv -f ../sys/syscall.h ../sys/syscall.h.bak
181.3Scgd	-mv -f ../sys/syscallargs.h ../sys/syscallargs.h.bak
191.2Scgd	sh makesyscalls.sh syscalls.conf syscalls.master
201.5Scgd
211.5ScgdVNODEIFSRC = vnode_if.sh vnode_if.src
221.5Scgdvnode_if.c ../sys/vnode_if.h: ${VNODEIFSRC}
231.5Scgd	-mv -f vnode_if.c vnode_if.c.bak
241.5Scgd	-mv -f ../sys/vnode_if.h ../sys/vnode_if.h.bak
251.5Scgd	sh vnode_if.sh vnode_if.src
261.1Scgd
271.1Scgd# Kernel tags:
281.1Scgd# Tags files are built in the top-level directory for each architecture,
291.1Scgd# with a makefile listing the architecture-dependent files, etc.  The list
301.1Scgd# of common files is in ./Make.tags.inc.  Links to the correct tags file
311.1Scgd# are placed in each source directory.  We need to have links to tags files
321.1Scgd# from the generic directories that are relative to the machine type, even
331.1Scgd# via remote mounts; therefore we use symlinks to $SYSTAGS, which points at
341.1Scgd# ${SYSDIR}/${MACHINE}/tags.
351.1Scgd
361.1ScgdSYSTAGS=/var/db/sys_tags
371.1ScgdSYSDIR=/sys
381.1Scgd
391.1Scgd# Directories in which to place tags links (other than machine-dependent)
401.1ScgdDGEN=	conf \
411.1Scgd	dev dev/scsi \
421.1Scgd	hp hp/dev hp/hpux \
431.1Scgd	kern libkern \
441.1Scgd	miscfs miscfs/deadfs miscfs/fdesc miscfs/fifofs miscfs/kernfs \
451.1Scgd	miscfs/lofs miscfs/nullfs miscfs/portal miscfs/procfs \
461.1Scgd	miscfs/specfs miscfs/umapfs miscfs/union \
471.1Scgd	net netccitt netinet netiso netns nfs scripts sys \
481.1Scgd	ufs ufs/ffs ufs/lfs ufs/mfs ufs/ufs \
491.1Scgd	vm
501.1Scgd
511.1Scgdtags::
521.1Scgd	-for i in ${ARCH}; do \
531.1Scgd	    (cd ../$$i && make ${MFLAGS} tags); done
541.1Scgd
551.1Scgdlinks::
561.1Scgd	rm -f ${SYSTAGS}
571.1Scgd	ln -s ${SYSDIR}/${MACHINE}/tags ${SYSTAGS}
581.1Scgd	-for i in ${DGEN}; do \
591.1Scgd	    (cd ../$$i && { rm -f tags; ln -s ${SYSTAGS} tags; }) done
601.1Scgd	-for i in ${ARCH}; do \
611.1Scgd	    (cd ../$$i && make ${MFLAGS} SYSTAGS=${SYSTAGS} links); done
62