1
2# Makefile for amd64 links, tags file
3
4# SYS is normally set in Make.tags.inc
5SYS=/sys
6
7TAGDIR=	amd64
8
9.include "../kern/Make.tags.inc"
10
11all:
12	@echo "make links or tags only"
13
14# Directories in which to place amd64 tags links
15DAMD64=	acpica amd64 ia32 include linux linux32 pci sgx vmm
16
17links::
18	-for i in ${COMMDIR1}; do \
19	    (cd $$i && { rm -f tags; ln -s ../${TAGDIR}/tags tags; }) done
20	-for i in ${COMMDIR2}; do \
21	    (cd $$i && { rm -f tags; ln -s ../../${TAGDIR}/tags tags; }) done
22	-for i in ${DAMD64}; do \
23	    (cd ${SYS}/amd64/$$i && { rm -f tags; ln -s ../tags tags; }) done
24
25SAMD64=	${SYS}/amd64/acpica/*.[ch] \
26	${SYS}/amd64/amd64/*.[ch] ${SYS}/amd64/ia32/*.[ch] \
27	${SYS}/amd64/include/*.[ch] ${SYS}/amd64/linux/*.[ch] \
28	${SYS}/amd64/linux32/*.[ch] ${SYS}/amd64/pci/*.[ch] \
29	${SYS}/amd64/sgx/*.[ch] ${SYS}/amd64/vmm/*.[ch]
30AAMD64=	${SYS}/amd64/amd64/*.S
31
32tags::
33	-ctags -wdt ${COMM} ${SAMD64}
34	egrep "^ENTRY(.*)|^ALTENTRY(.*)" ${AAMD64} | \
35	    sed "s;\([^:]*\):\([^(]*\)(\([^, )]*\)\(.*\);\3 \1 /^\2(\3\4$$/;" \
36		>> tags
37	sort -o tags tags
38	chmod 444 tags
39	rm -f ${SYS}/amd64/tags
40	mv tags ${SYS}/amd64/tags
41