unmodified_drivers: make usbfront build conditional
authorJan Beulich <jbeulich@suse.com>
Thu, 23 Jan 2014 09:29:12 +0000 (10:29 +0100)
committerJan Beulich <jbeulich@suse.com>
Thu, 23 Jan 2014 09:29:12 +0000 (10:29 +0100)
Commit 0dcfb88fb8 ("unmodified_drivers: enable build of usbfront
driver") results in the PV drivers to no longer build against older
(pre-2.6.35) Linux versions. That's because usbfront.h includes
headers from drivers/usb/core/, which is generally unavailable when
building out-of-tree modules.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
unmodified_drivers/linux-2.6/usbfront/Kbuild

index f44deaaec5382e896793724196202ce36eeae43d..321a35a122504d91f3fa3791ddcacd277329f64f 100644 (file)
@@ -1,5 +1,7 @@
 include $(M)/overrides.mk
 
-obj-m += xen-usb.o
+obj-m += $(if $(shell grep '^\#include "\.\./\.\./' $(obj)/usbfront.h), \
+             $(warning usbfront cannot be built), \
+             xen-usb.o)
 
 xen-usb-objs := usbfront-hcd.o xenbus.o