ia64/xen-unstable
changeset 19620:2eb9f1db70a4
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@eu.citrix.com>
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@eu.citrix.com>
author | Keir Fraser <keir.fraser@citrix.com> |
---|---|
date | Tue May 19 14:13:20 2009 +0100 (2009-05-19) |
parents | 303793468225 |
children | 49f2f2aa5f83 |
files | .hgignore Config.mk tools/Makefile tools/xenstore/Makefile |
line diff
1.1 --- a/.hgignore Tue May 19 13:38:05 2009 +0100 1.2 +++ b/.hgignore Tue May 19 14:13:20 2009 +0100 1.3 @@ -90,6 +90,7 @@ 1.4 ^stubdom/gcc-.*$ 1.5 ^stubdom/include$ 1.6 ^stubdom/ioemu$ 1.7 +^stubdom/xenstore$ 1.8 ^stubdom/libxc-.*$ 1.9 ^stubdom/lwip-.*$ 1.10 ^stubdom/mini-os-.*$ 1.11 @@ -251,6 +252,7 @@ 1.12 ^tools/xm-test/tests/.*\.test$ 1.13 ^tools/ioemu-remote 1.14 ^tools/ioemu-dir$ 1.15 +^tools/ocaml-xenstored.*$ 1.16 ^xen/\.banner.*$ 1.17 ^xen/BLOG$ 1.18 ^xen/System.map$
2.1 --- a/Config.mk Tue May 19 13:38:05 2009 +0100 2.2 +++ b/Config.mk Tue May 19 14:13:20 2009 +0100 2.3 @@ -125,6 +125,12 @@ QEMU_REMOTE=http://xenbits.xensource.com 2.4 # CONFIG_QEMU ?= ../qemu-xen.git 2.5 CONFIG_QEMU ?= $(QEMU_REMOTE) 2.6 2.7 +OCAML_XENSTORED_REPO=http://xenbits.xensource.com/ext/xen-ocaml-tools.hg 2.8 + 2.9 +# Build OCAML version of xenstored instead of the in-tree C version? 2.10 +# This will cause $(OCAML_XENSTORED_REPO) to be cloned. 2.11 +CONFIG_OCAML_XENSTORED ?= n 2.12 + 2.13 # Optional components 2.14 XENSTAT_XENTOP ?= y 2.15 VTPM_TOOLS ?= n
3.1 --- a/tools/Makefile Tue May 19 13:38:05 2009 +0100 3.2 +++ b/tools/Makefile Tue May 19 14:13:20 2009 +0100 3.3 @@ -6,6 +6,7 @@ SUBDIRS-y += check 3.4 SUBDIRS-y += include 3.5 SUBDIRS-y += libxc 3.6 SUBDIRS-y += flask 3.7 +SUBDIRS-$(CONFIG_OCAML_XENSTORED) += ocaml-xenstored 3.8 SUBDIRS-y += xenstore 3.9 SUBDIRS-y += misc 3.10 SUBDIRS-y += examples 3.11 @@ -49,6 +50,7 @@ install: subdirs-install 3.12 $(INSTALL_DIR) $(DESTDIR)/var/xen/dump 3.13 $(INSTALL_DIR) $(DESTDIR)/var/log/xen 3.14 $(INSTALL_DIR) $(DESTDIR)/var/lib/xen 3.15 + $(INSTALL_DIR) $(DESTDIR)/var/lock/subsys 3.16 3.17 .PHONY: clean distclean 3.18 clean distclean: subdirs-clean 3.19 @@ -103,3 +105,23 @@ subdir-clean-ioemu-dir: 3.20 $(absolutify_xen_root); \ 3.21 $(MAKE) -C ioemu-dir clean; \ 3.22 fi 3.23 + 3.24 +ocaml-xenstored: 3.25 + set -ex; \ 3.26 + rm -rf ocaml-xenstored.tmp; \ 3.27 + hg clone $(OCAML_XENSTORED_REPO) ocaml-xenstored.tmp; \ 3.28 + if [ "$(OCAML_XENSTORED_TAG)" ]; then \ 3.29 + hg -R ocaml-xenstored.tmp update -r $(OCAML_XENSTORED_TAG) ;\ 3.30 + hg -R ocaml-xenstored.tmp branch mybranch ;\ 3.31 + fi; \ 3.32 + mv ocaml-xenstored.tmp ocaml-xenstored; \ 3.33 + 3.34 +subdir-all-ocaml-xenstored subdir-install-ocaml-xenstored: ocaml-xenstored 3.35 + $(absolutify_xen_root); \ 3.36 + $(MAKE) -C ocaml-xenstored $(patsubst subdir-%-ocaml-xenstored,%,$@); 3.37 + 3.38 +subdir-clean-ocaml-xenstored: 3.39 + set -e; if test -d ocaml-xenstored; then \ 3.40 + $(MAKE) -C ocaml-xenstored clean; \ 3.41 + fi 3.42 +
4.1 --- a/tools/xenstore/Makefile Tue May 19 13:38:05 2009 +0100 4.2 +++ b/tools/xenstore/Makefile Tue May 19 14:13:20 2009 +0100 4.3 @@ -26,8 +26,13 @@ LIBXENSTORE := libxenstore.a 4.4 xenstore xenstore-control: CFLAGS += -static 4.5 endif 4.6 4.7 +ALL_TARGETS = libxenstore.so libxenstore.a clients xs_tdb_dump 4.8 +ifneq ($(CONFIG_OCAML_XENSTORED),y) 4.9 + ALL_TARGETS += xenstored 4.10 +endif 4.11 + 4.12 .PHONY: all 4.13 -all: libxenstore.so libxenstore.a xenstored clients xs_tdb_dump 4.14 +all: $(ALL_TARGETS) 4.15 4.16 .PHONY: clients 4.17 clients: xenstore $(CLIENTS) xenstore-control 4.18 @@ -90,12 +95,14 @@ tarball: clean 4.19 4.20 .PHONY: install 4.21 install: all 4.22 +ifneq ($(CONFIG_OCAML_XENSTORED),y) 4.23 $(INSTALL_DIR) $(DESTDIR)/var/run/xenstored 4.24 $(INSTALL_DIR) $(DESTDIR)/var/lib/xenstored 4.25 + $(INSTALL_PROG) xenstored $(DESTDIR)$(SBINDIR) 4.26 +endif 4.27 $(INSTALL_DIR) $(DESTDIR)$(BINDIR) 4.28 $(INSTALL_DIR) $(DESTDIR)$(SBINDIR) 4.29 $(INSTALL_DIR) $(DESTDIR)$(INCLUDEDIR) 4.30 - $(INSTALL_PROG) xenstored $(DESTDIR)$(SBINDIR) 4.31 $(INSTALL_PROG) xenstore-control $(DESTDIR)$(BINDIR) 4.32 $(INSTALL_PROG) xenstore $(DESTDIR)$(BINDIR) 4.33 set -e ; for c in $(CLIENTS) ; do \