diff --git a/sys/Makefile b/sys/Makefile index 35510cbac9f2..b980f1c5f117 100644 --- a/sys/Makefile +++ b/sys/Makefile @@ -14,9 +14,12 @@ 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 \ nfsclient nfs4client rpc pccard pci posix4 sys ufs vm \ - ${ARCHDIR} - -ARCHDIR ?= ${MACHINE} + ${CSCOPE_ARCHDIR} +.if defined(ALL_ARCH) +CSCOPE_ARCHDIR ?= amd64 arm i386 ia64 pc98 powerpc sparc64 sun4v +.else +CSCOPE_ARCHDIR ?= ${MACHINE} +.endif # Loadable kernel modules @@ -26,14 +29,20 @@ SUBDIR+=modules 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 +cscope: cscope.out +cscope.out: ${.CURDIR}/cscope.files + cd ${.CURDIR}; cscope -k -buq -p4 -${.CURDIR}/cscopenamefile: - cd ${.CURDIR}; find ${CSCOPEDIRS} -name "*.[csh]" > ${.TARGET} +${.CURDIR}/cscope.files: .PHONY + cd ${.CURDIR}; \ + find ${CSCOPEDIRS} -name "*.[chSs]" -a -type f > ${.TARGET} -TAGS ${.CURDIR}/TAGS: ${.CURDIR}/cscopenamefile +cscope-clean: + rm -f cscope.files cscope.out cscope.in.out cscope.po.out + +# You need the devel/global and one of editor/emacs* ports for that. +TAGS ${.CURDIR}/TAGS: ${.CURDIR}/cscope.files rm -f ${.CURDIR}/TAGS - cd ${.CURDIR}; xargs etags -a < ${.CURDIR}/cscopenamefile + cd ${.CURDIR}; xargs etags -a < ${.CURDIR}/cscope.files .include