VisionFive2 Linux kernel

StarFive Tech Linux Kernel for VisionFive (JH7110) boards (mirror)

More than 9999 Commits   33 Branches   57 Tags
author: Masahiro Yamada <yamada.masahiro@socionext.com> 2019-11-07 16:14:41 +0900 committer: Masahiro Yamada <yamada.masahiro@socionext.com> 2019-11-15 00:23:10 +0900 commit: 7ecaf069da52e472d393f03e79d721aabd724166 parent: fcbb8461fd2376ba3782b5b8bd440c929b8e4980
Commit Summary:
kbuild: move headers_check rule to usr/include/Makefile
Diffstat:
1 file changed, 6 insertions, 3 deletions
diff --git a/usr/include/Makefile b/usr/include/Makefile
index 325f4d0f2e73..24543a30b9f0 100644
--- a/usr/include/Makefile
+++ b/usr/include/Makefile
@@ -95,11 +95,14 @@ endif
 # asm-generic/*.h is used by asm/*.h, and should not be included directly
 header-test- += asm-generic/%
 
-extra-y := $(patsubst %.h,%.hdrtest, $(filter-out $(header-test-), \
-		$(patsubst $(obj)/%,%, $(shell find $(obj) -name '*.h'))))
+extra-y := $(patsubst $(obj)/%.h,%.hdrtest, $(shell find $(obj) -name '*.h'))
 
 quiet_cmd_hdrtest = HDRTEST $<
-      cmd_hdrtest = $(CC) $(c_flags) -S -o /dev/null -x c /dev/null -include $<; touch $@
+      cmd_hdrtest = \
+		$(CC) $(c_flags) -S -o /dev/null -x c /dev/null \
+			$(if $(filter-out $(header-test-), $*.h), -include $<); \
+		$(PERL) $(srctree)/scripts/headers_check.pl $(obj) $(SRCARCH) $<; \
+		touch $@
 
 $(obj)/%.hdrtest: $(obj)/%.h FORCE
 	$(call if_changed_dep,hdrtest)