#	BSDI $Id: Makefile,v 2.2 1995/10/12 02:54:45 karels Exp $
#	@(#)Makefile	8.1 (Berkeley) 6/11/93

# Makefile for i386 links, tags file

# SYS is normally set in Make.tags.inc
# SYS=/sys

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

all:
	@echo "make links or tags only"

#DIRS=	conf eisa floppy i386 include isa mca scripts
DIRS=	conf eisa i386 include isa pci # objsrc

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

I386=	${SYS}/i386/eisa/*.[ch] ${SYS}/i386/i386/*.[ch] \
	${SYS}/i386/include/*.[ch] ${SYS}/i386/isa/*.[ch] \
	${SYS}/i386/pci/*.[ch] # ${SYS}/i386/objsrc/*.[ch]
AI386=	${SYS}/i386/i386/*.s

tags::
	-ctags -wdt ${COMM} ${I386}
	egrep "^ENTRY(.*)|^ALTENTRY(.*)" ${AI386} | \
	    sed "s;\([^:]*\):\([^(]*\)(\([^, )]*\)\(.*\);\3 \1 /^\2(\3\4$$/;" \
		>> tags
	sort -o tags tags
	chown bin.sys tags
	chmod 444 tags
