unmap (user) address space early enough to allow sleep (if releasing
[unix-history] / usr / src / sys / kern / Makefile
index d88784c..c8c4237 100644 (file)
@@ -1,91 +1,49 @@
-#
-# Copyright (c) 1986 The Regents of the University of California.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms are permitted
-# provided that the above copyright notice and this paragraph are
-# duplicated in all such forms and that any documentation,
-# advertising materials, and other materials related to such
-# distribution and use acknowledge that the software was developed
-# by the University of California, Berkeley.  The name of the
-# University may not be used to endorse or promote products derived
-# from this software without specific prior written permission.
-# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
-# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
-# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-#
-#      @(#)Makefile    7.9 (Berkeley) %G%
-#
-# Put the ../sys stuff near the end so that subroutine definitions win when
-# there is a struct tag with the same name (eg., vmmeter).  The real
-# solution would probably be for ctags to generate "struct vmmeter" tags.
+#      @(#)Makefile    7.13 (Berkeley) %G%
 
 
-COMM=  ../net/*.[ch] ../netimp/*.[ch] ../netinet/*.[ch] ../netns/*.[ch] \
-       ../kern/*.[ch] ../ufs/*.[ch] ../nfs/*.[ch] ../vm/*.[ch]
-HDR=   ../sys/*.h
-TVAX=  ../vax/tags
-SVAX=  ../vaxif/*.[ch]  ../vaxmba/*.[ch] ../vaxuba/*.[ch] ../vax/*.[ch]
-AVAX=  ../vax/*.s
+# Makefile for kernel tags files, init_systent, etc.
 
 
-TTAHOE=        ../tahoe/tags
-STAHOE=        ../tahoeif/*.[ch]  ../tahoevba/*.[ch] ../tahoe/*.[ch]
-ATAHOE=        ../tahoe/*.s
+ARCH=  vax tahoe hp300 i386
 
 
-THP300=        ../hp300/tags
-SHP300=         ../hpux/*.[ch]../hpdev/*.[ch] ../hp300/*.[ch]
-AHP300=        ../hp300/*.s
+all:
+       @echo "make tags, make links or init_sysent.c only"
 
 
-# Directories in which to place tags links (other than primary T$MACH)
-DGEN=  kern sys net netimp netinet netns ufs
-DVAX=  vaxif vaxmba vaxuba
-DTAHOE=        tahoeif tahoevba
-DHP300=        hpdev hpux
+init_sysent.c syscalls.c ../sys/syscall.h: makesyscalls.sh syscalls.master
+       -mv -f init_sysent.c init_sysent.c.bak
+       -mv -f syscalls.c syscalls.c.bak
+       -mv -f ../sys/syscall.h ../sys/syscall.h.bak
+       sh makesyscalls.sh syscalls.master
 
 
-all:
-       @echo "make tags or links only"
+# Kernel tags:
+# We need to have links to tags files from the generic directories
+# that are relative to the machine type, even via remote mounts;
+# therefore we use symlinks to $SYSTAGS, which points at
+# ${SYSDIR}/${MACHINE}/tags.
 
 
-tags: tahoetags vaxtags hp300tags
+SYSTAGS=/var/db/sys_tags
+SYSDIR=/sys
 
 
-tahoetags:
-       -ctags -dtf ${TTAHOE} ${COMM} ${STAHOE} ${HDR}
-       egrep "^SCBVEC(.*)" ${ATAHOE} | \
-sed "s;\([^:]*\):\([^(]*\)(\([^, )]*\)\(.*\);X\3 \1 /^\2(\3\4$$/;" \
-               >> ${TTAHOE}
-       egrep "^ENTRY(.*)|^JSBENTRY(.*)" ${ATAHOE} | \
-sed "s;\([^:]*\):\([^(]*\)(\([^, )]*\)\(.*\);\3 \1 /^\2(\3\4$$/;" \
-               >> ${TTAHOE}
-       sort -o ${TTAHOE} ${TTAHOE}
+# Put the ../sys stuff near the end so that subroutine definitions win when
+# there is a struct tag with the same name (eg., vmmeter).  The real
+# solution would probably be for ctags to generate "struct vmmeter" tags.
 
 
-vaxtags:
-       -ctags -dtf ${TVAX} ${COMM} ${SVAX} ${HDR}
-       egrep "^SCBVEC(.*)" ${AVAX} | \
-sed "s;\([^:]*\):\([^(]*\)(\([^, )]*\)\(.*\);X\3 \1 /^\2(\3\4$$/;" \
-               >> ${TVAX}
-       egrep "^ENTRY(.*)|^JSBENTRY(.*)" ${AVAX} | \
-sed "s;\([^:]*\):\([^(]*\)(\([^, )]*\)\(.*\);\3 \1 /^\2(\3\4$$/;" \
-               >> ${TVAX}
-       sort -o ${TVAX} ${TVAX}
+COMM=  ../net/*.[ch] ../netimp/*.[ch] ../netinet/*.[ch] ../netns/*.[ch] \
+       ../netiso/*.[ch] ../netccitt/*.[ch] \
+       ../kern/*.c ../ufs/*.[ch] ../nfs/*.[ch] ../vm/*.[ch] ../sys/*.h
+
+# Directories in which to place tags links (other than machine-dependent)
+DGEN=  kern sys net netimp netinet netns netccitt nfs ufs vm
 
 
-hp300tags:
-       -ctags -dtf ${THP300} ${COMM} ${SHP300} ${HDR}
-       egrep "^ENTRY(.*)|^ALTENTRY(.*)" ${AHP300} | \
-sed "s;\([^:]*\):\([^(]*\)(\([^, )]*\)\(.*\);\3 \1 /^\2(\3\4$$/;" \
-               >> ${THP300}
-       sort -o ${THP300} ${THP300}
+tags: FRC
+       -for i in ${ARCH}; do \
+           cd ../$$i && make ${MFLAGS} tags; done
 
 
-links:
-       -for i in ${DVAX}; do \
-           rm -f ../$$i/tags; ln -s ../vax/tags ../$$i/tags; done
-       -for i in ${DTAHOE}; do \
-           rm -f ../$$i/tags; ln -s ../tahoe/tags ../$$i/tags; done
-       -for i in ${DHP300}; do \
-           rm -f ../$$i/tags; ln -s ../tahoe/tags ../$$i/tags; done
+links: ${SYSTAGS}
        -for i in ${DGEN}; do \
        -for i in ${DGEN}; do \
-           rm -f ../$$i/tags; \
-           ln -s ../machine/tags ../$$i/tags; done
+           cd $$i && rm -f tags; ln -s ${SYSTAGS} tags; done
+       -for i in ${ARCH}; do \
+           cd ../$$i && make ${MFLAGS} links; done
 
 
-init_sysent.c syscalls.c ../sys/syscall.h: makesyscalls.sh syscalls.master
-       -mv -f init_sysent.c init_sysent.c.bak
-       -mv -f syscalls.c syscalls.c.bak
-       -mv -f ../sys/syscall.h ../sys/syscall.h.bak
-       sh makesyscalls.sh syscalls.master
+${SYSTAGS}:
+       ln -s ${SYSDIR}/${MACHINE}/tags ${SYSTAGS}
+
+FRC: