]> xenbits.xensource.com Git - xcp/xen-api-libs.git/commitdiff
[refactoring] Move xmlpp from xen-api.hg to xen-api-libs.hg/xml-light2
authorDavid Scott <dave.scott@eu.citrix.com>
Mon, 26 Oct 2009 16:32:15 +0000 (16:32 +0000)
committerDavid Scott <dave.scott@eu.citrix.com>
Mon, 26 Oct 2009 16:32:15 +0000 (16:32 +0000)
Signed-off-by: Thomas Gazagnaire <thomas.gazagnaire@citrix.com>
xml-light2/Makefile
xml-light2/xmlpp.ml [new file with mode: 0644]

index a7531e352dd60547310df5a4d86c0aca9e262a30..3c5447f8084a375879d0f42ff041242e184e1175 100644 (file)
@@ -22,13 +22,17 @@ OCAMLDESTDIR ?= $(OCAMLLIBDIR)
 OBJS = xml
 INTF = xml.cmi
 LIBS = xml-light2.cma xml-light2.cmxa
+PROGRAMS = xmlpp
 
-all: $(INTF) $(LIBS) $(PROGRAMS)
+all: $(INTF) $(LIBS)
 
 bins: $(PROGRAMS)
 
 libs: $(LIBS)
 
+xmlpp: xmlpp.ml all
+       $(OCAMLOPT) $(OCAMLOPTFLAGS) -I ../stdext stdext.cmxa xml-light2.cmxa -linkpkg -o $@ $<
+
 xml-light2.cmxa: $(foreach obj,$(OBJS),$(obj).cmx)
        $(OCAMLOPT) $(OCAMLOPTFLAGS) -a -o $@ $(foreach obj,$(OBJS),$(obj).cmx)
 
diff --git a/xml-light2/xmlpp.ml b/xml-light2/xmlpp.ml
new file mode 100644 (file)
index 0000000..3e80fd6
--- /dev/null
@@ -0,0 +1,19 @@
+(*
+ * Copyright (C) 2006-2009 Citrix Systems Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published
+ * by the Free Software Foundation; version 2.1 only. with the special
+ * exception on linking described in file LICENSE.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License for more details.
+ *)
+
+open Xml
+
+let _ = 
+  let xml = Xml.parse_in stdin in
+  print_endline (Xml.to_string_fmt xml)