150477Speter# $FreeBSD: stable/10/sys/Makefile 319309 2017-05-31 08:47:09Z ngie $
21598Srgrimes
3156813Sru.include <bsd.own.mk>
4156813Sru
558284Speter# The boot loader
6156813Sru.if ${MK_BOOT} != "no"
7116865SpeterSUBDIR=	boot
8129269Scognet.endif
91598Srgrimes
10143145Sgrog# Directories to include in cscope name file and TAGS.
11180627SmaximCSCOPEDIRS=	boot bsm cam cddl compat conf contrib crypto ddb dev fs gdb \
12180627Smaxim		geom gnu isa kern libkern modules net net80211 netatalk \
13248209Sbryanv		netgraph netinet netinet6 netipsec netipx netnatm \
14233236Sjhb		netsmb nfs nfsclient nfsserver nlm ofed opencrypto \
15222952Sgibbs		pci rpc security sys ufs vm xdr xen ${CSCOPE_ARCHDIR}
16229400Sjhb.if !defined(CSCOPE_ARCHDIR)
17180428Sobrien.if defined(ALL_ARCH)
18229400SjhbCSCOPE_ARCHDIR = amd64 arm i386 ia64 mips pc98 powerpc sparc64 x86
19180428Sobrien.else
20229400SjhbCSCOPE_ARCHDIR = ${MACHINE} 
21229400Sjhb.if ${MACHINE} != ${MACHINE_CPUARCH}
22229400SjhbCSCOPE_ARCHDIR += ${MACHINE_CPUARCH}
23180428Sobrien.endif
24229400Sjhb.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64"
25229400SjhbCSCOPE_ARCHDIR += x86
26229400Sjhb.endif
27229400Sjhb.endif
28229400Sjhb.endif
29143145Sgrog
30124610Sru# Loadable kernel modules
31143145Sgrog
3261744Sobrien.if defined(MODULES_WITH_WORLD)
3361744SobrienSUBDIR+=modules
3461744Sobrien.endif
3561744Sobrien
3627356SjkhHTAGSFLAGS+= -at `awk -F= '/^RELEASE *=/{release=$2}; END {print "FreeBSD", release, "kernel"}' < conf/newvers.sh`
3727356Sjkh
38171245Sbz# You need the devel/cscope port for this.
39179174Sobriencscope: cscope.out
40179174Sobriencscope.out: ${.CURDIR}/cscope.files
41243796Srpaulo	cd ${.CURDIR}; cscope -k -buq -p4 -v
42143145Sgrog
43179174Sobrien${.CURDIR}/cscope.files: .PHONY
44179174Sobrien	cd ${.CURDIR}; \
45215606Sobrien		find ${CSCOPEDIRS} -name "*.[chSsly]" -a -type f > ${.TARGET}
46143145Sgrog
47179174Sobriencscope-clean:
48319309Sngie	cd ${.CURDIR}; \
49319309Sngie	    rm -f cscope.files cscope.out cscope.in.out cscope.po.out
50179174Sobrien
51171245Sbz# You need the devel/global and one of editor/emacs* ports for that.
52179174SobrienTAGS ${.CURDIR}/TAGS: ${.CURDIR}/cscope.files
53143145Sgrog	rm -f ${.CURDIR}/TAGS
54179174Sobrien	cd ${.CURDIR}; xargs etags -a < ${.CURDIR}/cscope.files
55143145Sgrog
56181432Sphilip# You need the textproc/glimpse ports for this.
57181432Sphilipglimpse:
58181756Sphilip.if !exists(${.CURDIR}/.glimpse_exclude)
59181756Sphilip	echo .svn > ${.CURDIR}/.glimpse_exclude
60181756Sphilip	echo /compile/ >> ${.CURDIR}/.glimpse_exclude
61181756Sphilip.endif
62181432Sphilip	cd ${.CURDIR}; glimpseindex -H . -B -f -o .
63181432Sphilip
64181432Sphilipglimpse-clean:
65181432Sphilip	cd ${.CURDIR}; rm -f .glimpse_*
66181432Sphilip
671598Srgrimes.include <bsd.subdir.mk>
68