make tags target for ctags
I want to generate ctags whenever I make
This commit is contained in:
@@ -0,0 +1 @@
|
||||
tags
|
||||
@@ -7,7 +7,7 @@ TESTBIN := /tmp/all_tests
|
||||
|
||||
.PHONY: test
|
||||
|
||||
test:
|
||||
test: tags
|
||||
@echo "Discovering test files..."
|
||||
@files=$$(find . -type f -name 'test*.c'); \
|
||||
if [ -z "$$files" ]; then \
|
||||
@@ -18,3 +18,11 @@ test:
|
||||
echo "Running tests..."; \
|
||||
$(TESTBIN); \
|
||||
fi
|
||||
|
||||
|
||||
PROJECT_ROOT := $(shell pwd)
|
||||
PROJECT_C_FILES := $(shell find $(PROJECT_ROOT) \( -name '*.c' -o -name '*.h' \))
|
||||
CRITERION_HEADERS := $(shell find /usr/include/criterion)
|
||||
ALL_FILES := $(PROJECT_C_FILES) $(CRITERION_HEADERS)
|
||||
tags: $(ALL_FILES)
|
||||
ctags $(ALL_FILES)
|
||||
|
||||
Reference in New Issue
Block a user