Makefile revision 1.10
11.10Sjhawk#	$NetBSD: Makefile,v 1.10 2001/04/05 19:49:40 jhawk 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.1Scgdall:
81.5Scgd	@echo "make tags, links, init_sysent.c, or vnode_if.c only"
91.5Scgd	@false
101.1Scgd
111.2ScgdSYSCALLSRC = makesyscalls.sh syscalls.conf syscalls.master
121.4Smycroftinit_sysent.c syscalls.c ../sys/syscall.h ../sys/syscallargs.h: ${SYSCALLSRC}
131.1Scgd	-mv -f init_sysent.c init_sysent.c.bak
141.1Scgd	-mv -f syscalls.c syscalls.c.bak
151.1Scgd	-mv -f ../sys/syscall.h ../sys/syscall.h.bak
161.3Scgd	-mv -f ../sys/syscallargs.h ../sys/syscallargs.h.bak
171.2Scgd	sh makesyscalls.sh syscalls.conf syscalls.master
181.5Scgd
191.5ScgdVNODEIFSRC = vnode_if.sh vnode_if.src
201.5Scgdvnode_if.c ../sys/vnode_if.h: ${VNODEIFSRC}
211.5Scgd	-mv -f vnode_if.c vnode_if.c.bak
221.5Scgd	-mv -f ../sys/vnode_if.h ../sys/vnode_if.h.bak
231.5Scgd	sh vnode_if.sh vnode_if.src
241.1Scgd
251.7Sperry
261.1Scgd# Kernel tags:
271.1Scgd# Tags files are built in the top-level directory for each architecture,
281.1Scgd# with a makefile listing the architecture-dependent files, etc.  The list
291.1Scgd# of common files is in ./Make.tags.inc.  Links to the correct tags file
301.1Scgd# are placed in each source directory.  We need to have links to tags files
311.1Scgd# from the generic directories that are relative to the machine type, even
321.1Scgd# via remote mounts; therefore we use symlinks to $SYSTAGS, which points at
331.8Sperry# ${SYSDIR}/arch/${MACHINE}/tags.
341.7Sperry
351.8Sperry# Note: only a couple of architectures are currently working right. Add more
361.8Sperry# to ARCH as you fix them. Use the i386 as a model.
371.8Sperry
381.8SperryARCH=	i386 mac68k
391.1Scgd
401.1ScgdSYSTAGS=/var/db/sys_tags
411.10SjhawkSYSDIR=..
421.1Scgd
431.8Sperry.ifmake links
441.8Sperry# Directories in which to place tags links (other than machine-dependent):
451.8Sperry# The invocation below returns every directory that contains sources, the idea
461.8Sperry# being, in the face of a constantly varying source tree, that this will be 
471.8Sperry# easier to maintain than a fixed list.
481.10SjhawkDGEN!=	(cd ${SYSDIR};							\
491.10Sjhawk	    find -H . -name arch -prune -o -name "*.[chs]" -print |	\
501.10Sjhawk	    sed -e 's@^\./@@' -e 's@/[^/]*\..*@@' | sort -t / -u )
511.8Sperry.endif
521.1Scgd
531.1Scgdtags::
541.1Scgd	-for i in ${ARCH}; do \
551.9Sjhawk	    (cd ../arch/$$i && ${MAKE} ${MFLAGS} tags); done
561.1Scgd
571.1Scgdlinks::
581.1Scgd	rm -f ${SYSTAGS}
591.8Sperry	ln -s ${SYSDIR}/arch/${MACHINE}/tags ${SYSTAGS}
601.1Scgd	-for i in ${DGEN}; do \
611.8Sperry	    (cd ../$$i && { rm -f tags; ln -s ${SYSTAGS} tags; }); done
621.1Scgd	-for i in ${ARCH}; do \
631.9Sjhawk	    (cd ../arch/$$i && ${MAKE} ${MFLAGS} SYSTAGS=${SYSTAGS} links); done
64