From mboxrd@z Thu Jan 1 00:00:00 1970 From: George Dunlap Subject: Re: [PATCH] fix qemu building with older make Date: Mon, 28 Jul 2014 14:31:37 +0100 Message-ID: <53D650B9.6000903@eu.citrix.com> References: <53D6332002000078000267C3@mail.emea.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1XBl1j-0003RH-EV for xen-devel@lists.xenproject.org; Mon, 28 Jul 2014 13:31:43 +0000 In-Reply-To: <53D6332002000078000267C3@mail.emea.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Jan Beulich , xen-devel Cc: Ian Campbell , Keir Fraser , Ian Jackson , Tim Deegan List-Id: xen-devel@lists.xenproject.org On 07/28/2014 10:25 AM, Jan Beulich wrote: > The $(or ) builtin (uses introduced by commits ffbf089357 and > 8962a8f951) is supported only from make 3.81 onwards, yet we claim to > only require make 3.80. Introduce a good enough fallback. > > Signed-off-by: Jan Beulich I don't really know enough about make to have an opinion on the code itself; but re the idea: Acked-by: George Dunlap > > --- a/Config.mk > +++ b/Config.mk > @@ -12,6 +12,7 @@ space := $(empty) $(empty) > > # fallback for older make > realpath = $(wildcard $(foreach file,$(1),$(shell cd -P $(dir $(file)) && echo "$$PWD/$(notdir $(file))"))) > +or = $(if $(strip $(1)),$(1),$(if $(strip $(2)),$(2),$(if $(strip $(3)),$(3),$(if $(strip $(4)),$(4))))) > > -include $(XEN_ROOT)/.config > > @@ -266,11 +267,11 @@ QEMU_TRADITIONAL_REVISION ?= d0395cc49b2 > # QEMU_UPSTREAM_LOC ?= `pwd`/$(XEN_ROOT)/../qemu-xen.git > > # Defaults for subtree locations > -QEMU_TRADITIONAL_LOC ?= $(or $(wildcard $(QEMU_TRADITIONAL_INTREE)),\ > - $(QEMU_TRADITIONAL_URL)) > - > -QEMU_UPSTREAM_LOC ?= $(or $(wildcard $(QEMU_UPSTREAM_INTREE)),\ > - $(QEMU_UPSTREAM_URL)) > +QEMU_TRADITIONAL_LOC ?= $(call or,$(wildcard $(QEMU_TRADITIONAL_INTREE)),\ > + $(QEMU_TRADITIONAL_URL)) > + > +QEMU_UPSTREAM_LOC ?= $(call or,$(wildcard $(QEMU_UPSTREAM_INTREE)),\ > + $(QEMU_UPSTREAM_URL)) > > # Short answer -- do not enable this unless you know what you are > # doing and are prepared for some pain. > > >