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
|
.PHONY: test
|
||||||
|
|
||||||
test:
|
test: tags
|
||||||
@echo "Discovering test files..."
|
@echo "Discovering test files..."
|
||||||
@files=$$(find . -type f -name 'test*.c'); \
|
@files=$$(find . -type f -name 'test*.c'); \
|
||||||
if [ -z "$$files" ]; then \
|
if [ -z "$$files" ]; then \
|
||||||
@@ -18,3 +18,11 @@ test:
|
|||||||
echo "Running tests..."; \
|
echo "Running tests..."; \
|
||||||
$(TESTBIN); \
|
$(TESTBIN); \
|
||||||
fi
|
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