1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57
|
; opam must always be invoked as %{bin:opam} to ensure that the manifested runtime on mingw is
; assembled, if it was selected at configure-time (%{exe:opamMain.exe} is not executable in this
; case.
(rule
(targets opam.1)
(deps opam-topics.inc opam-admin-topics.inc)
(action (with-stdout-to %{targets} (run %{bin:opam} --help=groff))))
(install
(section man)
(package opam)
(files opam.1))
(rule
(with-stdout-to opam-installer.1 (run %{bin:opam-installer} --help=groff)))
(install
(section man)
(package opam-installer)
(files opam-installer.1))
(executable
(name dune_man)
(libraries unix))
(rule
(targets opam-topics.inc)
(deps %{bin:opam} using-built-opam)
(mode promote)
(action (with-stdout-to %{targets} (run %{exe:dune_man.exe} opam)))
(package opam))
(rule
(targets opam-admin-topics.inc)
(deps %{bin:opam} using-built-opam)
(mode promote)
(action (with-stdout-to %{targets} (run %{exe:dune_man.exe} opam admin)))
(package opam))
(include opam-topics.inc)
(include opam-admin-topics.inc)
; This ensures that no opam command run will block asking for input
(env
(_ (env-vars ("OPAMYES" "no"))))
; This ensure that %{bin:opam} really refers to the opam built in the tree
(rule
(with-stdout-to check_local_build.ml
(echo "let s = Sys.argv.(1) in exit (if not (Filename.is_implicit s) && Filename.is_relative s then 0 else 1)")))
(rule
(action
(with-stdout-to using-built-opam (run ocaml %{dep:check_local_build.ml} %{bin:opam})))
(package opam))
|