Makefile revision 1.4
1#	@(#)Makefile	8.2 (Berkeley) 3/21/94
2
3# Makefile for kernel tags files, init_sysent, etc.
4
5ARCH=	hp300 i386 luna68k news3400 pmax sparc tahoe vax
6
7all:
8	@echo "make tags, make links or init_sysent.c only"
9
10SYSCALLSRC = makesyscalls.sh syscalls.conf syscalls.master
11init_sysent.c syscalls.c ../sys/syscall.h ../sys/syscallargs.h: ${SYSCALLSRC}
12	-mv -f init_sysent.c init_sysent.c.bak
13	-mv -f syscalls.c syscalls.c.bak
14	-mv -f ../sys/syscall.h ../sys/syscall.h.bak
15	-mv -f ../sys/syscallargs.h ../sys/syscallargs.h.bak
16	sh makesyscalls.sh syscalls.conf syscalls.master
17
18# Kernel tags:
19# Tags files are built in the top-level directory for each architecture,
20# with a makefile listing the architecture-dependent files, etc.  The list
21# of common files is in ./Make.tags.inc.  Links to the correct tags file
22# are placed in each source directory.  We need to have links to tags files
23# from the generic directories that are relative to the machine type, even
24# via remote mounts; therefore we use symlinks to $SYSTAGS, which points at
25# ${SYSDIR}/${MACHINE}/tags.
26
27SYSTAGS=/var/db/sys_tags
28SYSDIR=/sys
29
30# Directories in which to place tags links (other than machine-dependent)
31DGEN=	conf \
32	dev dev/scsi \
33	hp hp/dev hp/hpux \
34	kern libkern \
35	miscfs miscfs/deadfs miscfs/fdesc miscfs/fifofs miscfs/kernfs \
36	miscfs/lofs miscfs/nullfs miscfs/portal miscfs/procfs \
37	miscfs/specfs miscfs/umapfs miscfs/union \
38	net netccitt netinet netiso netns nfs scripts sys \
39	ufs ufs/ffs ufs/lfs ufs/mfs ufs/ufs \
40	vm
41
42tags::
43	-for i in ${ARCH}; do \
44	    (cd ../$$i && make ${MFLAGS} tags); done
45
46links::
47	rm -f ${SYSTAGS}
48	ln -s ${SYSDIR}/${MACHINE}/tags ${SYSTAGS}
49	-for i in ${DGEN}; do \
50	    (cd ../$$i && { rm -f tags; ln -s ${SYSTAGS} tags; }) done
51	-for i in ${ARCH}; do \
52	    (cd ../$$i && make ${MFLAGS} SYSTAGS=${SYSTAGS} links); done
53