Debian Codegraph @

include/drm/Makefile

raw
1 # SPDX-License-Identifier: GPL-2.0
2
3 # Ensure drm headers are self-contained and pass kernel-doc
4 hdrtest-files := \
5 $(shell cd $(src) && find * -name '*.h' 2>/dev/null)
6
7 always-$(CONFIG_DRM_HEADER_TEST) += \
8 $(patsubst %.h,%.hdrtest, $(hdrtest-files))
9
10 # Include the header twice to detect missing include guard.
11 quiet_cmd_hdrtest = HDRTEST $(patsubst %.hdrtest,%.h,$@)
12 cmd_hdrtest = \
13 $(CC) $(c_flags) -fsyntax-only -x c /dev/null -include $< -include $<; \
14 PYTHONDONTWRITEBYTECODE=1 $(PYTHON3) $(KERNELDOC) -none $(if $(CONFIG_WERROR)$(CONFIG_DRM_WERROR),-Werror) $<; \
15 touch $@
16
17 $(obj)/%.hdrtest: $(src)/%.h FORCE
18 $(call if_changed_dep,hdrtest)