diff --git a/CHANGES.md b/CHANGES.md index 4cba8f2..230a2dc 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -2,7 +2,8 @@ - Update licensing metadata. - Update dune files to 2.7 to autogenerate opam files correctly (#2) -- Lower OCaml version to 4.02.3 +- Lower OCaml version to 4.02.3 (#3) +- Install empty library for OCaml < 4.14 (#5) # Release 5.0 (2021-06-29) diff --git a/src/dune b/src/dune index 1a23450..e666e35 100644 --- a/src/dune +++ b/src/dune @@ -1,5 +1,15 @@ +(* -*- tuareg -*- *) + +open Jbuild_plugin.V1 + +let modules = + let version = Scanf.sscanf ocaml_version "%u.%u" (fun a b -> (a, b)) in + if version >= (4, 14) then ":standard" else "" + +let () = Printf.ksprintf send {| (library (name camlp_streams) (public_name camlp-streams) + (modules %s) (wrapped false) - (flags :standard -w -9)) + (flags :standard -w -9))|} modules