summaryrefslogtreecommitdiffstats
path: root/sys/Makefile
diff options
context:
space:
mode:
authorgrog <grog@FreeBSD.org>2005-03-05 00:56:15 +0000
committergrog <grog@FreeBSD.org>2005-03-05 00:56:15 +0000
commit2b7b25b43bc7ebd576313ccb0c7d1fb3c3dd91fe (patch)
treeff60ba72ccc20a817d20f26be3bfe7920bce67fe /sys/Makefile
parentab7386cc5e25490a9f3929451e052c5a13b4221e (diff)
downloadFreeBSD-src-2b7b25b43bc7ebd576313ccb0c7d1fb3c3dd91fe.zip
FreeBSD-src-2b7b25b43bc7ebd576313ccb0c7d1fb3c3dd91fe.tar.gz
Add targets to build cscope name files and TAGS file for etags.
Diffstat (limited to 'sys/Makefile')
-rw-r--r--sys/Makefile19
1 files changed, 19 insertions, 0 deletions
diff --git a/sys/Makefile b/sys/Makefile
index 5e599b4..3f611ee 100644
--- a/sys/Makefile
+++ b/sys/Makefile
@@ -7,11 +7,30 @@ SUBDIR= boot
.endif
.endif
+# Directories to include in cscope name file and TAGS.
+CSCOPEDIRS= coda compat conf contrib crypto ddb dev fs gnu i4b isa \
+ isofs kern libkern modules net netatalk netatm netgraph \
+ netinet netinet6 netipx netkey netnatm netncp netsmb nfs \
+ pccard pci posix4 sys ufs vm ${ARCHDIR}
+
+ARCHDIR ?= i386
+
# Loadable kernel modules
+
.if defined(MODULES_WITH_WORLD)
SUBDIR+=modules
.endif
HTAGSFLAGS+= -at `awk -F= '/^RELEASE *=/{release=$2}; END {print "FreeBSD", release, "kernel"}' < conf/newvers.sh`
+cscope: ${.CURDIR}/cscopenamefile
+ cd ${.CURDIR}; cscope -k -p4 -i cscopenamefile
+
+${.CURDIR}/cscopenamefile:
+ cd ${.CURDIR}; find ${CSCOPEDIRS} -name "*.[csh]" > ${.TARGET}
+
+TAGS ${.CURDIR}/TAGS: ${.CURDIR}/cscopenamefile
+ rm -f ${.CURDIR}/TAGS
+ cd ${.CURDIR}; xargs etags -a < ${.CURDIR}/cscopenamefile
+
.include <bsd.subdir.mk>
OpenPOWER on IntegriCloud