[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v8.1 19/27] xsplice: Add support for alternatives



>>> On 21.04.16 at 02:30, <konrad.wilk@xxxxxxxxxx> wrote:
> On Wed, Apr 20, 2016 at 12:28:02AM -0600, Jan Beulich wrote:
>> >>> Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx> 04/14/16 12:02 AM >>>
>> >--- a/xen/arch/x86/Makefile
>> >+++ b/xen/arch/x86/Makefile
>> >@@ -6,7 +6,11 @@ subdir-y += mm
>>  >subdir-$(CONFIG_XENOPROF) += oprofile
>>  >subdir-y += x86_64
>>  >
>> >+ifdef CONFIG_XSPLICE
>> >+obj-y += alternative.o
>> >+else
>>  >obj-bin-y += alternative.init.o
>> >+endif
>>  
>> For now this is okay, but please try to use the list model in favor of 
>> ifdef-s in
>> the future, whenever possible.
> 
> 
> As in: 
> obj-$(CONFIG_XSPLICE) += alternative.o xsplice.o 
> 
> .. but then how do I define an build for alternative.init.o?
> 
> ifndef CONFIG_XSPLICE
>  obj-bin-$(CONFIG_XSPLICE) += alternative.init.o  
> endif

alternative-y := alternative.init.o
alternative-$(CONFIG_XSPLICE) :=
obj-$(CONFIG_XSPLICE) += alternative.o xsplice.o
obj-bin-y += $(alternative-y)

The main goal with this purely list based approach being that this
way it doesn't matter whether CONFIG_XSPLICE is undefined,
defined but empty, or CONFIG_XSPLICE=n.

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.