diff options
author | Alex Bennée | 2021-01-14 17:57:20 +0100 |
---|---|---|
committer | Alex Bennée | 2021-01-18 11:04:31 +0100 |
commit | b8a322549b9842a9628e25eff31dbc706b182d7c (patch) | |
tree | 62bc8377bed0e8a26f1be641cd3ab131dee3d4b0 /Makefile | |
parent | tests/docker: Remove Debian 9 remnant lines (diff) | |
download | qemu-b8a322549b9842a9628e25eff31dbc706b182d7c.tar.gz qemu-b8a322549b9842a9628e25eff31dbc706b182d7c.tar.xz qemu-b8a322549b9842a9628e25eff31dbc706b182d7c.zip |
Makefile: add GNU global tags support
GNU Global is another tags engine which is more like cscope in being
able to support finding both references and definitions. You will be
un-surprised to know it also integrates well with Emacs.
The main benefit of integrating it into find-src-path is it takes less
time to rebuild the database from scratch when you have a lot of build
directories under your source tree.
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20210114165730.31607-3-alex.bennee@linaro.org>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 14 |
1 files changed, 13 insertions, 1 deletions
@@ -253,6 +253,18 @@ ctags: rm -f "$(SRC_PATH)/"tags $(find-src-path) -exec ctags -f "$(SRC_PATH)/"tags --append {} + +.PHONY: gtags +gtags: + $(call quiet-command, \ + rm -f "$(SRC_PATH)/"GTAGS; \ + rm -f "$(SRC_PATH)/"GRTAGS; \ + rm -f "$(SRC_PATH)/"GPATH, \ + "GTAGS", "Remove old $@ files") + $(call quiet-command, \ + (cd $(SRC_PATH) && \ + $(find-src-path) | gtags -f -), \ + "GTAGS", "Re-index $(SRC_PATH)") + .PHONY: TAGS TAGS: rm -f "$(SRC_PATH)/"TAGS @@ -279,7 +291,7 @@ help: $(call print-help,all,Build all) $(call print-help,dir/file.o,Build specified target only) $(call print-help,install,Install QEMU, documentation and tools) - $(call print-help,ctags/TAGS,Generate tags file for editors) + $(call print-help,ctags/gtags/TAGS,Generate tags file for editors) $(call print-help,cscope,Generate cscope index) $(call print-help,sparse,Run sparse on the QEMU source) @echo '' |