]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - sys/Makefile
MFC: r179174 (rev 1.47): Cscope enhancement's.
[FreeBSD/FreeBSD.git] / sys / Makefile
1 # $FreeBSD$
2
3 .if ${MACHINE_ARCH} == "arm"
4 NO_BOOT=
5 .endif
6
7 # The boot loader
8 .if !defined(NO_BOOT)
9 SUBDIR= boot
10 .endif
11
12 # Directories to include in cscope name file and TAGS.
13 CSCOPEDIRS=     coda compat conf contrib crypto ddb dev fs gnu i4b isa \
14                 isofs kern libkern modules net netatalk netatm netgraph \
15                 netinet netinet6 netipx netkey netnatm netncp netsmb nfs \
16                 nfsclient nfs4client rpc pccard pci posix4 sys ufs vm \
17                 ${CSCOPE_ARCHDIR}
18 .if defined(ALL_ARCH)
19 CSCOPE_ARCHDIR ?= amd64 arm i386 ia64 pc98 powerpc sparc64 sun4v
20 .else
21 CSCOPE_ARCHDIR ?= ${MACHINE}
22 .endif
23
24 # Loadable kernel modules
25
26 .if defined(MODULES_WITH_WORLD)
27 SUBDIR+=modules
28 .endif
29
30 HTAGSFLAGS+= -at `awk -F= '/^RELEASE *=/{release=$2}; END {print "FreeBSD", release, "kernel"}' < conf/newvers.sh`
31
32 cscope: cscope.out
33 cscope.out: ${.CURDIR}/cscope.files
34         cd ${.CURDIR}; cscope -k -buq -p4
35
36 ${.CURDIR}/cscope.files: .PHONY
37         cd ${.CURDIR}; \
38                 find ${CSCOPEDIRS} -name "*.[chSs]" -a -type f > ${.TARGET}
39
40 cscope-clean:
41         rm -f cscope.files cscope.out cscope.in.out cscope.po.out
42
43 # You need the devel/global and one of editor/emacs* ports for that.
44 TAGS ${.CURDIR}/TAGS: ${.CURDIR}/cscope.files
45         rm -f ${.CURDIR}/TAGS
46         cd ${.CURDIR}; xargs etags -a < ${.CURDIR}/cscope.files
47
48 .include <bsd.subdir.mk>