xref: /original-bsd/sys/kern/Makefile (revision 241757c4)
1#
2# Copyright (c) 1986 Regents of the University of California.
3# All rights reserved.  The Berkeley software License Agreement
4# specifies the terms and conditions for redistribution.
5#
6#	@(#)Makefile	7.5 (Berkeley) 03/28/87
7#
8# Put the ../h stuff near the end so that subroutine definitions win when
9# there is a struct tag with the same name (eg., vmmeter).  The real
10# solution would probably be for ctags to generate "struct vmmeter" tags.
11
12TVAX=	../vax/tags
13SVAX=	../net/*.[ch] ../netimp/*.[ch] ../netinet/*.[ch] ../netns/*.[ch] \
14	../sys/*.[ch] ../vaxif/*.[ch]  ../vaxmba/*.[ch] ../vaxuba/*.[ch] \
15	../vax/*.[ch] ../h/*.h
16AVAX=	../vax/*.s
17
18TTAHOE=	../tahoe/tags
19STAHOE=	../net/*.[ch] ../netimp/*.[ch] ../netinet/*.[ch] ../netns/*.[ch] \
20	../sys/*.[ch] ../tahoeif/*.[ch]  ../tahoevba/*.[ch] ../tahoe/*.[ch] \
21	../h/*.h
22ATAHOE=	../tahoe/*.s
23
24DGEN=	h sys net netimp netinet netns
25DVAX=	vaxif vaxmba vaxuba
26DTAHOE=	tahoeif tahoevba
27
28all:
29	@echo "make tags or links only"
30
31tags: FRC
32	-mv ${TVAX} ${TVAX}.old
33	ctags -dtf ${TVAX} ${SVAX}
34	egrep "^SCBVEC(.*)" ${AVAX} | \
35sed "s;\([^:]*\):\([^(]*\)(\([^, )]*\)\(.*\);X\3 \1 /^\2(\3\4$$/;" \
36		>> ${TVAX}
37	egrep "^ENTRY(.*)|^JSBENTRY(.*)" ${AVAX} | \
38sed "s;\([^:]*\):\([^(]*\)(\([^, )]*\)\(.*\);\3 \1 /^\2(\3\4$$/;" \
39		>> ${TVAX}
40	sort -o ${TVAX} ${TVAX}
41	rm -f ${TVAX}.old
42	-mv ${TTAHOE} ${TTAHOE}.old
43	ctags -dtf ${TTAHOE} ${STAHOE}
44	egrep "^SCBVEC(.*)" ${ATAHOE} | \
45sed "s;\([^:]*\):\([^(]*\)(\([^, )]*\)\(.*\);X\3 \1 /^\2(\3\4$$/;" \
46		>> ${TTAHOE}
47	egrep "^ENTRY(.*)|^JSBENTRY(.*)" ${ATAHOE} | \
48sed "s;\([^:]*\):\([^(]*\)(\([^, )]*\)\(.*\);\3 \1 /^\2(\3\4$$/;" \
49		>> ${TTAHOE}
50	sort -o ${TTAHOE} ${TTAHOE}
51	rm -f ${TTAHOE}.old
52
53links:
54	-for i in ${DVAX}; do rm -f ../$$i/tags; \
55	ln -s ../vax/tags ../$$i/tags; done
56	-for i in ${DTAHOE}; do rm -f ../$$i/tags; \
57	ln -s ../tahoe/tags ../$$i/tags; done
58	-for i in ${DGEN}; do rm -f ../$$i/tags; \
59	ln -s ../machine/tags ../$$i/tags; done
60
61FRC:
62