diff options
author | David Howells <dhowells@redhat.com> | 2012-10-04 13:16:47 -0400 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2012-10-04 13:16:47 -0400 |
commit | f3dfd599af993385b40fc7a1c947afc12729bc4d (patch) | |
tree | 85e23dfa92889456a445b1ba2e0c961d5f8fe774 /include | |
parent | b2249fbd7cbc6741e64474d8617453d20acc12e6 (diff) |
UAPI: Fix conditional header installation handling (notably kvm_para.h on m68k)
The m68k arch doesn't have a kvm_para.h (unlike most or maybe all other
arches), but there is one in asm-generic. This means that:
ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/asm/kvm_para.h \
$(srctree)/include/asm-$(SRCARCH)/kvm_para.h \
$(INSTALL_HDR_PATH)/include/asm-*/kvm_para.h),)
header-y += kvm_para.h
endif
gets it wrong because it is invoked twice during the header installation - and
on the second occasion, asm-generic/kvm_para.h has been installed in usr/,
thus triggering a attempt to install asm-m68k/kvm_para.h which will fail.
There are three headers with this sort of conditional logic: a.out.h, kvm.h
and kvm_para.h. For all three of them, change the logic to be something like:
ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/asm/kvm_para.h \
$(srctree)/arch/$(SRCARCH)/include/uapi/asm/kvm_para.h),)
which finds the header in only the two places it should be found, and doesn't
get incorrectly triggered by the installation of asm-generic's version.
Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/Kbuild | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/include/linux/Kbuild b/include/linux/Kbuild index e149e8be9065..aab5c85879b2 100644 --- a/include/linux/Kbuild +++ b/include/linux/Kbuild | |||
@@ -21,18 +21,15 @@ header-y += usb/ | |||
21 | header-y += wimax/ | 21 | header-y += wimax/ |
22 | 22 | ||
23 | ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/asm/a.out.h \ | 23 | ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/asm/a.out.h \ |
24 | $(srctree)/include/asm-$(SRCARCH)/a.out.h \ | 24 | $(srctree)/arch/$(SRCARCH)/include/uapi/asm/a.out.h),) |
25 | $(INSTALL_HDR_PATH)/include/asm-*/a.out.h),) | ||
26 | header-y += a.out.h | 25 | header-y += a.out.h |
27 | endif | 26 | endif |
28 | ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/asm/kvm.h \ | 27 | ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/asm/kvm.h \ |
29 | $(srctree)/include/asm-$(SRCARCH)/kvm.h \ | 28 | $(srctree)/arch/$(SRCARCH)/include/uapi/asm/kvm.h),) |
30 | $(INSTALL_HDR_PATH)/include/asm-*/kvm.h),) | ||
31 | header-y += kvm.h | 29 | header-y += kvm.h |
32 | endif | 30 | endif |
33 | ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/asm/kvm_para.h \ | 31 | ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/asm/kvm_para.h \ |
34 | $(srctree)/include/asm-$(SRCARCH)/kvm_para.h \ | 32 | $(srctree)/arch/$(SRCARCH)/include/uapi/asm/kvm_para.h),) |
35 | $(INSTALL_HDR_PATH)/include/asm-*/kvm_para.h),) | ||
36 | header-y += kvm_para.h | 33 | header-y += kvm_para.h |
37 | endif | 34 | endif |
38 | 35 | ||