| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 | UAPI_CFLAGS := -std=c90 -Werror=implicit-function-declaration
|
| 10 |
|
| 11 | override c_flags = $(KBUILD_USERCFLAGS) $(UAPI_CFLAGS) -Wp,-MMD,$(depfile) -I $(obj) -I $(srctree)/usr/dummy-include
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 | no-header-test += asm/ucontext.h
|
| 20 | no-header-test += drm/vmwgfx_drm.h
|
| 21 | no-header-test += linux/am437x-vpfe.h
|
| 22 | no-header-test += linux/coda.h
|
| 23 | no-header-test += linux/cyclades.h
|
| 24 | no-header-test += linux/errqueue.h
|
| 25 | no-header-test += linux/hdlc/ioctl.h
|
| 26 | no-header-test += linux/ivtv.h
|
| 27 | no-header-test += linux/matroxfb.h
|
| 28 | no-header-test += linux/omap3isp.h
|
| 29 | no-header-test += linux/omapfb.h
|
| 30 | no-header-test += linux/patchkey.h
|
| 31 | no-header-test += linux/phonet.h
|
| 32 | no-header-test += linux/sctp.h
|
| 33 | no-header-test += linux/sysctl.h
|
| 34 | no-header-test += linux/usb/audio.h
|
| 35 | no-header-test += linux/v4l2-mediabus.h
|
| 36 | no-header-test += linux/v4l2-subdev.h
|
| 37 | no-header-test += linux/videodev2.h
|
| 38 | no-header-test += linux/vm_sockets.h
|
| 39 | no-header-test += sound/asequencer.h
|
| 40 | no-header-test += sound/asoc.h
|
| 41 | no-header-test += sound/asound.h
|
| 42 | no-header-test += sound/compress_offload.h
|
| 43 | no-header-test += sound/emu10k1.h
|
| 44 | no-header-test += sound/sfnt_info.h
|
| 45 | no-header-test += xen/evtchn.h
|
| 46 | no-header-test += xen/gntdev.h
|
| 47 | no-header-test += xen/privcmd.h
|
| 48 |
|
| 49 |
|
| 50 |
|
| 51 | ifeq ($(SRCARCH),arc)
|
| 52 | no-header-test += linux/bpf_perf_event.h
|
| 53 | endif
|
| 54 |
|
| 55 | ifeq ($(SRCARCH),openrisc)
|
| 56 | no-header-test += linux/bpf_perf_event.h
|
| 57 | endif
|
| 58 |
|
| 59 | ifeq ($(SRCARCH),powerpc)
|
| 60 | no-header-test += linux/bpf_perf_event.h
|
| 61 | endif
|
| 62 |
|
| 63 | ifeq ($(SRCARCH),sparc)
|
| 64 | no-header-test += asm/uctx.h
|
| 65 | no-header-test += asm/fbio.h
|
| 66 | endif
|
| 67 |
|
| 68 |
|
| 69 | no-header-test += asm-generic/%
|
| 70 |
|
| 71 | always-y := $(patsubst $(obj)/%.h,%.hdrtest, $(shell find $(obj) -name '*.h' 2>/dev/null))
|
| 72 |
|
| 73 |
|
| 74 | quiet_cmd_hdrtest = HDRTEST $<
|
| 75 | cmd_hdrtest = \
|
| 76 | $(CC) $(c_flags) -fsyntax-only -Werror -x c /dev/null \
|
| 77 | $(if $(filter-out $(no-header-test), $*.h), -include $< -include $<); \
|
| 78 | $(PERL) $(src)/headers_check.pl $(obj) $<; \
|
| 79 | touch $@
|
| 80 |
|
| 81 | $(obj)/%.hdrtest: $(obj)/%.h $(src)/headers_check.pl FORCE
|
| 82 | $(call if_changed_dep,hdrtest)
|
| 83 |
|
| 84 |
|
| 85 |
|
| 86 | clean-files += $(filter-out Makefile headers_check.pl, $(notdir $(wildcard $(obj)/*)))
|