xref: /original-bsd/sys/kern/Makefile (revision da818fbb)
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.7 (Berkeley) 08/22/89
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
34# Directories in which to place tags links (other than primary T$MACH)
35DGEN=	kern sys net netimp netinet netns ufs
36DVAX=	vaxif vaxmba vaxuba
37DTAHOE=	tahoeif tahoevba
38
39all:
40	@echo "make tags or links only"
41
42tags: tahoetags vaxtags
43
44tahoetags:
45	-ctags -dtf ${TTAHOE} ${COMM} ${STAHOE} ${HDR}
46	egrep "^SCBVEC(.*)" ${ATAHOE} | \
47sed "s;\([^:]*\):\([^(]*\)(\([^, )]*\)\(.*\);X\3 \1 /^\2(\3\4$$/;" \
48		>> ${TTAHOE}
49	egrep "^ENTRY(.*)|^JSBENTRY(.*)" ${ATAHOE} | \
50sed "s;\([^:]*\):\([^(]*\)(\([^, )]*\)\(.*\);\3 \1 /^\2(\3\4$$/;" \
51		>> ${TTAHOE}
52	sort -o ${TTAHOE} ${TTAHOE}
53
54vaxtags:
55	-ctags -dtf ${TVAX} ${COMM} ${SVAX} ${HDR}
56	egrep "^SCBVEC(.*)" ${AVAX} | \
57sed "s;\([^:]*\):\([^(]*\)(\([^, )]*\)\(.*\);X\3 \1 /^\2(\3\4$$/;" \
58		>> ${TVAX}
59	egrep "^ENTRY(.*)|^JSBENTRY(.*)" ${AVAX} | \
60sed "s;\([^:]*\):\([^(]*\)(\([^, )]*\)\(.*\);\3 \1 /^\2(\3\4$$/;" \
61		>> ${TVAX}
62	sort -o ${TVAX} ${TVAX}
63
64links:
65	-for i in ${DVAX}; do \
66	    rm -f ../$$i/tags; ln -s ../vax/tags ../$$i/tags; done
67	-for i in ${DTAHOE}; do \
68	    rm -f ../$$i/tags; ln -s ../tahoe/tags ../$$i/tags; done
69	-for i in ${DGEN}; do \
70	    rm -f ../$$i/tags; \
71	    ln -s ../tahoe/tags ../$$i/tags; done
72
73init_sysent.c syscalls.c ../sys/syscall.h: syscalls.master
74	-mv init_sysent.c init_sysent.c.bak
75	-mv syscalls.c syscalls.c.bak
76	-mv ../sys/syscall.h ../sys/syscall.h.bak
77	sh makesyscalls.sh syscalls.master
78