Skip to content

Commit

Permalink
Update OASIS version.
Browse files Browse the repository at this point in the history
  • Loading branch information
Sylvain Le Gall committed Oct 22, 2014
1 parent 18cbe86 commit 39d11bf
Show file tree
Hide file tree
Showing 10 changed files with 79 additions and 103 deletions.
2 changes: 1 addition & 1 deletion _oasis
Expand Up @@ -2,7 +2,7 @@ OASISFormat: 0.3
OCamlVersion: >= 3.11.2
FindlibVersion: >= 1.3.1
Name: oasis
Version: 0.4.5
Version: 0.4.6
LicenseFile: COPYING.txt
License: LGPL-2.1 with OCaml linking exception
BuildType: ocamlbuild (0.3)
Expand Down
86 changes: 36 additions & 50 deletions myocamlbuild.ml
Expand Up @@ -114,7 +114,7 @@ rule "ocamlify: %.mlify & %.mlify.depends -> %.ml"
;;

(* OASIS_START *)
(* DO NOT EDIT (digest: 83fd0e188611ae7489f7fe8d0eed9142) *)
(* DO NOT EDIT (digest: ce83d18189da28a701b37098bb40e572) *)
module OASISGettext = struct
# 22 "src/oasis/OASISGettext.ml"

Expand Down Expand Up @@ -364,9 +364,6 @@ module MyOCamlbuildFindlib = struct
*)
open Ocamlbuild_plugin

type conf =
{ no_automatic_syntax: bool;
}

(* these functions are not really officially exported *)
let run_and_read =
Expand Down Expand Up @@ -456,7 +453,7 @@ module MyOCamlbuildFindlib = struct
]


let dispatch conf =
let dispatch =
function
| After_options ->
(* By using Before_options one let command line options have an higher
Expand All @@ -475,39 +472,31 @@ module MyOCamlbuildFindlib = struct
* -linkpkg *)
flag ["ocaml"; "link"; "program"] & A"-linkpkg";

if not (conf.no_automatic_syntax) then begin
(* For each ocamlfind package one inject the -package option when
* compiling, computing dependencies, generating documentation and
* linking. *)
List.iter
begin fun pkg ->
let base_args = [A"-package"; A pkg] in
(* TODO: consider how to really choose camlp4o or camlp4r. *)
let syn_args = [A"-syntax"; A "camlp4o"] in
let (args, pargs) =
(* Heuristic to identify syntax extensions: whether they end in
".syntax"; some might not.
*)
if Filename.check_suffix pkg "syntax" ||
List.mem pkg well_known_syntax then
(syn_args @ base_args, syn_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;

(* TODO: Check if this is allowed for OCaml < 3.12.1 *)
flag ["ocaml"; "compile"; "package("^pkg^")"] & S pargs;
flag ["ocaml"; "ocamldep"; "package("^pkg^")"] & S pargs;
flag ["ocaml"; "doc"; "package("^pkg^")"] & S pargs;
flag ["ocaml"; "infer_interface"; "package("^pkg^")"] & S pargs;
end
(find_packages ());
end;
(* For each ocamlfind package one inject the -package option when
* compiling, computing dependencies, generating documentation and
* linking. *)
List.iter
begin fun pkg ->
let base_args = [A"-package"; A pkg] in
(* TODO: consider how to really choose camlp4o or camlp4r. *)
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" ||
List.mem pkg well_known_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 ());

(* Like -package but for extensions syntax. Morover -syntax is useless
* when linking. *)
Expand Down Expand Up @@ -672,13 +661,12 @@ module MyOCamlbuildBase = struct

(* When ocaml link something that use the C library, then one
need that file to be up to date.
This holds both for programs and for libraries.
*)
dep ["link"; "ocaml"; tag_libstubs lib]
[dir/"lib"^(nm_libstubs lib)^"."^(!Options.ext_lib)];
dep ["link"; "ocaml"; "program"; tag_libstubs lib]
[dir/"lib"^(nm_libstubs lib)^"."^(!Options.ext_lib)];

dep ["compile"; "ocaml"; tag_libstubs lib]
[dir/"lib"^(nm_libstubs lib)^"."^(!Options.ext_lib)];
dep ["compile"; "ocaml"; "program"; tag_libstubs lib]
[dir/"lib"^(nm_libstubs lib)^"."^(!Options.ext_lib)];

(* TODO: be more specific about what depends on headers *)
(* Depends on .h files *)
Expand Down Expand Up @@ -707,18 +695,18 @@ module MyOCamlbuildBase = struct
()


let dispatch_default conf t =
let dispatch_default t =
dispatch_combine
[
dispatch t;
MyOCamlbuildFindlib.dispatch conf;
MyOCamlbuildFindlib.dispatch;
]


end


# 606 "myocamlbuild.ml"
# 594 "myocamlbuild.ml"
open Ocamlbuild_plugin;;
let package_default =
{
Expand Down Expand Up @@ -915,11 +903,9 @@ let package_default =
}
;;

let conf = {MyOCamlbuildFindlib.no_automatic_syntax = false}

let dispatch_default = MyOCamlbuildBase.dispatch_default conf package_default;;
let dispatch_default = MyOCamlbuildBase.dispatch_default package_default;;

# 808 "myocamlbuild.ml"
# 794 "myocamlbuild.ml"
(* OASIS_STOP *)

open Ocamlbuild_plugin;;
Expand Down
58 changes: 24 additions & 34 deletions setup.ml
Expand Up @@ -21,9 +21,9 @@
(******************************************************************************)

(* OASIS_START *)
(* DO NOT EDIT (digest: fa45c67c39b7b472844f519bfbcd5f2f) *)
(* DO NOT EDIT (digest: 2c820ab20065c3c2df4a4f2bad9852ef) *)
(*
Regenerated by OASIS v0.4.5
Regenerated by OASIS v0.4.4
Visit http://oasis.forge.ocamlcore.org for more information and
documentation about functions used in this file.
*)
Expand Down Expand Up @@ -262,9 +262,11 @@ module OASISString = struct


let replace_chars f s =
let buf = Buffer.create (String.length s) in
String.iter (fun c -> Buffer.add_char buf (f c)) s;
Buffer.contents buf
let buf = String.make (String.length s) 'X' in
for i = 0 to String.length s - 1 do
buf.[i] <- f s.[i]
done;
buf


end
Expand Down Expand Up @@ -1747,13 +1749,6 @@ module OASISFeatures = struct
(fun () ->
s_ "Allows the OASIS section comments and digest to be omitted in \
generated files.")

let no_automatic_syntax =
create "no_automatic_syntax" alpha
(fun () ->
s_ "Disable the automatic inclusion of -syntax camlp4o for packages \
that matches the internal heuristic (if a dependency ends with \
a .syntax or is a well known syntax).")
end

module OASISUnixPath = struct
Expand Down Expand Up @@ -2524,13 +2519,13 @@ module OASISFindlib = struct
in

let library_name_of_findlib_name =
lazy begin
(* Revert findlib_name_of_library_name. *)
MapString.fold
(fun k v mp -> MapString.add v k mp)
fndlb_name_of_lib_name
MapString.empty
end
Lazy.lazy_from_fun
(fun () ->
(* Revert findlib_name_of_library_name. *)
MapString.fold
(fun k v mp -> MapString.add v k mp)
fndlb_name_of_lib_name
MapString.empty)
in
let library_name_of_findlib_name fndlb_nm =
try
Expand Down Expand Up @@ -2900,7 +2895,7 @@ module OASISFileUtil = struct
end


# 2883 "setup.ml"
# 2878 "setup.ml"
module BaseEnvLight = struct
# 22 "src/base/BaseEnvLight.ml"

Expand Down Expand Up @@ -3005,7 +3000,7 @@ module BaseEnvLight = struct
end


# 2988 "setup.ml"
# 2983 "setup.ml"
module BaseContext = struct
# 22 "src/base/BaseContext.ml"

Expand Down Expand Up @@ -5416,7 +5411,7 @@ module BaseSetup = struct
end


# 5399 "setup.ml"
# 5394 "setup.ml"
module InternalConfigurePlugin = struct
# 22 "src/plugins/internal/InternalConfigurePlugin.ml"

Expand Down Expand Up @@ -6265,7 +6260,7 @@ module InternalInstallPlugin = struct
end


# 6248 "setup.ml"
# 6243 "setup.ml"
module OCamlbuildCommon = struct
# 22 "src/plugins/ocamlbuild/OCamlbuildCommon.ml"

Expand Down Expand Up @@ -6323,11 +6318,6 @@ module OCamlbuildCommon = struct
else
[];

if bool_of_string (tests ()) then
["-tag"; "tests"]
else
[];

if bool_of_string (profile ()) then
["-tag"; "profile"]
else
Expand Down Expand Up @@ -6643,7 +6633,7 @@ module OCamlbuildDocPlugin = struct
end


# 6626 "setup.ml"
# 6616 "setup.ml"
module CustomPlugin = struct
# 22 "src/plugins/custom/CustomPlugin.ml"

Expand Down Expand Up @@ -6791,7 +6781,7 @@ module CustomPlugin = struct
end


# 6774 "setup.ml"
# 6764 "setup.ml"
open OASISTypes;;

let setup_t =
Expand Down Expand Up @@ -7053,7 +7043,7 @@ let setup_t =
alpha_features = [];
beta_features = [];
name = "oasis";
version = "0.4.5";
version = "0.4.6";
license =
OASISLicense.DEP5License
(OASISLicense.DEP5Unit
Expand Down Expand Up @@ -8109,16 +8099,16 @@ let setup_t =
plugin_data = []
};
oasis_fn = Some "_oasis";
oasis_version = "0.4.5";
oasis_digest = Some "*\b~\244\002\202\002u\157\2338\189\220\191)W";
oasis_version = "0.4.4";
oasis_digest = Some "F\163zr\185e\141\241L\222\141\n\211\184\192t";
oasis_exec = None;
oasis_setup_args = [];
setup_update = false
};;

let setup () = BaseSetup.setup setup_t;;

# 8102 "setup.ml"
# 8092 "setup.ml"
(* OASIS_STOP *)

#use "deps.ml";;
Expand Down
4 changes: 2 additions & 2 deletions src/ext/plugin-loader/src/META
Expand Up @@ -21,8 +21,8 @@
################################################################################

# OASIS_START
# DO NOT EDIT (digest: 7e33f3dca61b930ced739aa5b047217d)
version = "0.4.5"
# DO NOT EDIT (digest: 1228b4b3ff5712c4ef5c24b252a7d617)
version = "0.4.6"
description = "Architecture for building OCaml libraries and applications"
requires = "dynlink findlib"
archive(byte) = "plugin-loader.cma"
Expand Down
4 changes: 2 additions & 2 deletions src/ext/plugin-loader/test/data/findlib/plugin1/META
Expand Up @@ -21,8 +21,8 @@
################################################################################

# OASIS_START
# DO NOT EDIT (digest: 126772110dacd9129d6eafd643cdf41f)
version = "0.4.5"
# DO NOT EDIT (digest: 0a20f5f6e538595867b25afbe1fd6f70)
version = "0.4.6"
description = "Architecture for building OCaml libraries and applications"
requires = "pluginloaderLib"
archive(byte) = "plugin1.cma"
Expand Down
4 changes: 2 additions & 2 deletions src/ext/plugin-loader/test/data/findlib/plugin2/META
Expand Up @@ -21,8 +21,8 @@
################################################################################

# OASIS_START
# DO NOT EDIT (digest: 5149115adbcff5eaa4da307bb4cc087b)
version = "0.4.5"
# DO NOT EDIT (digest: 15e7294d3d2247cc3d362695142182f2)
version = "0.4.6"
description = "Architecture for building OCaml libraries and applications"
requires = "pluginloaderLib plugin1"
archive(byte) = "plugin2.cma"
Expand Down
4 changes: 2 additions & 2 deletions src/ext/plugin-loader/test/data/findlib/plugin3/META
Expand Up @@ -21,8 +21,8 @@
################################################################################

# OASIS_START
# DO NOT EDIT (digest: 9b161f62d6930349aa6a2477200799c8)
version = "0.4.5"
# DO NOT EDIT (digest: 88eb82fafc9bfcd25d7259cd3c90a033)
version = "0.4.6"
description = "Architecture for building OCaml libraries and applications"
requires = "pluginloaderLib"
archive(byte) = "plugin3.cma"
Expand Down
4 changes: 2 additions & 2 deletions src/ext/plugin-loader/test/data/findlib/pluginloaderLib/META
Expand Up @@ -21,8 +21,8 @@
################################################################################

# OASIS_START
# DO NOT EDIT (digest: de997dc5d834e4f4a6a2de2e93e75171)
version = "0.4.5"
# DO NOT EDIT (digest: cf25e59a9e1e1593b91a1a649ae3b193)
version = "0.4.6"
description = "Architecture for building OCaml libraries and applications"
archive(byte) = "pluginloaderLib.cma"
archive(byte, plugin) = "pluginloaderLib.cma"
Expand Down
4 changes: 2 additions & 2 deletions src/ext/userconf/src/META
Expand Up @@ -21,8 +21,8 @@
################################################################################

# OASIS_START
# DO NOT EDIT (digest: 04740f4a1ac7a7da88d1909313d74374)
version = "0.4.5"
# DO NOT EDIT (digest: 3c65049f13a1cea4d370fbb468881add)
version = "0.4.6"
description = "Architecture for building OCaml libraries and applications"
archive(byte) = "userconf.cma"
archive(byte, plugin) = "userconf.cma"
Expand Down

0 comments on commit 39d11bf

Please sign in to comment.