xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] fix qemu building with older make
@ 2014-07-28  9:25 Jan Beulich
  2014-07-28 13:31 ` George Dunlap
                   ` (2 more replies)
  0 siblings, 3 replies; 19+ messages in thread
From: Jan Beulich @ 2014-07-28  9:25 UTC (permalink / raw)
  To: xen-devel
  Cc: George Dunlap, Ian Campbell, Keir Fraser, Ian Jackson, Tim Deegan

[-- Attachment #1: Type: text/plain, Size: 1405 bytes --]

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 <jbeulich@suse.com>

--- 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.




[-- Attachment #2: make-or-fallback.patch --]
[-- Type: text/plain, Size: 1436 bytes --]

fix qemu building with older make

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 <jbeulich@suse.com>

--- 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.

[-- Attachment #3: Type: text/plain, Size: 126 bytes --]

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

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2014-09-08 16:51 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-28  9:25 [PATCH] fix qemu building with older make Jan Beulich
2014-07-28 13:31 ` George Dunlap
2014-07-29 13:57 ` Ian Jackson
2014-07-29 14:22   ` Jan Beulich
2014-07-29 15:43     ` Ian Jackson
2014-07-29 16:13       ` Jan Beulich
2014-07-29 16:20         ` George Dunlap
2014-07-29 16:27           ` Andrew Cooper
2014-07-30  9:22         ` Ian Campbell
2014-07-30 10:22           ` Jan Beulich
2014-07-31 12:00           ` Don Slutz
2014-08-04 14:54             ` George Dunlap
2014-08-11 15:42               ` Don Koch
2014-09-01 10:41                 ` George Dunlap
2014-09-08 14:10                   ` Don Koch
2014-09-08 14:12                     ` George Dunlap
2014-09-08 15:11                       ` Don Koch
2014-09-08 16:51                       ` Pasi Kärkkäinen
2014-08-04 11:20 ` Ian Jackson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).