提交 f3dfd599 编写于 作者: D David Howells

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: NDavid Howells <dhowells@redhat.com>
上级 b2249fbd
...@@ -21,18 +21,15 @@ header-y += usb/ ...@@ -21,18 +21,15 @@ header-y += usb/
header-y += wimax/ header-y += wimax/
ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/asm/a.out.h \ ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/asm/a.out.h \
$(srctree)/include/asm-$(SRCARCH)/a.out.h \ $(srctree)/arch/$(SRCARCH)/include/uapi/asm/a.out.h),)
$(INSTALL_HDR_PATH)/include/asm-*/a.out.h),)
header-y += a.out.h header-y += a.out.h
endif endif
ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/asm/kvm.h \ ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/asm/kvm.h \
$(srctree)/include/asm-$(SRCARCH)/kvm.h \ $(srctree)/arch/$(SRCARCH)/include/uapi/asm/kvm.h),)
$(INSTALL_HDR_PATH)/include/asm-*/kvm.h),)
header-y += kvm.h header-y += kvm.h
endif endif
ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/asm/kvm_para.h \ ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/asm/kvm_para.h \
$(srctree)/include/asm-$(SRCARCH)/kvm_para.h \ $(srctree)/arch/$(SRCARCH)/include/uapi/asm/kvm_para.h),)
$(INSTALL_HDR_PATH)/include/asm-*/kvm_para.h),)
header-y += kvm_para.h header-y += kvm_para.h
endif endif
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册