From 53f74d0f865f0d2d5cdc610dd9d81fa98c4da825 Mon Sep 17 00:00:00 2001 From: Gilles Peskine Date: Mon, 9 Nov 2020 21:21:31 +0100 Subject: [PATCH 1/3] Add a target for the cscope index Signed-off-by: Gilles Peskine --- Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Makefile b/Makefile index bcc247a34e..bc29ed639f 100644 --- a/Makefile +++ b/Makefile @@ -119,3 +119,5 @@ TAGS: $(C_SOURCE_FILES) etags -o $@ $(C_SOURCE_FILES) GPATH GRTAGS GSYMS GTAGS: $(C_SOURCE_FILES) ls $(C_SOURCE_FILES) | gtags -f - --gtagsconf .globalrc +cscope.in.out cscope.po.out cscope.out: $(C_SOURCE_FILES) + cscope -bq -u -Iinclude -Ilibrary $(patsubst %,-I%,$(wildcard 3rdparty/*/include)) -Itests/include $(C_SOURCE_FILES) From 3335e9f71882a5d126fc137a6585bfb508e4bd97 Mon Sep 17 00:00:00 2001 From: Gilles Peskine Date: Mon, 9 Nov 2020 21:28:15 +0100 Subject: [PATCH 2/3] Ignore cscope index Signed-off-by: Gilles Peskine --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 789f57ee0f..5fb0bdebf8 100644 --- a/.gitignore +++ b/.gitignore @@ -40,4 +40,5 @@ massif-* /GSYMS /GTAGS /TAGS +/cscope*.out /tags From 015356f8b71d47a50ad6ec7d34291dd1726ff65e Mon Sep 17 00:00:00 2001 From: Gilles Peskine Date: Fri, 20 Nov 2020 11:50:08 +0100 Subject: [PATCH 3/3] Add abstract target names for index generation Signed-off-by: Gilles Peskine --- Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Makefile b/Makefile index bc29ed639f..f9c454676d 100644 --- a/Makefile +++ b/Makefile @@ -117,7 +117,10 @@ tags: $(C_SOURCE_FILES) $(CTAGS) $@ $(C_SOURCE_FILES) TAGS: $(C_SOURCE_FILES) etags -o $@ $(C_SOURCE_FILES) +global: GPATH GRTAGS GSYMS GTAGS GPATH GRTAGS GSYMS GTAGS: $(C_SOURCE_FILES) ls $(C_SOURCE_FILES) | gtags -f - --gtagsconf .globalrc +cscope: cscope.in.out cscope.po.out cscope.out cscope.in.out cscope.po.out cscope.out: $(C_SOURCE_FILES) cscope -bq -u -Iinclude -Ilibrary $(patsubst %,-I%,$(wildcard 3rdparty/*/include)) -Itests/include $(C_SOURCE_FILES) +.PHONY: cscope global