xref: /original-bsd/sys/kern/Makefile (revision 95a66346)
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.11 (Berkeley) 03/24/91
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	../netiso/*.[ch] ../netccitt/*.[ch] \
25	../sys/*.h ../kern/*.c ../ufs/*.[ch] ../nfs/*.[ch] ../vm/*.[ch]
26TVAX=	../vax/tags
27SVAX=	../vax/if/*.[ch]  ../vax/mba/*.[ch] ../vax/uba/*.[ch] \
28	../vax/bi/*.[ch] ../vax/vax/*.[ch] ../vax/include/*.h
29AVAX=	../vax/vax/*.s
30
31TTAHOE=	../tahoe/tags
32STAHOE=	../tahoe/if/*.[ch]  ../tahoe/vba/*.[ch] ../tahoe/align/*.[ch] ../tahoe/math/*.h ../tahoe/tahoe/*.[ch] ../tahoe/include/*.h
33ATAHOE=	../tahoe/tahoe/*.s ../tahoe/math/*.s
34
35THP300=	../hp300/tags
36SHP300=	../hp300/hpux/*.[ch] ../hp300/dev/*.[ch] ../hp300/hp300/*.[ch] \
37	../hp300/include/*.h
38AHP300=	../hp300/hp300/*.s
39
40TI386=	../i386/tags
41SI386=	../i386/isa/*.[ch] ../i386/i386/*.[ch] ../i386/include/*.h
42AI386=	../i386/i386/*.s
43
44# Directories in which to place tags links (other than primary T$MACH)
45DGEN=	kern sys net netimp netinet netns ufs
46DVAX=	vax/if vax/mba vax/uba vax/bi vax/vax vax/include
47DTAHOE=	tahoe/if tahoe/vba tahoe/align tahoe/math tahoe/include tahoe/tahoe
48DHP300=	hp300/dev hp300/hpux hp300/hp300 hp300/include
49DI386=	i386/isa i386/i386 i386/include
50
51all:
52	@echo "make tags or links only"
53
54tags: tahoetags vaxtags hp300tags i386tags
55
56tahoetags:
57	-ctags -dtf ${TTAHOE} ${COMM} ${STAHOE}
58	egrep "^SCBVEC(.*)" ${ATAHOE} | \
59sed "s;\([^:]*\):\([^(]*\)(\([^, )]*\)\(.*\);X\3 \1 /^\2(\3\4$$/;" \
60		>> ${TTAHOE}
61	egrep "^ENTRY(.*)|^JSBENTRY(.*)" ${ATAHOE} | \
62sed "s;\([^:]*\):\([^(]*\)(\([^, )]*\)\(.*\);\3 \1 /^\2(\3\4$$/;" \
63		>> ${TTAHOE}
64	sort -o ${TTAHOE} ${TTAHOE}
65	-ln -s /sys/tahoe/tags /var/db/sys_tags
66
67vaxtags:
68	-ctags -dtf ${TVAX} ${COMM} ${SVAX}
69	egrep "^SCBVEC(.*)" ${AVAX} | \
70sed "s;\([^:]*\):\([^(]*\)(\([^, )]*\)\(.*\);X\3 \1 /^\2(\3\4$$/;" \
71		>> ${TVAX}
72	egrep "^ENTRY(.*)|^JSBENTRY(.*)" ${AVAX} | \
73sed "s;\([^:]*\):\([^(]*\)(\([^, )]*\)\(.*\);\3 \1 /^\2(\3\4$$/;" \
74		>> ${TVAX}
75	sort -o ${TVAX} ${TVAX}
76	-ln -s /sys/vax/tags /var/db/sys_tags
77
78hp300tags:
79	-ctags -dtf ${THP300} ${COMM} ${SHP300}
80	egrep "^ENTRY(.*)|^ALTENTRY(.*)" ${AHP300} | \
81sed "s;\([^:]*\):\([^(]*\)(\([^, )]*\)\(.*\);\3 \1 /^\2(\3\4$$/;" \
82		>> ${THP300}
83	sort -o ${THP300} ${THP300}
84	-ln -s /sys/hp300/tags /var/db/sys_tags
85
86i386tags:
87	-ctags -dtf ${TI386} ${COMM} ${SI386}
88	egrep "^ENTRY(.*)|^ALTENTRY(.*)" ${AI386} | \
89sed "s;\([^:]*\):\([^(]*\)(\([^, )]*\)\(.*\);\3 \1 /^\2(\3\4$$/;" \
90		>> ${TI386}
91	sort -o ${TI386} ${TI386}
92	-ln -s /sys/i386/tags /var/db/sys_tags
93
94links:
95	-for i in ${DVAX}; do \
96	    rm -f ../$$i/tags; ln -s ../tags ../$$i/tags; done
97	-for i in ${DTAHOE}; do \
98	    rm -f ../$$i/tags; ln -s ../tags ../$$i/tags; done
99	-for i in ${DHP300}; do \
100	    rm -f ../$$i/tags; ln -s ../tags ../$$i/tags; done
101	-for i in ${DI386}; do \
102	    rm -f ../$$i/tags; ln -s ../tags ../$$i/tags; done
103	-for i in ${DGEN}; do \
104	    rm -f ../$$i/tags; \
105	    ln -s ../tags ../$$i/tags; done
106	-ln -s /var/db/sys_tags ../tags
107
108init_sysent.c syscalls.c ../sys/syscall.h: makesyscalls.sh syscalls.master
109	-mv -f init_sysent.c init_sysent.c.bak
110	-mv -f syscalls.c syscalls.c.bak
111	-mv -f ../sys/syscall.h ../sys/syscall.h.bak
112	sh makesyscalls.sh syscalls.master
113