Skip to content

Commit

Permalink
simplify compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
kit-ty-kate committed Dec 2, 2024
1 parent 2520f32 commit 48dd208
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/dune
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,14 @@
(public_name opam-file-format)
(synopsis "Parser and printer for the opam file syntax")
(wrapped false)
(modules :standard \ flags)
(flags :standard (:include flags.sexp)))

(rule
(with-stdout-to flags.ml
(echo "print_string (if String.sub Sys.ocaml_version 0 5 = \"4.02.\" then \"(-w -50)\" else \"()\")")))

(enabled_if (< %{ocaml_version} "4.03"))
(action (with-stdout-to flags.sexp (echo "(-w -50)"))))
(rule
(with-stdout-to flags.sexp
(run ocaml %{dep:flags.ml})))
(enabled_if (>= %{ocaml_version} "4.03"))
(action (with-stdout-to flags.sexp (echo "()"))))

(ocamlyacc opamBaseParser)
(ocamllex opamLexer)
Expand Down

0 comments on commit 48dd208

Please sign in to comment.