From: George Dunlap <george.dunlap@eu.citrix.com>
To: xen-devel@lists.xen.org
Cc: George Dunlap <george.dunlap@eu.citrix.com>,
Ian Jackson <ian.jackson@citrix.com>,
Ian Campbell <ian.campbell@citrix.com>
Subject: [PATCH 2/5] make: Normalize config options for external trees
Date: Mon, 14 Jul 2014 17:15:23 +0100 [thread overview]
Message-ID: <1405354526-20929-2-git-send-email-george.dunlap@eu.citrix.com> (raw)
In-Reply-To: <1405354526-20929-1-git-send-email-george.dunlap@eu.citrix.com>
We have four different external trees, and four different naming
conventions for specifying the URL, where they live, and what revision
to check out.
Normalize config options on the following bases:
- QEMU_UPSTREAM
- QEMU_TRADITIONAL
- SEABIOS_UPSTREAM
- OVMF_UPSTREAM
The following suffixes for all trees:
- _URL : A remote repository to clone from
- _REVISION : The revision to check out
And the following suffixes for the qemu trees:
- _INTREE : The location of an inlined tree (for tarball releases)
- _LOC : Where to actually look (either a directory or a URL)
The following parameters are still supported for backwards
compatibility:
- CONFIG_QEMU (=> QEMU_TRADITIONAL_LOC)
- QEMU_REMOTE (=> QEMU_TRADITIONAL_URL)
- QEMU_TAG (=> QEMU_TRADITIONAL_REVISION)
- SEABIOS_UPSTREAM_TAG (=> SEABIOS_UPSTREAM_REVISION)
Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
---
We should relnote these and say that they are deprecated, and may be
removed in a future release.
CC: Ian Campbell <ian.campbell@citrix.com>
CC: Ian Jackson <ian.jackson@citrix.com>
---
Config.mk | 43 +++++++++++++++++++++++++++----------------
tools/Makefile | 18 +++++++++---------
tools/firmware/Makefile | 6 +++---
3 files changed, 39 insertions(+), 28 deletions(-)
diff --git a/Config.mk b/Config.mk
index a9b3468..5370e23 100644
--- a/Config.mk
+++ b/Config.mk
@@ -218,49 +218,60 @@ XEN_EXTFILES_URL ?= http://xenbits.xen.org/xen-extfiles
# the internet. The original download URL is preserved as a comment
# near the place in the Xen Makefiles where the file is used.
-ifeq ($(GIT_HTTP),y)
-QEMU_REMOTE ?= http://xenbits.xen.org/git-http/qemu-xen-unstable.git
-else
-QEMU_REMOTE ?= git://xenbits.xen.org/qemu-xen-unstable.git
-endif
-
# Where to look for inlined subtrees (for example, from a tarball)
QEMU_UPSTREAM_INTREE ?= $(XEN_ROOT)/tools/qemu-xen
QEMU_TRADITIONAL_INTREE ?= $(XEN_ROOT)/tools/qemu-xen-traditional
-# Specify which qemu-dm to use. This may be `ioemu' to use the old
-# Mercurial in-tree version, or a local directory, or a git URL.
-# CONFIG_QEMU ?= `pwd`/$(XEN_ROOT)/../qemu-xen.git
-CONFIG_QEMU ?= $(or $(wildcard $(QEMU_TRADITIONAL_INTREE)),\
- $(QEMU_REMOTE))
-
-ifneq (,$(wildcard $(QEMU_UPSTREAM_INTREE)))
-QEMU_UPSTREAM_URL ?= $(QEMU_UPSTREAM_INTREE)
+# Handle legacy options
+ifneq (,$(SEABIOS_UPSTREAM_TAG))
+SEABIOS_UPSTREAM_REVISION ?= $(SEABIOS_UPSTREAM_TAG)
+endif
+ifneq (,$(QEMU_REMOTE))
+QEMU_TRADITIONAL_URL ?= $(QEMU_REMOTE)
+endif
+ifneq (,$(CONFIG_QEMU))
+QEMU_TRADITIONAL_LOC ?= $(CONFIG_QEMU)
+endif
+ifneq (,$(QEMU_TAG))
+QEMU_TRADITIONAL_REVISION ?= $(QEMU_TAG)
endif
ifeq ($(GIT_HTTP),y)
OVMF_UPSTREAM_URL ?= http://xenbits.xen.org/git-http/ovmf.git
QEMU_UPSTREAM_URL ?= http://xenbits.xen.org/git-http/qemu-upstream-unstable.git
+QEMU_TRADITIONAL_URL ?= http://xenbits.xen.org/git-http/qemu-xen-unstable.git
SEABIOS_UPSTREAM_URL ?= http://xenbits.xen.org/git-http/seabios.git
else
OVMF_UPSTREAM_URL ?= git://xenbits.xen.org/ovmf.git
QEMU_UPSTREAM_URL ?= git://xenbits.xen.org/qemu-upstream-unstable.git
+QEMU_TRADITIONAL_URL ?= git://xenbits.xen.org/qemu-xen-unstable.git
SEABIOS_UPSTREAM_URL ?= git://xenbits.xen.org/seabios.git
endif
OVMF_UPSTREAM_REVISION ?= 447d264115c476142f884af0be287622cd244423
QEMU_UPSTREAM_REVISION ?= master
-SEABIOS_UPSTREAM_TAG ?= rel-1.7.5
+SEABIOS_UPSTREAM_REVISION ?= rel-1.7.5
# Thu May 22 16:59:16 2014 -0400
# python3 fixes for vgabios and csm builds.
ETHERBOOT_NICS ?= rtl8139 8086100e
-QEMU_TAG ?= d0395cc49b2ec6d1723c01f1daf2394b9264ca29
+QEMU_TRADITIONAL_REVISION ?= d0395cc49b2ec6d1723c01f1daf2394b9264ca29
# Tue Apr 8 16:50:06 2014 +0000
# qemu-xen-trad: free all the pirqs for msi/msix when driver unloads
+# Specify which qemu-dm to use. This may be `ioemu' to use the old
+# Mercurial in-tree version, or a local directory, or a git URL.
+# 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))
+
# Short answer -- do not enable this unless you know what you are
# doing and are prepared for some pain.
diff --git a/tools/Makefile b/tools/Makefile
index e558e6e..0c4e49c 100644
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -111,35 +111,35 @@ IOEMU_CONFIGURE_CROSS ?= --cpu=$(XEN_TARGET_ARCH) \
--interp-prefix=$(CROSS_SYS_ROOT)
endif
-QEMU_ROOT := $(shell if [ -d "$(CONFIG_QEMU)" ]; then echo "$(CONFIG_QEMU)"; else echo .; fi)
+QEMU_ROOT := $(shell if [ -d "$(QEMU_TRADITIONAL_LOC)" ]; then echo "$(QEMU_TRADITIONAL_LOC)"; else echo .; fi)
ifneq ($(QEMU_ROOT),.)
export QEMU_ROOT
endif
qemu-xen-traditional-dir-find:
set -ex; \
- if test -d $(CONFIG_QEMU); then \
+ if test -d $(QEMU_TRADITIONAL_LOC); then \
mkdir -p qemu-xen-traditional-dir; \
else \
export GIT=$(GIT); \
- $(XEN_ROOT)/scripts/git-checkout.sh $(CONFIG_QEMU) $(QEMU_TAG) qemu-xen-traditional-dir; \
+ $(XEN_ROOT)/scripts/git-checkout.sh $(QEMU_TRADITIONAL_LOC) $(QEMU_TRADITIONAL_REVISION) qemu-xen-traditional-dir; \
fi
qemu-xen-dir-find:
- if test -d $(QEMU_UPSTREAM_URL) ; then \
+ if test -d $(QEMU_UPSTREAM_LOC) ; then \
mkdir -p qemu-xen-dir; \
else \
export GIT=$(GIT); \
- $(XEN_ROOT)/scripts/git-checkout.sh $(QEMU_UPSTREAM_URL) $(QEMU_UPSTREAM_REVISION) qemu-xen-dir ; \
+ $(XEN_ROOT)/scripts/git-checkout.sh $(QEMU_UPSTREAM_LOC) $(QEMU_UPSTREAM_REVISION) qemu-xen-dir ; \
fi
.PHONY: qemu-xen-traditional-dir-force-update
qemu-xen-traditional-dir-force-update:
set -ex; \
- if [ "$(QEMU_TAG)" ]; then \
+ if [ "$(QEMU_TRADITIONAL_REVISION)" ]; then \
cd qemu-xen-traditional-dir-remote; \
$(GIT) fetch origin; \
- $(GIT) reset --hard $(QEMU_TAG); \
+ $(GIT) reset --hard $(QEMU_TRADITIONAL_REVISION); \
fi
subdir-all-qemu-xen-traditional-dir: qemu-xen-traditional-dir-find
@@ -179,8 +179,8 @@ QEMU_XEN_ENABLE_DEBUG :=
endif
subdir-all-qemu-xen-dir: qemu-xen-dir-find
- if test -d $(QEMU_UPSTREAM_URL) ; then \
- source=$(QEMU_UPSTREAM_URL); \
+ if test -d $(QEMU_UPSTREAM_LOC) ; then \
+ source=$(QEMU_UPSTREAM_LOC); \
else \
source=.; \
fi; \
diff --git a/tools/firmware/Makefile b/tools/firmware/Makefile
index 2f1d10d..2c2ed34 100644
--- a/tools/firmware/Makefile
+++ b/tools/firmware/Makefile
@@ -24,7 +24,7 @@ ovmf-dir:
cp ovmf-makefile ovmf-dir/Makefile;
seabios-dir:
- GIT=$(GIT) $(XEN_ROOT)/scripts/git-checkout.sh $(SEABIOS_UPSTREAM_URL) $(SEABIOS_UPSTREAM_TAG) seabios-dir
+ GIT=$(GIT) $(XEN_ROOT)/scripts/git-checkout.sh $(SEABIOS_UPSTREAM_URL) $(SEABIOS_UPSTREAM_REVISION) seabios-dir
$(MAKE) -C seabios-dir defconfig
.PHONY: all
@@ -78,10 +78,10 @@ subdir-clean-ovmf:
.PHONY: seabios-dir-force-update
seabios-dir-force-update:
set -ex; \
- if [ "$(SEABIOS_UPSTREAM_TAG)" ]; then \
+ if [ "$(SEABIOS_UPSTREAM_REVISION)" ]; then \
cd seabios-dir-remote; \
$(GIT) fetch origin; \
- $(GIT) reset --hard $(SEABIOS_UPSTREAM_TAG); \
+ $(GIT) reset --hard $(SEABIOS_UPSTREAM_REVISION); \
fi
subdir-clean-seabios-dir:
--
1.7.9.5
next prev parent reply other threads:[~2014-07-14 16:15 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-14 16:15 [PATCH 1/5] make: Check tools/qemu-xen[-traditional] for qemu before downloading George Dunlap
2014-07-14 16:15 ` George Dunlap [this message]
2014-07-16 8:58 ` [PATCH 2/5] make: Normalize config options for external trees Ian Campbell
2014-07-16 14:53 ` Ian Jackson
2014-07-21 10:22 ` Olaf Hering
2014-07-21 10:28 ` George Dunlap
2014-07-21 10:44 ` Olaf Hering
2014-07-21 10:46 ` George Dunlap
2014-07-21 10:49 ` Olaf Hering
2014-07-14 16:15 ` [PATCH 3/5] make: Make *-dir-force-update depend on *-dir-find George Dunlap
2014-07-16 14:53 ` Ian Jackson
2014-07-14 16:15 ` [PATCH 4/5] make: Add subtree-update target George Dunlap
2014-07-16 9:00 ` Ian Campbell
2014-07-16 14:54 ` Ian Jackson
2014-07-14 16:15 ` [PATCH 5/5] make: Make "src-tarball" target actually make a source tarball George Dunlap
2014-07-16 15:06 ` Ian Jackson
2014-07-16 16:56 ` Ian Campbell
2014-07-16 17:45 ` George Dunlap
2014-07-17 9:21 ` Ian Campbell
2014-07-17 16:46 ` George Dunlap
2014-07-18 10:45 ` Ian Jackson
2014-09-15 15:42 ` George Dunlap
2014-09-15 15:46 ` Ian Jackson
2014-07-16 9:02 ` [PATCH 1/5] make: Check tools/qemu-xen[-traditional] for qemu before downloading Ian Campbell
2014-07-16 14:50 ` Ian Jackson
2014-07-18 12:39 ` Ian Campbell
2014-07-23 10:52 ` Jan Beulich
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1405354526-20929-2-git-send-email-george.dunlap@eu.citrix.com \
--to=george.dunlap@eu.citrix.com \
--cc=ian.campbell@citrix.com \
--cc=ian.jackson@citrix.com \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).