Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys Updated version of cscope/mkid support. Check libkern an...
details: https://anonhg.NetBSD.org/src/rev/8b206a73e939
branches: trunk
changeset: 533010:8b206a73e939
user: wrstuden <wrstuden%NetBSD.org@localhost>
date: Tue Jun 18 23:46:52 2002 +0000
description:
Updated version of cscope/mkid support. Check libkern and compat lib
for source files. Also include header files in mkid run.
diffstat:
sys/compat/common/Makefile | 5 ++++-
sys/conf/Makefile.kern.inc | 37 ++++++++++++++++++++++++++++++++-----
sys/lib/libkern/Makefile | 5 ++++-
3 files changed, 40 insertions(+), 7 deletions(-)
diffs (93 lines):
diff -r de500459e166 -r 8b206a73e939 sys/compat/common/Makefile
--- a/sys/compat/common/Makefile Tue Jun 18 23:07:36 2002 +0000
+++ b/sys/compat/common/Makefile Tue Jun 18 23:46:52 2002 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.28 2002/04/29 09:53:39 mrg Exp $
+# $NetBSD: Makefile,v 1.29 2002/06/18 23:46:53 wrstuden Exp $
LIB= compat
NOPIC= # defined
@@ -46,3 +46,6 @@
.include <bsd.own.mk>
.undef DESTDIR
.include <bsd.lib.mk>
+
+showsources: ${SRCS}
+ @echo ${.ALLSRC}
diff -r de500459e166 -r 8b206a73e939 sys/conf/Makefile.kern.inc
--- a/sys/conf/Makefile.kern.inc Tue Jun 18 23:07:36 2002 +0000
+++ b/sys/conf/Makefile.kern.inc Tue Jun 18 23:46:52 2002 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.kern.inc,v 1.16 2002/06/17 20:31:26 wrstuden Exp $
+# $NetBSD: Makefile.kern.inc,v 1.17 2002/06/18 23:46:52 wrstuden Exp $
#
# This file contains common `MI' targets and definitions and it is included
# at the bottom of each `MD' ${MACHINE}/conf/Makefile.${MACHINE}. There are
@@ -286,10 +286,26 @@
EXTRA_CLEAN+= cscope.out
.if !target(cscope.out)
+#
+# This target is tricky. We want to include source files from the different
+# kernel libraries in the output, but to get them requires calling
+# make in those directories. We'd rather not call make in those directories
+# if we don't have to, so we make cscope.out in two steps.
+# The first step calls make on this makefile to evaluate the second
+# make target. It *also* passes ` ` evaluated variables on the command
+# line to the second make. These ` ` evaluated variables run make in
+# the library directories, and thus provide the sources from the libs.
+#
cscope.out: Makefile
@echo Building cscope.out source database
- @echo ${SRCS} | ${CSCOPE} -k -i - -b \
- `echo ${INCLUDES} | sed s/-nostdinc//`
+ @${MAKE} LIBKERNSRC="`${KERNMAKE} showsources`" \
+ LIBCOMPATSRC="`${COMPATMAKE} showsources`" cscope.out1
+
+.PHONY: cscope.out1
+cscope.out1:
+ @echo ${SRCS} ${LIBKERNSRC:S|^|${KERNDST}/|} \
+ ${LIBCOMPATSRC:S|^|${COMPATDST}/|} \
+ | ${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
@@ -305,9 +321,20 @@
.PHONY: mkid
mkid: ID
-ID: Makefile
+ID: Makefile depend
+# Same dance as cscope.out/cscope.out1
@echo Building mkid database
- @${MKID} ${SRCS}
+ @${MAKE} LIBKERNSRC="`${KERNMAKE} showsources`" \
+ LIBCOMPATSRC="`${COMPATMAKE} showsources`" \
+ LIBKERNDEPEND="`sed 's/[^:]*://;s/^ *//;s/ *\\\\ *$$//;' lib/kern//.depend | tr ' ' '\n' | sort -u`" \
+ LIBCOMPDEPEND="`sed 's/[^:]*://;s/^ *//;s/ *\\\\ *$$//;' lib/compat/.depend | tr ' ' '\n' | sort -u`" ID1
+
+.PHONY: ID1
+ID1:
+ @${MKID} ${SRCS} ${LIBKERNSRC:S|^|${KERNDST}/|} \
+ ${LIBCOMPATSRC:S|^|${COMPATDST}/|} \
+ ${LIBKERNDEPEND:S|^../../||} ${LIBCOMPDEPEND:S|^../../||} \
+ `sed 's/[^:]*://;s/^ *//;s/ *\\\\ *$$//;' .depend | tr ' ' '\n' | sort -u`
.endif
##
diff -r de500459e166 -r 8b206a73e939 sys/lib/libkern/Makefile
--- a/sys/lib/libkern/Makefile Tue Jun 18 23:07:36 2002 +0000
+++ b/sys/lib/libkern/Makefile Tue Jun 18 23:46:52 2002 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.64 2002/05/28 10:09:24 itojun Exp $
+# $NetBSD: Makefile,v 1.65 2002/06/18 23:46:53 wrstuden Exp $
LIB= kern
NOPIC= # defined
@@ -89,3 +89,6 @@
@echo building profiled ${LIB} library
@rm -f lib${LIB}.po
@${LD} -r -o lib${LIB}.po `NM=${NM} ${LORDER} ${POBJS} | ${TSORT}`
+
+showsources: ${SRCS}
+ @echo ${.ALLSRC}
Home |
Main Index |
Thread Index |
Old Index