Linux-libre 5.3.12-gnu
[librecmc/linux-libre.git] / drivers / gpu / drm / i915 / gem / Makefile.header-test
1 # SPDX-License-Identifier: MIT
2 # Copyright © 2019 Intel Corporation
3
4 # Test the headers are compilable as standalone units
5 header_test := $(notdir $(wildcard $(src)/*.h))
6
7 quiet_cmd_header_test = HDRTEST $@
8       cmd_header_test = echo "\#include \"$(<F)\"" > $@
9
10 header_test_%.c: %.h
11         $(call cmd,header_test)
12
13 extra-$(CONFIG_DRM_I915_WERROR) += \
14         $(foreach h,$(header_test),$(patsubst %.h,header_test_%.o,$(h)))
15
16 clean-files += $(foreach h,$(header_test),$(patsubst %.h,header_test_%.c,$(h)))