10 # Directories to include in cscope name file and TAGS.
11 CSCOPEDIRS= boot bsm cam cddl compat conf contrib crypto ddb dev fs gdb \
12 geom gnu isa kern libkern modules net net80211 netatalk \
13 netgraph netinet netinet6 netipsec netipx netnatm netncp \
14 netsmb nfs nfsclient nfsserver nlm opencrypto \
15 pci rpc security sys ufs vm xdr xen ${CSCOPE_ARCHDIR}
17 CSCOPE_ARCHDIR ?= amd64 arm i386 ia64 mips pc98 powerpc sparc64 x86
19 CSCOPE_ARCHDIR ?= ${MACHINE}
22 # Loadable kernel modules
24 .if defined(MODULES_WITH_WORLD)
28 HTAGSFLAGS+= -at `awk -F= '/^RELEASE *=/{release=$2}; END {print "FreeBSD", release, "kernel"}' < conf/newvers.sh`
30 # You need the devel/cscope port for this.
32 cscope.out: ${.CURDIR}/cscope.files
33 cd ${.CURDIR}; cscope -k -buq -p4
35 ${.CURDIR}/cscope.files: .PHONY
37 find ${CSCOPEDIRS} -name "*.[chSsly]" -a -type f > ${.TARGET}
40 rm -f cscope.files cscope.out cscope.in.out cscope.po.out
42 # You need the devel/global and one of editor/emacs* ports for that.
43 TAGS ${.CURDIR}/TAGS: ${.CURDIR}/cscope.files
45 cd ${.CURDIR}; xargs etags -a < ${.CURDIR}/cscope.files
47 # You need the textproc/glimpse ports for this.
49 .if !exists(${.CURDIR}/.glimpse_exclude)
50 echo .svn > ${.CURDIR}/.glimpse_exclude
51 echo /compile/ >> ${.CURDIR}/.glimpse_exclude
53 cd ${.CURDIR}; glimpseindex -H . -B -f -o .
56 cd ${.CURDIR}; rm -f .glimpse_*
58 .include <bsd.subdir.mk>