diff options
author | Keir Fraser <keir.fraser@citrix.com> | 2009-05-19 14:13:20 +0100 |
---|---|---|
committer | Keir Fraser <keir.fraser@citrix.com> | 2009-05-19 14:13:20 +0100 |
commit | c7367160e47a01e07fabfcb38fcb5951773b04d4 (patch) | |
tree | 8877d3a06c90e10389e696cc4563b75926eb106f /tools/Makefile | |
parent | 1f876c2e6e48431940adb8ebd0a6960367cdc853 (diff) | |
download | xen-c7367160e47a01e07fabfcb38fcb5951773b04d4.tar.gz xen-c7367160e47a01e07fabfcb38fcb5951773b04d4.tar.bz2 xen-c7367160e47a01e07fabfcb38fcb5951773b04d4.zip |
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>
Diffstat (limited to 'tools/Makefile')
-rw-r--r-- | tools/Makefile | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/tools/Makefile b/tools/Makefile index ed5f7568d2..d9208ca1b2 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -6,6 +6,7 @@ SUBDIRS-y += check 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 + |