Permalink
Browse files

bump to 0.9.7 working version

  • Loading branch information...
1 parent f7bf428 commit 5b4ed00f21cea40c22dfe2000f6abef1c0704292 @avsm committed Apr 2, 2013
Showing with 420 additions and 131 deletions.
  1. +1 −1 _oasis
  2. +5 −5 cohttp/META
  3. +56 −26 myocamlbuild.ml
  4. +358 −99 setup.ml
View
@@ -1,6 +1,6 @@
OASISFormat: 0.3
Name: cohttp
-Version: 0.9.6
+Version: 0.9.7
Synopsis: HTTP library for Lwt, Async and Mirage
Authors: Anil Madhavapeddy, Stefano Zacchiroli, David Sheets, Thomas Gazagnaire, David Scott
License: LGPL-2.0 with OCaml linking exception
View
@@ -1,6 +1,6 @@
# OASIS_START
-# DO NOT EDIT (digest: 28ffc1742ee4118d2829491c7e4edf24)
-version = "0.9.6"
+# DO NOT EDIT (digest: 5a7e09b6cd035a8c16234acd8637f4ce)
+version = "0.9.7"
description = "HTTP library for Lwt, Async and Mirage"
requires = "re uri uri.services cstruct"
archive(byte) = "cohttp.cma"
@@ -9,7 +9,7 @@ archive(native) = "cohttp.cmxa"
archive(native, plugin) = "cohttp.cmxs"
exists_if = "cohttp.cma"
package "mirage" (
- version = "0.9.6"
+ version = "0.9.7"
description = "HTTP library for Lwt, Async and Mirage"
requires = "uri re cohttp lwt.syntax mirage mirage-net"
archive(byte) = "cohttp_mirage.cma"
@@ -20,7 +20,7 @@ package "mirage" (
)
package "lwt" (
- version = "0.9.6"
+ version = "0.9.7"
description = "HTTP library for Lwt, Async and Mirage"
requires = "lwt.unix lwt uri cohttp lwt.ssl lwt.syntax"
archive(byte) = "cohttp_lwt_unix.cma"
@@ -31,7 +31,7 @@ package "lwt" (
)
package "async" (
- version = "0.9.6"
+ version = "0.9.7"
description = "HTTP library for Lwt, Async and Mirage"
requires = "uri cohttp async_core async_unix threads async fable_async"
archive(byte) = "cohttp_async.cma"
View
@@ -1,7 +1,7 @@
(* OASIS_START *)
-(* DO NOT EDIT (digest: 65e3ce6c6b67aa562571610c5665bdf1) *)
+(* DO NOT EDIT (digest: 9e8d5b40d2423b7745b50bf54a4a513c) *)
module OASISGettext = struct
-(* # 21 "/home/jeremy/.opam/4.01.0dev+trunk/build/oasis.0.3.0/src/oasis/OASISGettext.ml" *)
+(* # 21 "/Users/avsm/.opam/4.01.0dev+trunk/build/oasis-mirage.0.3.0a/src/oasis/OASISGettext.ml" *)
let ns_ str =
str
@@ -24,7 +24,7 @@ module OASISGettext = struct
end
module OASISExpr = struct
-(* # 21 "/home/jeremy/.opam/4.01.0dev+trunk/build/oasis.0.3.0/src/oasis/OASISExpr.ml" *)
+(* # 21 "/Users/avsm/.opam/4.01.0dev+trunk/build/oasis-mirage.0.3.0a/src/oasis/OASISExpr.ml" *)
@@ -116,7 +116,7 @@ end
# 117 "myocamlbuild.ml"
module BaseEnvLight = struct
-(* # 21 "/home/jeremy/.opam/4.01.0dev+trunk/build/oasis.0.3.0/src/base/BaseEnvLight.ml" *)
+(* # 21 "/Users/avsm/.opam/4.01.0dev+trunk/build/oasis-mirage.0.3.0a/src/base/BaseEnvLight.ml" *)
module MapString = Map.Make(String)
@@ -214,7 +214,7 @@ end
# 215 "myocamlbuild.ml"
module MyOCamlbuildFindlib = struct
-(* # 21 "/home/jeremy/.opam/4.01.0dev+trunk/build/oasis.0.3.0/src/plugins/ocamlbuild/MyOCamlbuildFindlib.ml" *)
+(* # 21 "/Users/avsm/.opam/4.01.0dev+trunk/build/oasis-mirage.0.3.0a/src/plugins/ocamlbuild/MyOCamlbuildFindlib.ml" *)
(** OCamlbuild extension, copied from
* http://brion.inria.fr/gallium/index.php/Using_ocamlfind_with_ocamlbuild
@@ -234,19 +234,21 @@ module MyOCamlbuildFindlib = struct
Ocamlbuild_pack.Lexers.blank_sep_strings
let split s ch =
- let x =
- ref []
+ let buf = Buffer.create 13 in
+ let x = ref [] in
+ let flush () =
+ x := (Buffer.contents buf) :: !x;
+ Buffer.clear buf
in
- let rec go s =
- let pos =
- String.index s ch
- in
- x := (String.before s pos)::!x;
- go (String.after s (pos + 1))
- in
- try
- go s
- with Not_found -> !x
+ String.iter
+ (fun c ->
+ if c = ch then
+ flush ()
+ else
+ Buffer.add_char buf c)
+ s;
+ flush ();
+ List.rev !x
let split_nl s = split s '\n'
@@ -281,17 +283,27 @@ module MyOCamlbuildFindlib = struct
(* When one link an OCaml library/binary/package, one should use -linkpkg *)
flag ["ocaml"; "link"; "program"] & A"-linkpkg";
+ flag ["ocaml"; "link"; "output_obj"] & A"-linkpkg";
(* For each ocamlfind package one inject the -package option when
* compiling, computing dependencies, generating documentation and
* linking. *)
List.iter
begin fun pkg ->
- flag ["ocaml"; "compile"; "pkg_"^pkg] & S[A"-package"; A pkg];
- flag ["ocaml"; "ocamldep"; "pkg_"^pkg] & S[A"-package"; A pkg];
- flag ["ocaml"; "doc"; "pkg_"^pkg] & S[A"-package"; A pkg];
- flag ["ocaml"; "link"; "pkg_"^pkg] & S[A"-package"; A pkg];
- flag ["ocaml"; "infer_interface"; "pkg_"^pkg] & S[A"-package"; A pkg];
+ let base_args = [A"-package"; A pkg] in
+ let syn_args = [A"-syntax"; A "camlp4o"] in
+ let args =
+ (* heuristic to identify syntax extensions:
+ whether they end in ".syntax"; some might not *)
+ if Filename.check_suffix pkg "syntax"
+ then syn_args @ base_args
+ else base_args
+ in
+ flag ["ocaml"; "compile"; "pkg_"^pkg] & S args;
+ flag ["ocaml"; "ocamldep"; "pkg_"^pkg] & S args;
+ flag ["ocaml"; "doc"; "pkg_"^pkg] & S args;
+ flag ["ocaml"; "link"; "pkg_"^pkg] & S base_args;
+ flag ["ocaml"; "infer_interface"; "pkg_"^pkg] & S args;
end
(find_packages ());
@@ -323,7 +335,7 @@ module MyOCamlbuildFindlib = struct
end
module MyOCamlbuildBase = struct
-(* # 21 "/home/jeremy/.opam/4.01.0dev+trunk/build/oasis.0.3.0/src/plugins/ocamlbuild/MyOCamlbuildBase.ml" *)
+(* # 21 "/Users/avsm/.opam/4.01.0dev+trunk/build/oasis-mirage.0.3.0a/src/plugins/ocamlbuild/MyOCamlbuildBase.ml" *)
(** Base functions for writing myocamlbuild.ml
@author Sylvain Le Gall
@@ -339,7 +351,7 @@ module MyOCamlbuildBase = struct
type name = string
type tag = string
-(* # 56 "/home/jeremy/.opam/4.01.0dev+trunk/build/oasis.0.3.0/src/plugins/ocamlbuild/MyOCamlbuildBase.ml" *)
+(* # 56 "/Users/avsm/.opam/4.01.0dev+trunk/build/oasis-mirage.0.3.0a/src/plugins/ocamlbuild/MyOCamlbuildBase.ml" *)
type t =
{
@@ -452,6 +464,24 @@ module MyOCamlbuildBase = struct
)
t.lib_c;
+ (* Add output_obj rules mapped to .nobj.o *)
+ let native_output_obj x =
+ OC.link_gen "cmx" "cmxa" !Options.ext_lib [!Options.ext_obj; "cmi"]
+ OC.ocamlopt_link_prog
+ (fun tags -> tags++"ocaml"++"link"++"native"++"output_obj") x
+ in
+ rule "ocaml: cmx* and o* -> .nobj.o" ~prod:"%.nobj.o" ~deps:["%.cmx"; "%.o"]
+ (native_output_obj "%.cmx" "%.nobj.o");
+
+ (* Add output_obj rules mapped to .bobj.o *)
+ let bytecode_output_obj x =
+ OC.link_gen "cmo" "cma" !Options.ext_lib [!Options.ext_obj; "cmi"]
+ OC.ocamlc_link_prog
+ (fun tags -> tags++"ocaml"++"link"++"byte"++"output_obj") x
+ in
+ rule "ocaml: cmo* -> .nobj.o" ~prod:"%.bobj.o" ~deps:["%.cmo"]
+ (bytecode_output_obj "%.cmo" "%.bobj.o");
+
(* Add flags *)
List.iter
(fun (tags, cond_specs) ->
@@ -473,7 +503,7 @@ module MyOCamlbuildBase = struct
end
-# 476 "myocamlbuild.ml"
+# 506 "myocamlbuild.ml"
open Ocamlbuild_plugin;;
let package_default =
{
@@ -497,7 +527,7 @@ let package_default =
let dispatch_default = MyOCamlbuildBase.dispatch_default package_default;;
-# 501 "myocamlbuild.ml"
+# 531 "myocamlbuild.ml"
(* OASIS_STOP *)
open Ocamlbuild_plugin
Oops, something went wrong. Retry.

0 comments on commit 5b4ed00

Please sign in to comment.