qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Alex Bennée" <alex.bennee@linaro.org>
To: qemu-devel@nongnu.org
Cc: "Alex Bennée" <alex.bennee@linaro.org>
Subject: [PATCH  v1 2/9] Makefile: add GNU global tags support
Date: Wed, 13 Jan 2021 15:14:01 +0000	[thread overview]
Message-ID: <20210113151408.27939-3-alex.bennee@linaro.org> (raw)
In-Reply-To: <20210113151408.27939-1-alex.bennee@linaro.org>

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>

---
v2
  - run in SRC_PATH
  - wrap in quiet-command
---
 Makefile   | 14 +++++++++++++-
 .gitignore |  3 +++
 2 files changed, 16 insertions(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index fb9923ff22..0c509a7704 100644
--- a/Makefile
+++ b/Makefile
@@ -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  ''
diff --git a/.gitignore b/.gitignore
index b32bca1315..75a4be0724 100644
--- a/.gitignore
+++ b/.gitignore
@@ -7,6 +7,9 @@
 cscope.*
 tags
 TAGS
+GPATH
+GRTAGS
+GTAGS
 *~
 *.ast_raw
 *.depend_raw
-- 
2.20.1



  parent reply	other threads:[~2021-01-13 15:22 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-13 15:13 [PATCH v1 0/9] testing/next (tags!, more travis/shippable deprecation) Alex Bennée
2021-01-13 15:14 ` [PATCH v1 1/9] tests/docker: Remove Debian 9 remnant lines Alex Bennée
2021-01-13 15:14 ` Alex Bennée [this message]
2021-01-13 15:14 ` [PATCH v1 3/9] shippable.yml: Remove jobs duplicated on Gitlab-CI Alex Bennée
2021-01-13 15:14 ` [PATCH v1 4/9] Add newline when generating Dockerfile Alex Bennée
2021-01-13 15:14 ` [PATCH v1 5/9] Makefile: wrap ctags in quiet-command calls Alex Bennée
2021-01-13 15:14 ` [PATCH v1 6/9] Makefile: wrap etags " Alex Bennée
2021-01-13 15:14 ` [PATCH v1 7/9] Makefile: wrap cscope " Alex Bennée
2021-01-13 15:14 ` [PATCH v1 8/9] docker: expand debian-amd64 image to include tag tools Alex Bennée
2021-01-13 15:14 ` [PATCH v1 9/9] gitlab: move docs and tools build across from Travis Alex Bennée
2021-01-13 15:35   ` Thomas Huth
2021-01-13 15:37   ` Daniel P. Berrangé
2021-01-13 15:46     ` Peter Maydell
2021-01-13 15:49       ` Daniel P. Berrangé
2021-01-13 16:27     ` Alex Bennée
2021-01-13 16:32       ` Daniel P. Berrangé
2021-01-13 19:25         ` Peter Maydell
2021-01-13 17:30   ` Wainer dos Santos Moschetta

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210113151408.27939-3-alex.bennee@linaro.org \
    --to=alex.bennee@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).