#	$NetBSD$

# Makefile for pcat tags file and boot blocks

TPCAT=	${SYSDIR}/arch/pcat/tags
SPCAT=	${SYSDIR}/arch/pcat/pcat/*.[ch] ${SYSDIR}/arch/pcat/include/*.h \
	${SYSDIR}/arch/pcat/eisa/*.[ch] ${SYSDIR}/arch/pcat/isa/*.[ch] \
	${SYSDIR}/arch/pcat/pci/*.[ch]
APCAT=	${SYSDIR}/arch/pcat/pcat/*.s ${SYSDIR}/arch/pcat/isa/*.s

# Directories in which to place tags links
DPCAT=	pcat eisa isa include pci

.include "../../kern/Make.tags.inc"

tags:
	rm -f ${TPCAT}
	-echo ${SPCAT} ${COMM} | xargs ctags -wadtf ${TPCAT}
	egrep "^ENTRY(.*)|^ALTENTRY(.*)" ${APCAT} | \
	    sed "s;\([^:]*\):\([^(]*\)(\([^, )]*\)\(.*\);\3 \1 /^\2(\3\4$$/;" \
		>> ${TPCAT}
	sort -o ${TPCAT} ${TPCAT}

links:
	-for i in ${DPCAT}; do \
	    (cd $$i && rm -f tags; ln -s ../tags tags); done


SUBDIR=	include stand

.include <bsd.subdir.mk>
