From d7dac6089c42dc307c2faf996328a118be1f6805 Mon Sep 17 00:00:00 2001 From: heas Date: Thu, 16 Dec 2004 00:35:48 +0000 Subject: [PATCH] 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. --- sys/conf/Makefile.kern.inc | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/sys/conf/Makefile.kern.inc b/sys/conf/Makefile.kern.inc index 269da9bfe568..a77c7301c4f4 100644 --- a/sys/conf/Makefile.kern.inc +++ b/sys/conf/Makefile.kern.inc @@ -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)