Commits

camlspotter committed 3b3a200

Use of Ulib instead of ocaml-netstring, and my OMakefile

  • Participants
  • Parent commits dc254e7

Comments (0)

Files changed (5)

+.*~$
+\.(o|cm.*|sp.t|a|annot|omc)$
+json_parser\.ml$
+json_parser\.mli$
+json_lexer\.ml$
+jsoncat
+version.ml
+^\._.*
 name = "json-wheel"
 version = "1.0.6"
 description = "JSON data format"
-requires = "netstring"
+requires = "ulib,unix"
 archive(byte)    = "jsonwheel.cma"
 archive(native)  = "jsonwheel.cmxa"
   json_io.mli json_io.ml \
   json_compat.ml
 
-PACKS = netstring
+PACKS = ulib,unix
 
 STDBIN = $(shell dirname `which ocamlfind`)
 ifndef PREFIX
+SOURCES[]=
+  META
+  Makefile
+  json_type.mli
+  json_type.ml
+  json_parser.mli
+  json_parser.mly
+  json_lexer.mll
+  json_io.mli
+  json_io.ml
+  json_compat.ml
+
+$(Installed json-wheel): $(Installed ulib) $(SOURCES)
+  ocamlfind remove json-wheel
+  make clean
+  make
+  make install
+  spotinstall json-wheel
+
       if big_int_mode then STRING s
       else json_error (s ^ " is too large for OCaml's type int, sorry")
 
-  let utf8_of_point i =
-    Netconversion.ustring_of_uchar `Enc_utf8 i
+  let utf8_of_point i = Ulib.UTF8.init 1 (fun _ -> Ulib.UChar.chr i)
 
   let custom_error descr lexbuf =
     json_error