From 646ad22afc56adc290cee3b46a9e9de182951b22 Mon Sep 17 00:00:00 2001 From: Gilles Peskine Date: Mon, 9 Nov 2020 21:20:16 +0100 Subject: [PATCH 1/3] Update the list of directories containing source files The list hadn't been updated since the addition of 3rdparty and of tests/src and tests/include. Signed-off-by: Gilles Peskine --- Makefile | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index d00183e5a..a6ee2aec4 100644 --- a/Makefile +++ b/Makefile @@ -126,7 +126,16 @@ apidoc_clean: endif ## Editor navigation files -C_SOURCE_FILES = $(wildcard include/*/*.h library/*.[hc] programs/*/*.[hc] tests/suites/*.function) +C_SOURCE_FILES = $(wildcard \ + 3rdparty/*/include/*/*.h 3rdparty/*/include/*/*/*.h 3rdparty/*/include/*/*/*/*.h \ + 3rdparty/*/*.c 3rdparty/*/*/*.c 3rdparty/*/*/*/*.c 3rdparty/*/*/*/*/*.c \ + include/*/*.h \ + library/*.[hc] \ + programs/*/*.[hc] \ + tests/include/*/*.h tests/include/*/*/*.h \ + tests/src/*.c tests/src/*/*.c \ + tests/suites/*.function \ +) # Exuberant-ctags invocation. Other ctags implementations may require different options. CTAGS = ctags --langmap=c:+.h.function -o tags: $(C_SOURCE_FILES) From d0c780198d8b090ba8231d446a0f1eb3cf325096 Mon Sep 17 00:00:00 2001 From: Gilles Peskine Date: Mon, 9 Nov 2020 21:21:31 +0100 Subject: [PATCH 2/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 a6ee2aec4..663df86a7 100644 --- a/Makefile +++ b/Makefile @@ -144,3 +144,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 8346c7a9f07bd75fd7fabb2a32be2d6399742d4d 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 663df86a7..f8d26d2b2 100644 --- a/Makefile +++ b/Makefile @@ -142,7 +142,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