Skip to content

Commit

Permalink
Makefile: ctags support
Browse files Browse the repository at this point in the history
Add 'tags' and 'TAGS' targets to generate corresponding ctags files.

Signed-off-by: Mathias Krause <[email protected]>
  • Loading branch information
minipli-oss committed Aug 28, 2023
1 parent 51af605 commit 2637a0b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ endif
LD := ld

NM := nm
CTAGS := ctags
PYTHON := $(shell tools/ci/get-python.sh)
SHELL := bash
RM := rm
Expand Down Expand Up @@ -230,6 +231,7 @@ clean:
$(VERBOSE) find $(KTF_ROOT) -name \*.img -delete
$(VERBOSE) find $(KTF_ROOT) -name \*.xz -delete
$(VERBOSE) find $(KTF_ROOT) -name cscope.\* -delete
$(VERBOSE) find $(KTF_ROOT) -maxdepth 1 \( -name tags -or -name TAGS \) -delete
$(VERBOSE) find $(KTF_ROOT) -name $(ASM_OFFSETS_S) -delete
$(VERBOSE) find $(KTF_ROOT) -name $(ASM_OFFSETS_H) -delete
$(VERBOSE) find $(PFMLIB_DIR) -mindepth 1 ! -name $(PFMLIB_NAME)-$(PFMLIB_VER).tar.gz -delete
Expand Down Expand Up @@ -315,6 +317,10 @@ cscope:
$(VERBOSE) $(all_sources) > cscope.files
$(VERBOSE) cscope -b -q -k

tags TAGS: $(SOURCES) $(HEADERS) $(ASM_SOURCES)
@echo "TAGS ($@)"
$(VERBOSE) $(CTAGS) -o $@ $+

.PHONY: style
style:
@echo "STYLE"
Expand Down

0 comments on commit 2637a0b

Please sign in to comment.