Makefile revision 179174
150477Speter# $FreeBSD: head/sys/Makefile 179174 2008-05-21 07:56:10Z obrien $
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.
11179174SobrienCSCOPEDIRS=	boot bsm cam compat conf contrib crypto ddb dev fs gdb geom \
12179174Sobrien		gnu i4b isa kern libkern modules net net80211 netatalk netatm \
13171245Sbz		netgraph netinet netinet6 netipsec netipx netnatm netncp \
14175593Smaxim		netsmb nfs nfs4client nfsclient nfsserver opencrypto pccard \
15175593Smaxim		pci rpc security sys ufs vm ${ARCHDIR}
16143145Sgrog
17143268SgrogARCHDIR	?=	${MACHINE}
18143145Sgrog
19124610Sru# Loadable kernel modules
20143145Sgrog
2161744Sobrien.if defined(MODULES_WITH_WORLD)
2261744SobrienSUBDIR+=modules
2361744Sobrien.endif
2461744Sobrien
2527356SjkhHTAGSFLAGS+= -at `awk -F= '/^RELEASE *=/{release=$2}; END {print "FreeBSD", release, "kernel"}' < conf/newvers.sh`
2627356Sjkh
27171245Sbz# You need the devel/cscope port for this.
28179174Sobriencscope: cscope.out
29179174Sobriencscope.out: ${.CURDIR}/cscope.files
30179174Sobrien	cd ${.CURDIR}; cscope -k -buq -p4
31143145Sgrog
32179174Sobrien${.CURDIR}/cscope.files: .PHONY
33179174Sobrien	cd ${.CURDIR}; \
34179174Sobrien		find ${CSCOPEDIRS} -name "*.[chSs]" -a -type f > ${.TARGET}
35143145Sgrog
36179174Sobriencscope-clean:
37179174Sobrien	rm -f cscope.files cscope.out cscope.in.out cscope.po.out
38179174Sobrien
39171245Sbz# You need the devel/global and one of editor/emacs* ports for that.
40179174SobrienTAGS ${.CURDIR}/TAGS: ${.CURDIR}/cscope.files
41143145Sgrog	rm -f ${.CURDIR}/TAGS
42179174Sobrien	cd ${.CURDIR}; xargs etags -a < ${.CURDIR}/cscope.files
43143145Sgrog
441598Srgrimes.include <bsd.subdir.mk>
45