MFC: r179174 (rev 1.47): Cscope enhancement's.

This commit is contained in:
obrien 2008-09-01 23:52:54 +00:00
parent b953df8d9f
commit c28c9c0e12

View File

@ -14,9 +14,12 @@ CSCOPEDIRS= coda compat conf contrib crypto ddb dev fs gnu i4b isa \
isofs kern libkern modules net netatalk netatm netgraph \
netinet netinet6 netipx netkey netnatm netncp netsmb nfs \
nfsclient nfs4client rpc pccard pci posix4 sys ufs vm \
${ARCHDIR}
ARCHDIR ?= ${MACHINE}
${CSCOPE_ARCHDIR}
.if defined(ALL_ARCH)
CSCOPE_ARCHDIR ?= amd64 arm i386 ia64 pc98 powerpc sparc64 sun4v
.else
CSCOPE_ARCHDIR ?= ${MACHINE}
.endif
# Loadable kernel modules
@ -26,14 +29,20 @@ SUBDIR+=modules
HTAGSFLAGS+= -at `awk -F= '/^RELEASE *=/{release=$2}; END {print "FreeBSD", release, "kernel"}' < conf/newvers.sh`
cscope: ${.CURDIR}/cscopenamefile
cd ${.CURDIR}; cscope -k -p4 -i cscopenamefile
cscope: cscope.out
cscope.out: ${.CURDIR}/cscope.files
cd ${.CURDIR}; cscope -k -buq -p4
${.CURDIR}/cscopenamefile:
cd ${.CURDIR}; find ${CSCOPEDIRS} -name "*.[csh]" > ${.TARGET}
${.CURDIR}/cscope.files: .PHONY
cd ${.CURDIR}; \
find ${CSCOPEDIRS} -name "*.[chSs]" -a -type f > ${.TARGET}
TAGS ${.CURDIR}/TAGS: ${.CURDIR}/cscopenamefile
cscope-clean:
rm -f cscope.files cscope.out cscope.in.out cscope.po.out
# You need the devel/global and one of editor/emacs* ports for that.
TAGS ${.CURDIR}/TAGS: ${.CURDIR}/cscope.files
rm -f ${.CURDIR}/TAGS
cd ${.CURDIR}; xargs etags -a < ${.CURDIR}/cscopenamefile
cd ${.CURDIR}; xargs etags -a < ${.CURDIR}/cscope.files
.include <bsd.subdir.mk>