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