From f70a3144a06d02d371449c94f0a003f4e4471874 Mon Sep 17 00:00:00 2001 From: Gilles Peskine Date: Wed, 13 Jan 2021 13:45:30 +0100 Subject: [PATCH] TAGS: Fix lookup in test/suites/!(test_suite_*).function tests/suites/helpers.function and tests/suites/*_test.function contain "#line" directives. This causes the TAGS file to contain references pointing to the file path named in the "#line" directives, which is relative to the "tests" directory rather than to the toplevel. Fix this by telling etags to ignore "#line" directives, which is ok since we aren't actually running it on any generated code. Signed-off-by: Gilles Peskine --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 3942fbd3d..ffa3aa04f 100644 --- a/Makefile +++ b/Makefile @@ -124,11 +124,11 @@ endif ## Editor navigation files C_SOURCE_FILES = $(wildcard include/*/*.h library/*.[hc] programs/*/*.[hc] tests/suites/*.function) # Exuberant-ctags invocation. Other ctags implementations may require different options. -CTAGS = ctags --langmap=c:+.h.function -o +CTAGS = ctags --langmap=c:+.h.function --line-directives=no -o tags: $(C_SOURCE_FILES) $(CTAGS) $@ $(C_SOURCE_FILES) TAGS: $(C_SOURCE_FILES) - etags -o $@ $(C_SOURCE_FILES) + etags --no-line-directive -o $@ $(C_SOURCE_FILES) global: GPATH GRTAGS GSYMS GTAGS GPATH GRTAGS GSYMS GTAGS: $(C_SOURCE_FILES) ls $(C_SOURCE_FILES) | gtags -f - --gtagsconf .globalrc