Permalink
Browse files

[new] New ocaml lib 'rrd-client' in order to move rrd2csv and RRDD pl…

…ugins out of the xen-api repository
  • Loading branch information...
1 parent 9de3e25 commit 4905520688d37eb1ec53c3d6bb0800b85a6f89de @venator venator committed with jjd27 Aug 21, 2012
Showing with 26 additions and 0 deletions.
  1. +1 −0 OMakefile
  2. +5 −0 ocaml/rrdd/META.in
  3. +20 −0 ocaml/rrdd/OMakefile
View
@@ -130,6 +130,7 @@ export
OCAML_PHASE1= autogen_idl
OCAML_PHASE2= \
$(if $(BYTE_ENABLED), ocaml/idl/ocaml_backend/xapi_client.cma) $(if $(NATIVE_ENABLED), ocaml/idl/ocaml_backend/xapi_client.cmxa) \
+ $(if $(BYTE_ENABLED), ocaml/rrdd/rrd_client.cma) $(if $(NATIVE_ENABLED), ocaml/rrdd/rrd_client.cmxa) \
ocaml/rrdd/xcp-rrdd ocaml/rrdd/rrdd_test
# JS ################################################################################
View
@@ -0,0 +1,5 @@
+version = "@VERSION@"
+description = "RRDD library"
+requires = "xapi-client"
+archive(byte) = "rrd_client.cma"
+archive(native) = "rrd_client.cmxa"
View
@@ -50,13 +50,33 @@ RRDD_TEST_FILES = \
OCamlProgram($(RRDD), $(RRDD_FILES))
OCamlDocProgram($(RRDD), $(RRDD_FILES))
+OCamlLibrary(rrd_client, $(RRD_CLIENT_OBJS))
OCamlProgram($(RRDD_TEST), $(RRDD_TEST_FILES))
.PHONY: install
install:
mkdir -p $(DESTDIR)$(LIBEXECDIR)
$(IPROG) $(RRDD) $(DESTDIR)$(LIBEXECDIR)
+META: META.in
+ sed 's/@VERSION@/$(PRODUCT_VERSION)/g' < $< > $@
+
+if $(defined-env DESTDIR)
+ INSTALL_PATH = $(DESTDIR)/$(shell ocamlfind printconf destdir)
+ export
+else
+ INSTALL_PATH = $(shell ocamlfind printconf destdir)
+ export
+
+.PHONY: lib-install
+lib-install: META
+ mkdir -p $(INSTALL_PATH)
+ ocamlfind install -destdir $(INSTALL_PATH) -ldconf ignore rrd-client META $(addsuffixes .cmi,$(RRD_CLIENT_OBJS)) $(if $(BYTE_ENABLED), rrd_client.cma) $(if $(NATIVE_ENABLED), rrd_client.cmxa rrd_client.a $(addsuffixes .cmx, $(RRD_CLIENT_OBJS)))
+
+.PHONY: lib-uninstall
+lib-uninstall:
+ ocamlfind remove -destdir $(INSTALL_PATH) rrd-client
+
.PHONY: test
test: $(RRDD) $(RRDD_TEST)
killall $(RRDD) || true

0 comments on commit 4905520

Please sign in to comment.