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

[Xen-changelog] [xen master] make: Normalize config options for external trees



commit 8962a8f951ea83e8d10ee23aeb20266e4795b06e
Author:     George Dunlap <george.dunlap@xxxxxxxxxxxxx>
AuthorDate: Mon Jul 14 17:15:23 2014 +0100
Commit:     Ian Campbell <ian.campbell@xxxxxxxxxx>
CommitDate: Fri Jul 18 11:20:56 2014 +0100

    make: Normalize config options for external trees
    
    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@xxxxxxxxxxxxx>
    Acked-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
---
 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:
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

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