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

[Xen-devel] [PATCH RFC 1/4] build: Reorganize and briefly document "external repo" template in tools/Makefile



No functional changes.

Signed-off-by: George Dunlap <george.dunlap@xxxxxxxxxxxxx>
---
CC: Ian Campbell <ian.campbell@xxxxxxxxxx>
CC: Ian Jackson <ian.jackson@xxxxxxxxxx>
CC: Wei Liu <wei.liu2@xxxxxxxxxx>
CC: Dave Scott <Dave.Scott@xxxxxxxxxxxxx>
CC: Jonathan Ludlam <Jonathan.Ludlam@xxxxxxxxxxxxx>
CC: Wen Congyang <wency@xxxxxxxxxxxxxx>
CC: Yang Hongyang <yanghy@xxxxxxxxxxxxxx>
---
 tools/Makefile | 52 ++++++++++++++++++++++++++++++++++++++++++++--------
 1 file changed, 44 insertions(+), 8 deletions(-)

diff --git a/tools/Makefile b/tools/Makefile
index 5d7a75f..966354a 100644
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -129,6 +129,41 @@ ifneq ($(QEMU_ROOT),.)
 export QEMU_ROOT
 endif
 
+# Targets for external trees:
+#  ${target}-dir-find
+#    See if the directory exists and check it out if not.
+#  ${target}-dir-force-update
+#    Pull to the most recent update (as if you had checked it out for the
+#    first time)
+#  subdir-all-${target}-dir
+#    Do "make all" for ${target}, including all prerequisites (such as 
+#    configure)
+#  subdir-install-${target}-dir
+#    Do "make install" for $TARGET
+#  subdir-clean-${target}-dir
+#    Do "make clean" for $TARGET
+#
+# Directories for external trees:
+#  ${target}-dir
+#    Used for local builds.  Usually a link to ${target}-dir-remote
+#  ${target}-dir-remote
+#    Where remote repositories are cloned
+#  ${target}
+#    Where a copy of the source files are put when building a source 
+#    tarball for release
+#
+# Expected variables:
+#   ${TARGET}_URL
+#     A url from which to clone a git repo
+#   ${TARGET}_REVISION
+#     The target revision to check out when doing "find" or "force-update"
+#   ${TARGET}_INTREE
+#     The directory where the subtree can be found (usually used when building
+#     a source tarball)
+#   ${TARGET}_LOC
+#     The ultimate location of the source (either a local dir or remote URL)
+
+# External target: qemu-xen-traditional
 qemu-xen-traditional-dir-find:
        set -ex; \
        if test -d $(QEMU_TRADITIONAL_LOC); then \
@@ -138,14 +173,6 @@ qemu-xen-traditional-dir-find:
                $(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_LOC) ; then \
-               mkdir -p qemu-xen-dir; \
-       else \
-               export GIT=$(GIT); \
-               $(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: qemu-xen-traditional-dir-find
        set -ex; \
@@ -183,6 +210,15 @@ subdir-clean-qemu-xen-traditional-dir:
                $(MAKE) -C qemu-xen-traditional-dir clean; \
        fi
 
+# External target: qemu-xen
+qemu-xen-dir-find:
+       if test -d $(QEMU_UPSTREAM_LOC) ; then \
+               mkdir -p qemu-xen-dir; \
+       else \
+               export GIT=$(GIT); \
+               $(XEN_ROOT)/scripts/git-checkout.sh $(QEMU_UPSTREAM_LOC) 
$(QEMU_UPSTREAM_REVISION) qemu-xen-dir ; \
+       fi
+
 .PHONY: qemu-xen-dir-force-update
 qemu-xen-dir-force-update: qemu-xen-dir-find
        set -ex; \
-- 
1.9.1


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