Add cscope/ctags generation for the current project
Use the dependency files to generate ctags or cscope data for the current project instead of the entire coreboot tree. This isn't completely working for every platform at this point - while it finds all of the code in the coreboot/src tree, it doesn't find the code in 3rdparty right now. Change-Id: Ie8aabcf46c8a69f718940c9e0fd7e7b05c9ce1fb Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: http://review.coreboot.org/11074 Tested-by: build bot (Jenkins) Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
This commit is contained in:
parent
d6cc617e17
commit
9c1b33e74b
19
Makefile
19
Makefile
|
@ -251,6 +251,19 @@ ifndef NOMKDIR
|
|||
$(shell mkdir -p $(KCONFIG_SPLITCONFIG) $(objk)/lxdialog $(additional-dirs) $(alldirs))
|
||||
endif
|
||||
|
||||
$(obj)/project_filelist.txt: all
|
||||
find $(obj) -name "*.d" -exec cat {} \; | \
|
||||
sed 's/[:\\]/ /g' | sed 's/ /\n/g' | sort | uniq | \
|
||||
grep -v '\.o$$' > $(obj)/project_filelist.txt
|
||||
|
||||
#works with either exuberant ctags or ctags.emacs
|
||||
ctags-project: clean-ctags $(obj)/project_filelist.txt
|
||||
cat $(obj)/project_filelist.txt | \
|
||||
xargs ctags -o tags
|
||||
|
||||
cscope-project: clean-cscope $(obj)/project_filelist.txt
|
||||
cat $(obj)/project_filelist.txt | xargs cscope -b
|
||||
|
||||
cscope:
|
||||
cscope -bR
|
||||
|
||||
|
@ -274,7 +287,11 @@ clean: clean-for-update clean-target
|
|||
clean-cscope:
|
||||
rm -f cscope.out
|
||||
|
||||
distclean: clean
|
||||
clean-ctags:
|
||||
rm -f tags
|
||||
|
||||
distclean: clean clean-ctags clean-cscope
|
||||
rm -f .config .config.old ..config.tmp .kconfig.d .tmpconfig* .ccwrap .xcompile
|
||||
|
||||
.PHONY: $(PHONY) clean clean-for-update clean-cscope cscope distclean doxygen doxy doxygen_simple
|
||||
.PHONY: ctags-project cscope-project clean-ctags
|
||||
|
|
Loading…
Reference in New Issue