WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] ocaml-xenstored: Allow to build ocaml xen

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] ocaml-xenstored: Allow to build ocaml xenstored instead of C version
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 19 May 2009 09:30:45 -0700
Delivery-date: Tue, 19 May 2009 09:32:12 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1242738800 -3600
# Node ID 2eb9f1db70a41a3b40499f8d6c70993287b4eec5
# Parent  3037934682257e67612c9a35c16da56491cbdd1a
ocaml-xenstored: Allow to build ocaml xenstored instead of C version

To use, set CONFIG_OCAML_XENSTORED=y at build time.
Then the build system will automatically download the remote repo
to tools/ocaml-xenstored.

Signed-off-by: Alex Zeffertt <alex.zeffertt@xxxxxxxxxxxxx>
---
 .hgignore               |    2 ++
 Config.mk               |    6 ++++++
 tools/Makefile          |   22 ++++++++++++++++++++++
 tools/xenstore/Makefile |   11 +++++++++--
 4 files changed, 39 insertions(+), 2 deletions(-)

diff -r 303793468225 -r 2eb9f1db70a4 .hgignore
--- a/.hgignore Tue May 19 13:38:05 2009 +0100
+++ b/.hgignore Tue May 19 14:13:20 2009 +0100
@@ -90,6 +90,7 @@
 ^stubdom/gcc-.*$
 ^stubdom/include$
 ^stubdom/ioemu$
+^stubdom/xenstore$
 ^stubdom/libxc-.*$
 ^stubdom/lwip-.*$
 ^stubdom/mini-os-.*$
@@ -251,6 +252,7 @@
 ^tools/xm-test/tests/.*\.test$
 ^tools/ioemu-remote
 ^tools/ioemu-dir$
+^tools/ocaml-xenstored.*$
 ^xen/\.banner.*$
 ^xen/BLOG$
 ^xen/System.map$
diff -r 303793468225 -r 2eb9f1db70a4 Config.mk
--- a/Config.mk Tue May 19 13:38:05 2009 +0100
+++ b/Config.mk Tue May 19 14:13:20 2009 +0100
@@ -125,6 +125,12 @@ QEMU_REMOTE=http://xenbits.xensource.com
 # CONFIG_QEMU ?= ../qemu-xen.git
 CONFIG_QEMU ?= $(QEMU_REMOTE)
 
+OCAML_XENSTORED_REPO=http://xenbits.xensource.com/ext/xen-ocaml-tools.hg
+
+# Build OCAML version of xenstored instead of the in-tree C version?
+# This will cause $(OCAML_XENSTORED_REPO) to be cloned.
+CONFIG_OCAML_XENSTORED ?= n
+
 # Optional components
 XENSTAT_XENTOP     ?= y
 VTPM_TOOLS         ?= n
diff -r 303793468225 -r 2eb9f1db70a4 tools/Makefile
--- a/tools/Makefile    Tue May 19 13:38:05 2009 +0100
+++ b/tools/Makefile    Tue May 19 14:13:20 2009 +0100
@@ -6,6 +6,7 @@ SUBDIRS-y += include
 SUBDIRS-y += include
 SUBDIRS-y += libxc
 SUBDIRS-y += flask
+SUBDIRS-$(CONFIG_OCAML_XENSTORED) += ocaml-xenstored
 SUBDIRS-y += xenstore
 SUBDIRS-y += misc
 SUBDIRS-y += examples
@@ -49,6 +50,7 @@ install: subdirs-install
        $(INSTALL_DIR) $(DESTDIR)/var/xen/dump
        $(INSTALL_DIR) $(DESTDIR)/var/log/xen
        $(INSTALL_DIR) $(DESTDIR)/var/lib/xen
+       $(INSTALL_DIR) $(DESTDIR)/var/lock/subsys
 
 .PHONY: clean distclean
 clean distclean: subdirs-clean
@@ -103,3 +105,23 @@ subdir-clean-ioemu-dir:
                $(absolutify_xen_root); \
                $(MAKE) -C ioemu-dir clean; \
        fi
+
+ocaml-xenstored:
+       set -ex; \
+       rm -rf ocaml-xenstored.tmp; \
+       hg clone $(OCAML_XENSTORED_REPO) ocaml-xenstored.tmp; \
+       if [ "$(OCAML_XENSTORED_TAG)" ]; then \
+               hg -R ocaml-xenstored.tmp update -r $(OCAML_XENSTORED_TAG) ;\
+               hg -R ocaml-xenstored.tmp branch mybranch ;\
+       fi;                                             \
+       mv ocaml-xenstored.tmp ocaml-xenstored; \
+
+subdir-all-ocaml-xenstored subdir-install-ocaml-xenstored: ocaml-xenstored
+       $(absolutify_xen_root); \
+       $(MAKE) -C ocaml-xenstored $(patsubst subdir-%-ocaml-xenstored,%,$@);
+
+subdir-clean-ocaml-xenstored:
+       set -e; if test -d ocaml-xenstored; then \
+               $(MAKE) -C ocaml-xenstored clean; \
+       fi
+
diff -r 303793468225 -r 2eb9f1db70a4 tools/xenstore/Makefile
--- a/tools/xenstore/Makefile   Tue May 19 13:38:05 2009 +0100
+++ b/tools/xenstore/Makefile   Tue May 19 14:13:20 2009 +0100
@@ -26,8 +26,13 @@ xenstore xenstore-control: CFLAGS += -st
 xenstore xenstore-control: CFLAGS += -static
 endif
 
+ALL_TARGETS = libxenstore.so libxenstore.a clients xs_tdb_dump 
+ifneq ($(CONFIG_OCAML_XENSTORED),y)
+ ALL_TARGETS += xenstored
+endif
+
 .PHONY: all
-all: libxenstore.so libxenstore.a xenstored clients xs_tdb_dump 
+all: $(ALL_TARGETS)
 
 .PHONY: clients
 clients: xenstore $(CLIENTS) xenstore-control
@@ -90,12 +95,14 @@ tarball: clean
 
 .PHONY: install
 install: all
+ifneq ($(CONFIG_OCAML_XENSTORED),y)
        $(INSTALL_DIR) $(DESTDIR)/var/run/xenstored
        $(INSTALL_DIR) $(DESTDIR)/var/lib/xenstored
+       $(INSTALL_PROG) xenstored $(DESTDIR)$(SBINDIR)
+endif
        $(INSTALL_DIR) $(DESTDIR)$(BINDIR)
        $(INSTALL_DIR) $(DESTDIR)$(SBINDIR)
        $(INSTALL_DIR) $(DESTDIR)$(INCLUDEDIR)
-       $(INSTALL_PROG) xenstored $(DESTDIR)$(SBINDIR)
        $(INSTALL_PROG) xenstore-control $(DESTDIR)$(BINDIR)
        $(INSTALL_PROG) xenstore $(DESTDIR)$(BINDIR)
        set -e ; for c in $(CLIENTS) ; do \

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] ocaml-xenstored: Allow to build ocaml xenstored instead of C version, Xen patchbot-unstable <=