Skip to content

Commit 9ed279b

Browse files
committed
Adding META
Change-Id: I7c084603c8c709767e6f50c5642419418d603592
1 parent 1481fc4 commit 9ed279b

File tree

3 files changed

+153
-163
lines changed

3 files changed

+153
-163
lines changed

META

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# OASIS_START
2+
# DO NOT EDIT (digest: 043d7edb52f5d422d6ff26da03c2bdef)
3+
version = "0.1"
4+
description = "BAP Trace Format"
5+
requires = "core_kernel piqirun.pb piqirun.ext piqilib"
6+
archive(byte) = "bap-traces.cma"
7+
archive(byte, plugin) = "bap-traces.cma"
8+
archive(native) = "bap-traces.cmxa"
9+
archive(native, plugin) = "bap-traces.cmxs"
10+
exists_if = "bap-traces.cma"
11+
# OASIS_STOP
12+

myocamlbuild.ml

Lines changed: 48 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
(* OASIS_START *)
2-
(* DO NOT EDIT (digest: b9c71e7d1ddd2a4412821af705169ba7) *)
2+
(* DO NOT EDIT (digest: fb39601598e0c8e6f4698a5182f16985) *)
33
module OASISGettext = struct
4-
# 22 "/home/maurer/Sources/live/oasis/src/oasis/OASISGettext.ml"
4+
(* # 22 "src/oasis/OASISGettext.ml" *)
55

66

77
let ns_ str =
@@ -30,7 +30,7 @@ module OASISGettext = struct
3030
end
3131

3232
module OASISExpr = struct
33-
# 22 "/home/maurer/Sources/live/oasis/src/oasis/OASISExpr.ml"
33+
(* # 22 "src/oasis/OASISExpr.ml" *)
3434

3535

3636

@@ -39,10 +39,10 @@ module OASISExpr = struct
3939
open OASISGettext
4040

4141

42-
type test = string
42+
type test = string
4343

4444

45-
type flag = string
45+
type flag = string
4646

4747

4848
type t =
@@ -55,7 +55,7 @@ module OASISExpr = struct
5555

5656

5757

58-
type 'a choices = (t * 'a) list
58+
type 'a choices = (t * 'a) list
5959

6060

6161
let eval var_get t =
@@ -131,7 +131,7 @@ end
131131

132132
# 132 "myocamlbuild.ml"
133133
module BaseEnvLight = struct
134-
# 22 "/home/maurer/Sources/live/oasis/src/base/BaseEnvLight.ml"
134+
(* # 22 "src/base/BaseEnvLight.ml" *)
135135

136136

137137
module MapString = Map.Make(String)
@@ -236,7 +236,7 @@ end
236236

237237
# 237 "myocamlbuild.ml"
238238
module MyOCamlbuildFindlib = struct
239-
# 22 "/home/maurer/Sources/live/oasis/src/plugins/ocamlbuild/MyOCamlbuildFindlib.ml"
239+
(* # 22 "src/plugins/ocamlbuild/MyOCamlbuildFindlib.ml" *)
240240

241241

242242
(** OCamlbuild extension, copied from
@@ -249,9 +249,6 @@ module MyOCamlbuildFindlib = struct
249249
*)
250250
open Ocamlbuild_plugin
251251

252-
type conf =
253-
{ no_automatic_syntax: bool;
254-
}
255252

256253
(* these functions are not really officially exported *)
257254
let run_and_read =
@@ -341,7 +338,7 @@ module MyOCamlbuildFindlib = struct
341338
]
342339

343340

344-
let dispatch conf =
341+
let dispatch =
345342
function
346343
| After_options ->
347344
(* By using Before_options one let command line options have an higher
@@ -360,39 +357,31 @@ module MyOCamlbuildFindlib = struct
360357
* -linkpkg *)
361358
flag ["ocaml"; "link"; "program"] & A"-linkpkg";
362359

363-
if not (conf.no_automatic_syntax) then begin
364-
(* For each ocamlfind package one inject the -package option when
365-
* compiling, computing dependencies, generating documentation and
366-
* linking. *)
367-
List.iter
368-
begin fun pkg ->
369-
let base_args = [A"-package"; A pkg] in
370-
(* TODO: consider how to really choose camlp4o or camlp4r. *)
371-
let syn_args = [A"-syntax"; A "camlp4o"] in
372-
let (args, pargs) =
373-
(* Heuristic to identify syntax extensions: whether they end in
374-
".syntax"; some might not.
375-
*)
376-
if Filename.check_suffix pkg "syntax" ||
377-
List.mem pkg well_known_syntax then
378-
(syn_args @ base_args, syn_args)
379-
else
380-
(base_args, [])
381-
in
382-
flag ["ocaml"; "compile"; "pkg_"^pkg] & S args;
383-
flag ["ocaml"; "ocamldep"; "pkg_"^pkg] & S args;
384-
flag ["ocaml"; "doc"; "pkg_"^pkg] & S args;
385-
flag ["ocaml"; "link"; "pkg_"^pkg] & S base_args;
386-
flag ["ocaml"; "infer_interface"; "pkg_"^pkg] & S args;
387-
388-
(* TODO: Check if this is allowed for OCaml < 3.12.1 *)
389-
flag ["ocaml"; "compile"; "package("^pkg^")"] & S pargs;
390-
flag ["ocaml"; "ocamldep"; "package("^pkg^")"] & S pargs;
391-
flag ["ocaml"; "doc"; "package("^pkg^")"] & S pargs;
392-
flag ["ocaml"; "infer_interface"; "package("^pkg^")"] & S pargs;
393-
end
394-
(find_packages ());
395-
end;
360+
(* For each ocamlfind package one inject the -package option when
361+
* compiling, computing dependencies, generating documentation and
362+
* linking. *)
363+
List.iter
364+
begin fun pkg ->
365+
let base_args = [A"-package"; A pkg] in
366+
(* TODO: consider how to really choose camlp4o or camlp4r. *)
367+
let syn_args = [A"-syntax"; A "camlp4o"] in
368+
let args =
369+
(* Heuristic to identify syntax extensions: whether they end in
370+
".syntax"; some might not.
371+
*)
372+
if Filename.check_suffix pkg "syntax" ||
373+
List.mem pkg well_known_syntax then
374+
syn_args @ base_args
375+
else
376+
base_args
377+
in
378+
flag ["ocaml"; "compile"; "pkg_"^pkg] & S args;
379+
flag ["ocaml"; "ocamldep"; "pkg_"^pkg] & S args;
380+
flag ["ocaml"; "doc"; "pkg_"^pkg] & S args;
381+
flag ["ocaml"; "link"; "pkg_"^pkg] & S base_args;
382+
flag ["ocaml"; "infer_interface"; "pkg_"^pkg] & S args;
383+
end
384+
(find_packages ());
396385

397386
(* Like -package but for extensions syntax. Morover -syntax is useless
398387
* when linking. *)
@@ -426,7 +415,7 @@ module MyOCamlbuildFindlib = struct
426415
end
427416

428417
module MyOCamlbuildBase = struct
429-
# 22 "/home/maurer/Sources/live/oasis/src/plugins/ocamlbuild/MyOCamlbuildBase.ml"
418+
(* # 22 "src/plugins/ocamlbuild/MyOCamlbuildBase.ml" *)
430419

431420

432421
(** Base functions for writing myocamlbuild.ml
@@ -441,13 +430,13 @@ module MyOCamlbuildBase = struct
441430
module OC = Ocamlbuild_pack.Ocaml_compiler
442431

443432

444-
type dir = string
445-
type file = string
446-
type name = string
447-
type tag = string
433+
type dir = string
434+
type file = string
435+
type name = string
436+
type tag = string
448437

449438

450-
# 62 "/home/maurer/Sources/live/oasis/src/plugins/ocamlbuild/MyOCamlbuildBase.ml"
439+
(* # 62 "src/plugins/ocamlbuild/MyOCamlbuildBase.ml" *)
451440

452441

453442
type t =
@@ -459,7 +448,7 @@ module MyOCamlbuildBase = struct
459448
* directory.
460449
*)
461450
includes: (dir * dir list) list;
462-
}
451+
}
463452

464453

465454
let env_filename =
@@ -557,12 +546,11 @@ module MyOCamlbuildBase = struct
557546

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

565-
dep ["compile"; "ocaml"; tag_libstubs lib]
553+
dep ["compile"; "ocaml"; "program"; tag_libstubs lib]
566554
[dir/"lib"^(nm_libstubs lib)^"."^(!Options.ext_lib)];
567555

568556
(* TODO: be more specific about what depends on headers *)
@@ -592,18 +580,18 @@ module MyOCamlbuildBase = struct
592580
()
593581

594582

595-
let dispatch_default conf t =
583+
let dispatch_default t =
596584
dispatch_combine
597585
[
598586
dispatch t;
599-
MyOCamlbuildFindlib.dispatch conf;
587+
MyOCamlbuildFindlib.dispatch;
600588
]
601589

602590

603591
end
604592

605593

606-
# 606 "myocamlbuild.ml"
594+
# 594 "myocamlbuild.ml"
607595
open Ocamlbuild_plugin;;
608596
let package_default =
609597
{
@@ -614,11 +602,9 @@ let package_default =
614602
}
615603
;;
616604

617-
let conf = {MyOCamlbuildFindlib.no_automatic_syntax = false}
618-
619-
let dispatch_default = MyOCamlbuildBase.dispatch_default conf package_default;;
605+
let dispatch_default = MyOCamlbuildBase.dispatch_default package_default;;
620606

621-
# 622 "myocamlbuild.ml"
607+
# 608 "myocamlbuild.ml"
622608
(* OASIS_STOP *)
623609
(*
624610
let dispatch_local e =

0 commit comments

Comments
 (0)