Fix: disable kvm probe if lapic.h isn't found
authorChris J Arges <chris.j.arges@canonical.com>
Fri, 24 Jul 2015 18:18:59 +0000 (13:18 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 14 Aug 2015 18:14:19 +0000 (14:14 -0400)
In a typical distribution if just linux-headers is installed, lapic.h
will not be installed. We should check if that file exists and not build
the module.

Signed-off-by: Chris J Arges <chris.j.arges@canonical.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
probes/Makefile

index 0314a5e2205679616f015a37dd7ec727fd3f6270..cc4c352168dcef0f97f57a0a6963d65401770a5a 100644 (file)
@@ -25,6 +25,8 @@ obj-m += lttng-probe-statedump.o
 ifneq ($(CONFIG_KVM),)
 obj-m += lttng-probe-kvm.o
 ifneq ($(CONFIG_X86),)
+kvm_dep_lapic = $(srctree)/arch/x86/kvm/lapic.h
+ifneq ($(wildcard $(kvm_dep_lapic)),)
 kvm_dep = $(srctree)/virt/kvm/iodev.h $(srctree)/include/kvm/iodev.h
 ifneq ($(wildcard $(kvm_dep)),)
 CFLAGS_lttng-probe-kvm-x86.o += -I$(srctree)/virt/kvm
@@ -40,6 +42,9 @@ obj-m +=  $(shell \
 else
 $(warning File $(kvm_dep) not found. Probe "kvm" x86-specific is disabled. Use full kernel source tree to enable it.)
 endif
+else
+$(warning File $(kvm_dep_lapic) not found. Probe "kvm" x86-specific is disabled. Use full kernel source tree to enable it.)
+endif
 endif
 endif
 
This page took 0.026156 seconds and 4 git commands to generate.