Adjust the cscope target so that each source file on a separate line to avoid

overrunning cscope's read buffer and prefix files within lib/{kern,compat}
with the appropriate path.
This commit is contained in:
heas 2004-12-16 00:35:48 +00:00
parent 2239334429
commit d7dac6089c

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile.kern.inc,v 1.57 2004/09/13 09:39:40 chs Exp $
# $NetBSD: Makefile.kern.inc,v 1.58 2004/12/16 00:35:48 heas Exp $
#
# This file contains common `MI' targets and definitions and it is included
# at the bottom of each `MD' ${MACHINE}/conf/Makefile.${MACHINE}.
@ -350,17 +350,21 @@ tags:
@echo "see $S/kern/Makefile for tags"
.endif
EXTRA_CLEAN+= cscope.out
EXTRA_CLEAN+= cscope.out cscope.tmp
.if !target(cscope.out)
cscope.out: Makefile depend
${_MKTARGET_CREATE}
@echo ${SRCS} `sed 's/[^:]*://;s/^ *//;s/ *\\\\ *$$//;' \
lib/kern/.depend lib/compat/.depend | tr ' ' '\n' | \
sed "s|^../../||" | sort -u` \
| ${CSCOPE} -k -i - -b `echo ${INCLUDES} | sed s/-nostdinc//`
@sed 's/[^:]*://;s/^ *//;s/ *\\ *$$//;' lib/kern/.depend | \
tr -s ' ' '\n' | sed 's|^\([^.\\]\)|lib/kern/\1|;s|^../../||;' > \
cscope.tmp
@sed 's/[^:]*://;s/^ *//;s/ *\\ *$$//;' lib/compat/.depend | \
tr -s ' ' '\n' | sed 's|^\([^.\\]\)|lib/compat/\1|;s|^../../||;' >> \
cscope.tmp
@echo ${SRCS} | cat - cscope.tmp | tr -s ' ' '\n' | sort -u | \
${CSCOPE} -k -i - -b `echo ${INCLUDES} | sed s/-nostdinc//`
# cscope doesn't write cscope.out if it's uptodate, so ensure
# make doesn't keep calling cscope when not needed.
@touch cscope.out
@rm -f cscope.tmp; touch cscope.out
.endif
.if !target(cscope)