Update to know about current kernel directory layout.

Add ability to build links as well as tags.
This commit is contained in:
mckusick 1999-02-28 22:14:16 +00:00
parent e3814c9b67
commit ca741086a3
3 changed files with 167 additions and 59 deletions

View File

@ -1,30 +1,39 @@
# from: @(#)Makefile 7.3 (Berkeley) 6/9/91
# $Id: Makefile,v 1.4 1997/02/22 09:29:47 peter Exp $
# $Id: Makefile,v 1.5 1998/05/31 22:40:49 steve Exp $
# @(#)Makefile 8.1 (Berkeley) 6/11/93
# Makefile for i386 tags file
# Makefile for i386 links, tags file
# SYS is normally set in Make.tags.inc
# SYS=/sys
TAGDIR= i386
.include "../kern/Make.tags.inc"
all:
@echo "make tags or links only"
TI386= ${.OBJDIR}/../i386/tags
SI386= ${.CURDIR}/../i386/i386/*.[ch] ${.CURDIR}/../i386/include/*.h \
${.CURDIR}/../i386/isa/*.[ch]
AI386= ${.CURDIR}/../i386/i386/*.s
@echo "make links or tags only"
# Directories in which to place i386 tags links
DI386= eisa isa include
DI386= apm conf eisa i386 ibcs2 include isa linux
tags:
-ctags -dtf ${TI386} ${COMM} ${SI386}
links::
-for i in ${COMMDIR1}; do \
(cd $$i && { rm -f tags; ln -s ../${TAGDIR}/tags tags; }) done
-for i in ${COMMDIR2}; do \
(cd $$i && { rm -f tags; ln -s ../../${TAGDIR}/tags tags; }) done
-for i in ${DI386}; do \
(cd $$i && { rm -f tags; ln -s ../tags tags; }) done
SI386= ${SYS}/i386/apm/*.[ch] ${SYS}/i386/eisa/*.[ch] \
${SYS}/i386/i386/*.[ch] ${SYS}/i386/ibcs2/*.[ch] \
${SYS}/i386/include/*.[ch] ${SYS}/i386/isa/*.[ch] \
${SYS}/i386/linux/*.[ch]
AI386= ${SYS}/i386/i386/*.s
tags::
-ctags -wdt ${COMM} ${I386}
egrep "^ENTRY(.*)|^ALTENTRY(.*)" ${AI386} | \
sed "s;\([^:]*\):\([^(]*\)(\([^, )]*\)\(.*\);\3 \1 /^\2(\3\4$$/;" \
>> ${TI386}
sort -o ${TI386} ${TI386}
#XXX This doesn't work because ${.OBJDIR}/$i doesn't exist
#
#links:
# -for i in ${DI386}; do \
# (cd ${.CURDIR}/$$i && rm -f ${.OBJDIR}/tags; \
# ln -s ${.OBJDIR}/../tags ${.OBJDIR}/tags) \
# done
>> tags
sort -o tags tags
chmod 444 tags

View File

@ -1,30 +1,39 @@
# from: @(#)Makefile 7.3 (Berkeley) 6/9/91
# $Id: Makefile,v 1.4 1997/02/22 09:29:47 peter Exp $
# $Id: Makefile,v 1.5 1998/05/31 22:40:49 steve Exp $
# @(#)Makefile 8.1 (Berkeley) 6/11/93
# Makefile for i386 tags file
# Makefile for i386 links, tags file
# SYS is normally set in Make.tags.inc
# SYS=/sys
TAGDIR= i386
.include "../kern/Make.tags.inc"
all:
@echo "make tags or links only"
TI386= ${.OBJDIR}/../i386/tags
SI386= ${.CURDIR}/../i386/i386/*.[ch] ${.CURDIR}/../i386/include/*.h \
${.CURDIR}/../i386/isa/*.[ch]
AI386= ${.CURDIR}/../i386/i386/*.s
@echo "make links or tags only"
# Directories in which to place i386 tags links
DI386= eisa isa include
DI386= apm conf eisa i386 ibcs2 include isa linux
tags:
-ctags -dtf ${TI386} ${COMM} ${SI386}
links::
-for i in ${COMMDIR1}; do \
(cd $$i && { rm -f tags; ln -s ../${TAGDIR}/tags tags; }) done
-for i in ${COMMDIR2}; do \
(cd $$i && { rm -f tags; ln -s ../../${TAGDIR}/tags tags; }) done
-for i in ${DI386}; do \
(cd $$i && { rm -f tags; ln -s ../tags tags; }) done
SI386= ${SYS}/i386/apm/*.[ch] ${SYS}/i386/eisa/*.[ch] \
${SYS}/i386/i386/*.[ch] ${SYS}/i386/ibcs2/*.[ch] \
${SYS}/i386/include/*.[ch] ${SYS}/i386/isa/*.[ch] \
${SYS}/i386/linux/*.[ch]
AI386= ${SYS}/i386/i386/*.s
tags::
-ctags -wdt ${COMM} ${I386}
egrep "^ENTRY(.*)|^ALTENTRY(.*)" ${AI386} | \
sed "s;\([^:]*\):\([^(]*\)(\([^, )]*\)\(.*\);\3 \1 /^\2(\3\4$$/;" \
>> ${TI386}
sort -o ${TI386} ${TI386}
#XXX This doesn't work because ${.OBJDIR}/$i doesn't exist
#
#links:
# -for i in ${DI386}; do \
# (cd ${.CURDIR}/$$i && rm -f ${.OBJDIR}/tags; \
# ln -s ${.OBJDIR}/../tags ${.OBJDIR}/tags) \
# done
>> tags
sort -o tags tags
chmod 444 tags

View File

@ -1,19 +1,109 @@
# @(#)Make.tags.inc 8.1 (Berkeley) 6/11/93
# $Id$
# Common files for "make tags".
# Included by the Makefile for each architecture.
SYS?= /sys
# Put the ../sys stuff near the end so that subroutine definitions win when
# there is a struct tag with the same name (eg., vmmeter). The real
# solution would probably be for ctags to generate "struct vmmeter" tags.
# Common files for "make tags", included by the Makefile for each
# architecture.
COMM= /sys/conf/*.[ch] \
/sys/dev/*.[ch] /sys/dev/scsi/*.[ch] \
/sys/kern/*.[ch] /sys/libkern/*.[ch] \
/sys/miscfs/*/*.[ch] \
/sys/net/*.[ch] /sys/netccitt/*.[ch] /sys/netinet/*.[ch] \
/sys/netiso/*.[ch] /sys/netns/*.[ch] \
/sys/nfs/*.[ch] /sys/sys/*.[ch] \
/sys/ufs/*/*.[ch] \
/sys/vm/*.[ch]
# Put the /sys/sys include files at the end so that subroutine definitions
# win when there is a struct tag with the same name (e.g., vmmeter). The
# better solution would be for ctags to generate "struct vmmeter" tags.
COMM= ${SYS}/conf/*.[ch] \
${SYS}/dev/advansys/*.[ch] \
${SYS}/dev/aha/*.[ch] \
${SYS}/dev/aic7xxx/*.[ch] \
${SYS}/dev/buslogic/*.[ch] \
${SYS}/dev/ccd/*.[ch] \
${SYS}/dev/dec/*.[ch] \
${SYS}/dev/dpt/*.[ch] \
${SYS}/dev/en/*.[ch] \
${SYS}/dev/hea/*.[ch] \
${SYS}/dev/hfa/*.[ch] \
${SYS}/dev/iicbus/*.[ch] \
${SYS}/dev/isp/*.[ch] \
${SYS}/dev/pdq/*.[ch] \
${SYS}/dev/ppbus/*.[ch] \
${SYS}/dev/smbus/*.[ch] \
${SYS}/dev/vn/*.[ch] \
${SYS}/dev/vx/*.[ch] \
${SYS}/isofs/cd9660/*.[ch] \
${SYS}/kern/*.[ch] \
${SYS}/miscfs/deadfs/*.[ch] \
${SYS}/miscfs/devfs/*.[ch] \
${SYS}/miscfs/fdesc/*.[ch] \
${SYS}/miscfs/fifofs/*.[ch] \
${SYS}/miscfs/kernfs/*.[ch] \
${SYS}/miscfs/nullfs/*.[ch] \
${SYS}/miscfs/portal/*.[ch] \
${SYS}/miscfs/procfs/*.[ch] \
${SYS}/miscfs/specfs/*.[ch] \
${SYS}/miscfs/umapfs/*.[ch] \
${SYS}/miscfs/union/*.[ch] \
${SYS}/msdosfs/*.[ch] \
${SYS}/net/*.[ch] \
${SYS}/netatalk/*.[ch] \
${SYS}/netatm/*.[ch] \
${SYS}/netinet/*.[ch] \
${SYS}/netipx/*.[ch] \
${SYS}/netkey/*.[ch] \
${SYS}/netnatm/*.[ch] \
${SYS}/netns/*.[ch] \
${SYS}/nfs/*.[ch] \
${SYS}/pci/*.[ch] \
${SYS}/posix4/*.[ch] \
${SYS}/ufs/ffs/*.[ch] \
${SYS}/ufs/mfs/*.[ch] \
${SYS}/ufs/ufs/*.[ch] \
${SYS}/vm/*.[ch] \
${SYS}/sys/*.[ch]
COMMDIR1= ${SYS}/conf \
${SYS}/kern \
${SYS}/msdosfs \
${SYS}/net \
${SYS}/netatalk \
${SYS}/netatm \
${SYS}/netinet \
${SYS}/netipx \
${SYS}/netkey \
${SYS}/netnatm \
${SYS}/netns \
${SYS}/nfs \
${SYS}/pci \
${SYS}/posix4 \
${SYS}/vm \
${SYS}/sys
COMMDIR2= ${SYS}/dev/advansys \
${SYS}/dev/aha \
${SYS}/dev/aic7xxx \
${SYS}/dev/buslogic \
${SYS}/dev/ccd \
${SYS}/dev/dec \
${SYS}/dev/dpt \
${SYS}/dev/en \
${SYS}/dev/hea \
${SYS}/dev/hfa \
${SYS}/dev/iicbus \
${SYS}/dev/isp \
${SYS}/dev/pdq \
${SYS}/dev/ppbus \
${SYS}/dev/smbus \
${SYS}/dev/vn \
${SYS}/dev/vx \
${SYS}/isofs/cd9660 \
${SYS}/miscfs/deadfs \
${SYS}/miscfs/devfs \
${SYS}/miscfs/fdesc \
${SYS}/miscfs/fifofs \
${SYS}/miscfs/kernfs \
${SYS}/miscfs/nullfs \
${SYS}/miscfs/portal \
${SYS}/miscfs/procfs \
${SYS}/miscfs/specfs \
${SYS}/miscfs/umapfs \
${SYS}/miscfs/union \
${SYS}/ufs/ffs \
${SYS}/ufs/mfs \
${SYS}/ufs/ufs