From d65df0de7e2bd4d33d0a438424f75b226a6ebc62 Mon Sep 17 00:00:00 2001 From: Julian Blake Kongslie Date: Sun, 26 Jun 2022 22:41:01 -0700 Subject: IWYU check on top-level headers. --- Makefile | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Makefile b/Makefile index 5c0e04a..c2838bf 100644 --- a/Makefile +++ b/Makefile @@ -84,6 +84,18 @@ include ${DEPFILES} $(foreach part,${PARTS},$(eval $(call mklib,${part}))) +ifdef iwyu + +build/iwyu.cpp: + @mkdir -p $(dir $@) + @tools/iwyu-header $(wildcard *.h) > $@ + @$(call iwyu,$@) +.PHONY: build/iwyu.cpp + +IWYU_CPPS += build/iwyu.cpp + +endif + MAINOBJS := $(patsubst %.cpp,build/%.o,$(wildcard *.cpp)) MAINOBJS += build/git-tag.o -- cgit v1.2.3