attached.

ron
These changes allow users to use kscope to browse v3 source. 

Want to find a function definition? Click and hit CTL-1
Want to see what it calls? CTL-2
Want to see who calls it? CTl-3

And so on.

For information on kscope please see: http://kscope.sourceforge.net/
It's a great way to browse a project. The key idea here is that the
kscope configuration is *specific to your mainboard* -- you only see the 
source and includes used in your mainboard!

Improvements to the mkdep script are MOST welcome. I am no 
expert. 

Signed-off-by: Ronald G. Minnich <[EMAIL PROTECTED]>

Index: util/mkdep
===================================================================
--- util/mkdep	(revision 0)
+++ util/mkdep	(revision 0)
@@ -0,0 +1,16 @@
+#!/bin/bash
+out=$1
+shift
+o=""
+while [ "$1" != "--" ]; do
+o="$o $1"
+shift
+done
+shift
+p=`pwd`
+while [ "$1" ] ; do
+echo $1 >>${out}
+cpp  -M -m32 $o $1  | sed 's/.*://' | sed 's/^ *//g' | tr ' ' '\n' | tr '\\' ' ' |sed "s,^include,${p}/include," >>${out}
+shift
+done
+sort -o ${out} -u ${out}
Index: arch/x86/Makefile
===================================================================
--- arch/x86/Makefile	(revision 900)
+++ arch/x86/Makefile	(working copy)
@@ -23,7 +23,7 @@
 ifeq ($(CONFIG_ARCH_X86),y)
 
 INITCFLAGS := $(CFLAGS) -I$(src)/include/arch/x86 -I$(src)/include \
-		-I$(obj) -I$(src)/mainboard/$(MAINBOARDDIR)/-fno-builtin  
+		-I$(obj) -I$(src)/mainboard/$(MAINBOARDDIR)/ -fno-builtin  
 
 SILENT := >/dev/null 2>&1
 
@@ -275,3 +275,17 @@
 	$(Q)$(NM) $(obj)/coreboot.initram | sort -u > $(obj)/coreboot.initram.map
 
 endif
+
+#
+# For Kscope
+#
+
+kscope: $(obj)/mainboard/$(MAINBOARDDIR)/kscope/cscope.files
+	kscope $(obj)/mainboard/$(MAINBOARDDIR)/kscope
+ALLSRC=$(STAGE0_SRC) $(INITRAM_SRC) $(STAGE2_SRC)
+$(obj)/mainboard/$(MAINBOARDDIR)/kscope/cscope.files: $(ALLSRC)
+	$(Q)mkdir -p $(obj)/mainboard/$(MAINBOARDDIR)/kscope
+	$(Q)cp cscope.proj $(obj)/mainboard/$(MAINBOARDDIR)/kscope
+	$(Q)sh util/mkdep $@ $(INITCFLAGS) "--" $(ALLSRC)
+#	$(Q)sort -u -o $@ $@
+
--
coreboot mailing list: coreboot@coreboot.org
http://www.coreboot.org/mailman/listinfo/coreboot

Reply via email to