diff options
author | Martin Roth <martinroth@google.com> | 2015-07-29 14:55:18 -0700 |
---|---|---|
committer | Stefan Reinauer <stefan.reinauer@coreboot.org> | 2015-07-30 05:21:28 +0200 |
commit | 9c1b33e74bbb0a6ebcfa66bad80cdaad83a5fdf4 (patch) | |
tree | 5605856f6724419382f7cb8181e04e4d087ca084 | |
parent | d6cc617e171ddcaf83a8b6025d79025e13ba0cbb (diff) |
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>
-rw-r--r-- | Makefile | 19 |
1 files changed, 18 insertions, 1 deletions
@@ -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 |