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 \
13 netgraph netinet netinet6 netipsec netnatm netpfil \
14 netsmb nfs nfsclient nfsserver nlm ofed opencrypto \
15 pci rpc security sys ufs vm xdr xen ${CSCOPE_ARCHDIR}
16 .if !defined(CSCOPE_ARCHDIR)
18 CSCOPE_ARCHDIR = amd64 arm i386 ia64 mips pc98 powerpc sparc64 x86
20 CSCOPE_ARCHDIR = ${MACHINE}
21 .if ${MACHINE} != ${MACHINE_CPUARCH}
22 CSCOPE_ARCHDIR += ${MACHINE_CPUARCH}
24 .if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64"
30 # Loadable kernel modules
32 .if defined(MODULES_WITH_WORLD)
36 HTAGSFLAGS+= -at `awk -F= '/^RELEASE *=/{release=$2}; END {print "FreeBSD", release, "kernel"}' < conf/newvers.sh`
38 # You need the devel/cscope port for this.
40 cscope.out: ${.CURDIR}/cscope.files
41 cd ${.CURDIR}; cscope -k -buq -p4 -v
43 ${.CURDIR}/cscope.files: .PHONY
45 find ${CSCOPEDIRS} -name "*.[chSsly]" -a -type f > ${.TARGET}
48 rm -f cscope.files cscope.out cscope.in.out cscope.po.out
50 # You need the devel/global and one of editor/emacs* ports for that.
51 TAGS ${.CURDIR}/TAGS: ${.CURDIR}/cscope.files
53 cd ${.CURDIR}; xargs etags -a < ${.CURDIR}/cscope.files
55 # You need the textproc/glimpse ports for this.
57 .if !exists(${.CURDIR}/.glimpse_exclude)
58 echo .svn > ${.CURDIR}/.glimpse_exclude
59 echo /compile/ >> ${.CURDIR}/.glimpse_exclude
61 cd ${.CURDIR}; glimpseindex -H . -B -f -o .
64 cd ${.CURDIR}; rm -f .glimpse_*
66 .include <bsd.subdir.mk>