fix: also lint internal header files
All checks were successful
ci/woodpecker/pr/lint Pipeline was successful
ci/woodpecker/pr/test Pipeline was successful
ci/woodpecker/pr/test-mem Pipeline was successful

This commit is contained in:
Jef Roosens 2023-02-23 10:13:58 +01:00
parent d9402ced54
commit 38e84afd1d
Signed by: Jef Roosens
GPG key ID: B75D4F293C7052DB
4 changed files with 37 additions and 34 deletions

View file

@ -11,7 +11,7 @@ INC_DIRS ?= include
LIB := $(BUILD_DIR)/$(LIB_FILENAME)
SRCS != find '$(SRC_DIR)' -iname '*.c'
SRCS_H != find $(INC_DIRS) -iname '*.h'
SRCS_H != find $(INC_DIRS) '$(SRC_DIR)' -iname '*.h'
SRCS_TEST != find '$(TEST_DIR)' -iname '*.c'
OBJS := $(SRCS:%=$(BUILD_DIR)/%.o)
@ -66,15 +66,9 @@ $(TARGETS_TEST): test-%: %
$(TARGETS_MEM_TEST): test-mem-%: %
valgrind --tool=memcheck --error-exitcode=1 --track-origins=yes --leak-check=full ./$^
test-mem: build-test
@ $(foreach bin,$(BINS_TEST),valgrind --tool=memcheck --error-exitcode=1 \
--track-origins=yes --leak-check=full ./$(bin);)
.PHONY: build-test
build-test: $(BINS_TEST)
# For simplicity, we link every object file to each of the test files. This
# might be changed later if this starts to become too slow.
$(BINS_TEST): %: %.c.o $(LIB)
$(CC) \
$^ -o $@