From efe6103963c6756f5c7b7726adf4e2aea53cd51b Mon Sep 17 00:00:00 2001 From: Wei Liu Date: Mon, 26 Sep 2016 16:07:33 +0100 Subject: [PATCH] Makefile: introduce gtags target Signed-off-by: Wei Liu Reviewed-by: Andrew Cooper --- .gitignore | 3 +++ Makefile | 10 +++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index f69e7fc..28c7874 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,6 @@ /selftests/test-* /tests/*/test-* /tests/*/info.json +/GPATH +/GRTAGS +/GTAGS diff --git a/Makefile b/Makefile index 17d784e..8f63bab 100644 --- a/Makefile +++ b/Makefile @@ -50,11 +50,19 @@ install: $(MAKE) -C $$D install; \ done +define all_sources + find include/ arch/ common/ tests/ -name "*.[hcsS]" +endef + .PHONY: cscope cscope: - find include/ arch/ common/ tests/ -name "*.[hcsS]" > cscope.files + $(all_sources) > cscope.files cscope -b -q -k +.PHONY: gtags +gtags: + $(all_sources) | gtags -f - + .PHONY: clean clean: find . \( -name "*.o" -o -name "*.d" -o -name "*.lds" \) -delete -- 2.39.5