From b305b00626dbfab98ff58e45ac02830228380172 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 9344e71d98..6a8b230077 100644 --- a/Makefile +++ b/Makefile @@ -138,11 +138,11 @@ C_SOURCE_FILES = $(wildcard \ 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