xref: /original-bsd/sys/kern/Makefile (revision 50d6ebba)
1#
2# Copyright (c) 1986 The Regents of the University of California.
3# All rights reserved.
4#
5# Redistribution and use in source and binary forms are permitted
6# provided that the above copyright notice and this paragraph are
7# duplicated in all such forms and that any documentation,
8# advertising materials, and other materials related to such
9# distribution and use acknowledge that the software was developed
10# by the University of California, Berkeley.  The name of the
11# University may not be used to endorse or promote products derived
12# from this software without specific prior written permission.
13# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
14# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
15# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
16#
17#	@(#)Makefile	7.8 (Berkeley) 06/21/90
18#
19# Put the ../sys stuff near the end so that subroutine definitions win when
20# there is a struct tag with the same name (eg., vmmeter).  The real
21# solution would probably be for ctags to generate "struct vmmeter" tags.
22
23COMM=	../net/*.[ch] ../netimp/*.[ch] ../netinet/*.[ch] ../netns/*.[ch] \
24	../kern/*.[ch] ../ufs/*.[ch] ../nfs/*.[ch]
25HDR=	../sys/*.h
26TVAX=	../vax/tags
27SVAX=	../vaxif/*.[ch]  ../vaxmba/*.[ch] ../vaxuba/*.[ch] ../vax/*.[ch]
28AVAX=	../vax/*.s
29
30TTAHOE=	../tahoe/tags
31STAHOE=	../tahoeif/*.[ch]  ../tahoevba/*.[ch] ../tahoe/*.[ch]
32ATAHOE=	../tahoe/*.s
33
34THP300=	../hp300/tags
35SHP300=	 ../hpux/*.[ch]../hpdev/*.[ch] ../hp300/*.[ch]
36AHP300=	../hp300/*.s
37
38# Directories in which to place tags links (other than primary T$MACH)
39DGEN=	kern sys net netimp netinet netns ufs
40DVAX=	vaxif vaxmba vaxuba
41DTAHOE=	tahoeif tahoevba
42DHP300=	hpdev hpux
43
44all:
45	@echo "make tags or links only"
46
47tags: tahoetags vaxtags hp300tags
48
49tahoetags:
50	-ctags -dtf ${TTAHOE} ${COMM} ${STAHOE} ${HDR}
51	egrep "^SCBVEC(.*)" ${ATAHOE} | \
52sed "s;\([^:]*\):\([^(]*\)(\([^, )]*\)\(.*\);X\3 \1 /^\2(\3\4$$/;" \
53		>> ${TTAHOE}
54	egrep "^ENTRY(.*)|^JSBENTRY(.*)" ${ATAHOE} | \
55sed "s;\([^:]*\):\([^(]*\)(\([^, )]*\)\(.*\);\3 \1 /^\2(\3\4$$/;" \
56		>> ${TTAHOE}
57	sort -o ${TTAHOE} ${TTAHOE}
58
59vaxtags:
60	-ctags -dtf ${TVAX} ${COMM} ${SVAX} ${HDR}
61	egrep "^SCBVEC(.*)" ${AVAX} | \
62sed "s;\([^:]*\):\([^(]*\)(\([^, )]*\)\(.*\);X\3 \1 /^\2(\3\4$$/;" \
63		>> ${TVAX}
64	egrep "^ENTRY(.*)|^JSBENTRY(.*)" ${AVAX} | \
65sed "s;\([^:]*\):\([^(]*\)(\([^, )]*\)\(.*\);\3 \1 /^\2(\3\4$$/;" \
66		>> ${TVAX}
67	sort -o ${TVAX} ${TVAX}
68
69hp300tags:
70	-ctags -dtf ${THP300} ${COMM} ${SHP300} ${HDR}
71	egrep "^ENTRY(.*)|^ALTENTRY(.*)" ${AHP300} | \
72sed "s;\([^:]*\):\([^(]*\)(\([^, )]*\)\(.*\);\3 \1 /^\2(\3\4$$/;" \
73		>> ${THP300}
74	sort -o ${THP300} ${THP300}
75
76links:
77	-for i in ${DVAX}; do \
78	    rm -f ../$$i/tags; ln -s ../vax/tags ../$$i/tags; done
79	-for i in ${DTAHOE}; do \
80	    rm -f ../$$i/tags; ln -s ../tahoe/tags ../$$i/tags; done
81	-for i in ${DHP300}; do \
82	    rm -f ../$$i/tags; ln -s ../tahoe/tags ../$$i/tags; done
83	-for i in ${DGEN}; do \
84	    rm -f ../$$i/tags; \
85	    ln -s ../machine/tags ../$$i/tags; done
86
87init_sysent.c syscalls.c ../sys/syscall.h: makesyscalls.sh syscalls.master
88	-mv -f init_sysent.c init_sysent.c.bak
89	-mv -f syscalls.c syscalls.c.bak
90	-mv -f ../sys/syscall.h ../sys/syscall.h.bak
91	sh makesyscalls.sh syscalls.master
92