attached.
ron
On Mon, Oct 06, 2008 at 05:26:47PM -0700, ron minnich wrote:
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 rminnich@gmail.com
Index: util/mkdep
--- util/mkdep (revision 0) +++ util/mkdep (revision 0) @@ -0,0 +1,16 @@
As always, add the usual license header please.
+#!/bin/bash
I'd make this /bin/sh if that works, we don't want to depend on bash, various people might use other shells.
+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
Yep, that looks like an (unrelated?) bug.
SILENT := >/dev/null 2>&1
@@ -275,3 +275,17 @@ $(Q)$(NM) $(obj)/coreboot.initram | sort -u > $(obj)/coreboot.initram.map
endif
+# +# For Kscope
Add the project URL here, I'd say (for convenience).
+#
+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)
Actually, maybe it's better to merge mkdep in the Makefile itself? That would save us yet another tiny file cluttering up the space... Opinions?
Uwe.
On Mon, Oct 6, 2008 at 5:36 PM, Uwe Hermann uwe@hermann-uwe.de wrote:
Actually, maybe it's better to merge mkdep in the Makefile itself? That would save us yet another tiny file cluttering up the space... Opinions?
it's fine by me. That is a really generic script that would even work on Plan 9 ... the acid test.
Whatever this group thinks best.
Thanks again.
ron