summaryrefslogtreecommitdiffstats
path: root/include/uapi/Kbuild
diff options
context:
space:
mode:
authorMasahiro Yamada2019-06-04 12:14:03 +0200
committerMasahiro Yamada2019-06-15 12:57:02 +0200
commitd5470d14431e9d39ee2131323589afac2a0bfee4 (patch)
tree525d6420912fd5280d8678c09b61e050bce82173 /include/uapi/Kbuild
parentkbuild: add 'headers' target to build up uapi headers in usr/include (diff)
downloadkernel-qcow2-linux-d5470d14431e9d39ee2131323589afac2a0bfee4.tar.gz
kernel-qcow2-linux-d5470d14431e9d39ee2131323589afac2a0bfee4.tar.xz
kernel-qcow2-linux-d5470d14431e9d39ee2131323589afac2a0bfee4.zip
kbuild: re-implement Makefile.headersinst without recursion
Since commit fcc8487d477a ("uapi: export all headers under uapi directories"), the headers in uapi directories are all exported by default although exceptional cases are still allowed by the syntax 'no-export-headers'. The traditional directory descending has been kept (in a somewhat hacky way), but it is actually unneeded. Get rid of it to simplify the code. Also, handle files one by one instead of the previous per-directory processing. This will emit much more log, but I like it. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Diffstat (limited to 'include/uapi/Kbuild')
-rw-r--r--include/uapi/Kbuild14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/uapi/Kbuild b/include/uapi/Kbuild
new file mode 100644
index 000000000000..61ee6e59c930
--- /dev/null
+++ b/include/uapi/Kbuild
@@ -0,0 +1,14 @@
+# SPDX-License-Identifier: GPL-2.0
+ifeq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/uapi/asm/a.out.h),)
+no-export-headers += linux/a.out.h
+endif
+
+ifeq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/uapi/asm/kvm.h),)
+no-export-headers += linux/kvm.h
+endif
+
+ifeq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/uapi/asm/kvm_para.h),)
+ifeq ($(wildcard $(objtree)/arch/$(SRCARCH)/include/generated/uapi/asm/kvm_para.h),)
+no-export-headers += linux/kvm_para.h
+endif
+endif