Skip to content

Commit

Permalink
Added etags/ctags TAGS makefile target and emacs .dir-locals.el pick-up
Browse files Browse the repository at this point in the history
Should've done this 8 years ago.
  • Loading branch information
edenhill committed May 27, 2020
1 parent 1007ab0 commit 5e771db
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .dir-locals.el
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,6 @@
(tab-width . 8)
(indent-tabs-mode . nil))
)

(if (file-exists-p (concat (dir-locals-find-file "./") "TAGS"))
(visit-tags-table (concat (dir-locals-find-file "./") "TAGS")))
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,4 @@ stats*.json
test_report*.json
cov-int
gdbrun*.gdb
TAGS
11 changes: 11 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,17 @@ LICENSES.txt: .PHONY
@cmp $@ $@.tmp || mv $@.tmp $@ ; rm -f $@.tmp


TAGS: .PHONY
@(if which etags >/dev/null 2>&1 ; then \
echo "Using etags to generate $@" ; \
git ls-tree -r --name-only HEAD | egrep '\.(c|cpp|h)$$' | \
etags -f $@ - ; \
else \
echo "Using ctags to generate $@" ; \
git ls-tree -r --name-only HEAD | egrep '\.(c|cpp|h)$$' | \
ctags -e -f $@ -L- ; \
fi)

coverity: Makefile.config
@(which cov-build >/dev/null 2>&1 || echo "Make sure coverity../bin is in your PATH")
@(cd src && \
Expand Down

0 comments on commit 5e771db

Please sign in to comment.