Home | History | Annotate | Line # | Download | only in kern
Makefile revision 1.9
      1 #	$NetBSD: Makefile,v 1.9 2000/08/30 23:51:54 jhawk Exp $
      2 #
      3 #	from: @(#)Makefile	8.2 (Berkeley) 3/21/94
      4 
      5 # Makefile for kernel tags files, init_sysent, etc.
      6 
      7 all:
      8 	@echo "make tags, links, init_sysent.c, or vnode_if.c only"
      9 	@false
     10 
     11 SYSCALLSRC = makesyscalls.sh syscalls.conf syscalls.master
     12 init_sysent.c syscalls.c ../sys/syscall.h ../sys/syscallargs.h: ${SYSCALLSRC}
     13 	-mv -f init_sysent.c init_sysent.c.bak
     14 	-mv -f syscalls.c syscalls.c.bak
     15 	-mv -f ../sys/syscall.h ../sys/syscall.h.bak
     16 	-mv -f ../sys/syscallargs.h ../sys/syscallargs.h.bak
     17 	sh makesyscalls.sh syscalls.conf syscalls.master
     18 
     19 VNODEIFSRC = vnode_if.sh vnode_if.src
     20 vnode_if.c ../sys/vnode_if.h: ${VNODEIFSRC}
     21 	-mv -f vnode_if.c vnode_if.c.bak
     22 	-mv -f ../sys/vnode_if.h ../sys/vnode_if.h.bak
     23 	sh vnode_if.sh vnode_if.src
     24 
     25 
     26 # Kernel tags:
     27 # Tags files are built in the top-level directory for each architecture,
     28 # with a makefile listing the architecture-dependent files, etc.  The list
     29 # of common files is in ./Make.tags.inc.  Links to the correct tags file
     30 # are placed in each source directory.  We need to have links to tags files
     31 # from the generic directories that are relative to the machine type, even
     32 # via remote mounts; therefore we use symlinks to $SYSTAGS, which points at
     33 # ${SYSDIR}/arch/${MACHINE}/tags.
     34 
     35 # Note: only a couple of architectures are currently working right. Add more
     36 # to ARCH as you fix them. Use the i386 as a model.
     37 
     38 ARCH=	i386 mac68k
     39 
     40 SYSTAGS=/var/db/sys_tags
     41 SYSDIR=/sys
     42 
     43 .ifmake links
     44 # Directories in which to place tags links (other than machine-dependent):
     45 # The invocation below returns every directory that contains sources, the idea
     46 # being, in the face of a constantly varying source tree, that this will be 
     47 # easier to maintain than a fixed list.
     48 DGEN!=	find -H /sys ! -path "/sys/arch*" -name "*.[chs]" | \
     49 	    sed -e "s@/sys/@@" -e "s@/[^/]*\..*@@" | sort -t / -u
     50 .endif
     51 
     52 tags::
     53 	-for i in ${ARCH}; do \
     54 	    (cd ../arch/$$i && ${MAKE} ${MFLAGS} tags); done
     55 
     56 links::
     57 	rm -f ${SYSTAGS}
     58 	ln -s ${SYSDIR}/arch/${MACHINE}/tags ${SYSTAGS}
     59 	-for i in ${DGEN}; do \
     60 	    (cd ../$$i && { rm -f tags; ln -s ${SYSTAGS} tags; }); done
     61 	-for i in ${ARCH}; do \
     62 	    (cd ../arch/$$i && ${MAKE} ${MFLAGS} SYSTAGS=${SYSTAGS} links); done
     63