Skip to content

Commit

Permalink
Merge pull request #5496 from Leonidas-from-XIV/explicit-package-asso…
Browse files Browse the repository at this point in the history
…ciations

Add `package` stanza on all rules that depend on opamMain.exe.exe
  • Loading branch information
rjbou authored Apr 3, 2023
2 parents 7f4558d + 2037c92 commit f4d631b
Show file tree
Hide file tree
Showing 9 changed files with 165 additions and 45 deletions.
11 changes: 7 additions & 4 deletions doc/man/dune
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,15 @@
(targets opam-topics.inc)
(deps %{bin:opam} using-built-opam)
(mode promote)
(action (with-stdout-to %{targets} (run %{exe:dune_man.exe} opam))))
(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))))
(action (with-stdout-to %{targets} (run %{exe:dune_man.exe} opam admin)))
(package opam))

(include opam-topics.inc)

Expand All @@ -50,5 +52,6 @@
(echo "let s = Sys.argv.(1) in exit (if not (Filename.is_implicit s) && Filename.is_relative s then 0 else 1)")))

(rule
(with-stdout-to using-built-opam (run ocaml %{dep:check_local_build.ml} %{bin:opam})))

(action
(with-stdout-to using-built-opam (run ocaml %{dep:check_local_build.ml} %{bin:opam})))
(package opam))
3 changes: 2 additions & 1 deletion doc/man/dune_man.ml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ let gen_topic target_basename dline t =
\ (deps using-built-opam)\n\
\ (action (progn (with-stderr-to %s-%s.err\n\
\ (with-stdout-to %s-%s.1 (run %s %s --help=groff)))\n\
\ (diff %s-%s.err %%{dep:%s-%s.0}))))\n\
\ (diff %s-%s.err %%{dep:%s-%s.0})))\n\
\ (package opam))\n\
"
target_basename t target_basename t target_basename t target_basename t target_basename t dline t target_basename t target_basename t

Expand Down
33 changes: 22 additions & 11 deletions doc/man/opam-admin-topics.inc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
(deps using-built-opam)
(action (progn (with-stderr-to opam-admin-help.err
(with-stdout-to opam-admin-help.1 (run %{bin:opam} admin help --help=groff)))
(diff opam-admin-help.err %{dep:opam-admin-help.0}))))
(diff opam-admin-help.err %{dep:opam-admin-help.0})))
(package opam))

(rule
(with-stdout-to opam-admin-add-hashes.0 (echo "")))
Expand All @@ -16,7 +17,8 @@
(deps using-built-opam)
(action (progn (with-stderr-to opam-admin-add-hashes.err
(with-stdout-to opam-admin-add-hashes.1 (run %{bin:opam} admin add-hashes --help=groff)))
(diff opam-admin-add-hashes.err %{dep:opam-admin-add-hashes.0}))))
(diff opam-admin-add-hashes.err %{dep:opam-admin-add-hashes.0})))
(package opam))

(rule
(with-stdout-to opam-admin-add-constraint.0 (echo "")))
Expand All @@ -25,7 +27,8 @@
(deps using-built-opam)
(action (progn (with-stderr-to opam-admin-add-constraint.err
(with-stdout-to opam-admin-add-constraint.1 (run %{bin:opam} admin add-constraint --help=groff)))
(diff opam-admin-add-constraint.err %{dep:opam-admin-add-constraint.0}))))
(diff opam-admin-add-constraint.err %{dep:opam-admin-add-constraint.0})))
(package opam))

(rule
(with-stdout-to opam-admin-filter.0 (echo "")))
Expand All @@ -34,7 +37,8 @@
(deps using-built-opam)
(action (progn (with-stderr-to opam-admin-filter.err
(with-stdout-to opam-admin-filter.1 (run %{bin:opam} admin filter --help=groff)))
(diff opam-admin-filter.err %{dep:opam-admin-filter.0}))))
(diff opam-admin-filter.err %{dep:opam-admin-filter.0})))
(package opam))

(rule
(with-stdout-to opam-admin-list.0 (echo "")))
Expand All @@ -43,7 +47,8 @@
(deps using-built-opam)
(action (progn (with-stderr-to opam-admin-list.err
(with-stdout-to opam-admin-list.1 (run %{bin:opam} admin list --help=groff)))
(diff opam-admin-list.err %{dep:opam-admin-list.0}))))
(diff opam-admin-list.err %{dep:opam-admin-list.0})))
(package opam))

(rule
(with-stdout-to opam-admin-check.0 (echo "")))
Expand All @@ -52,7 +57,8 @@
(deps using-built-opam)
(action (progn (with-stderr-to opam-admin-check.err
(with-stdout-to opam-admin-check.1 (run %{bin:opam} admin check --help=groff)))
(diff opam-admin-check.err %{dep:opam-admin-check.0}))))
(diff opam-admin-check.err %{dep:opam-admin-check.0})))
(package opam))

(rule
(with-stdout-to opam-admin-lint.0 (echo "")))
Expand All @@ -61,7 +67,8 @@
(deps using-built-opam)
(action (progn (with-stderr-to opam-admin-lint.err
(with-stdout-to opam-admin-lint.1 (run %{bin:opam} admin lint --help=groff)))
(diff opam-admin-lint.err %{dep:opam-admin-lint.0}))))
(diff opam-admin-lint.err %{dep:opam-admin-lint.0})))
(package opam))

(rule
(with-stdout-to opam-admin-upgrade.0 (echo "")))
Expand All @@ -70,7 +77,8 @@
(deps using-built-opam)
(action (progn (with-stderr-to opam-admin-upgrade.err
(with-stdout-to opam-admin-upgrade.1 (run %{bin:opam} admin upgrade --help=groff)))
(diff opam-admin-upgrade.err %{dep:opam-admin-upgrade.0}))))
(diff opam-admin-upgrade.err %{dep:opam-admin-upgrade.0})))
(package opam))

(rule
(with-stdout-to opam-admin-cache.0 (echo "")))
Expand All @@ -79,7 +87,8 @@
(deps using-built-opam)
(action (progn (with-stderr-to opam-admin-cache.err
(with-stdout-to opam-admin-cache.1 (run %{bin:opam} admin cache --help=groff)))
(diff opam-admin-cache.err %{dep:opam-admin-cache.0}))))
(diff opam-admin-cache.err %{dep:opam-admin-cache.0})))
(package opam))

(rule
(with-stdout-to opam-admin-make.0 (echo "")))
Expand All @@ -88,7 +97,8 @@
(deps using-built-opam)
(action (progn (with-stderr-to opam-admin-make.err
(with-stdout-to opam-admin-make.1 (run %{bin:opam} admin make --help=groff)))
(diff opam-admin-make.err %{dep:opam-admin-make.0}))))
(diff opam-admin-make.err %{dep:opam-admin-make.0})))
(package opam))

(rule
(with-stdout-to opam-admin-index.0 (echo "")))
Expand All @@ -97,7 +107,8 @@
(deps using-built-opam)
(action (progn (with-stderr-to opam-admin-index.err
(with-stdout-to opam-admin-index.1 (run %{bin:opam} admin index --help=groff)))
(diff opam-admin-index.err %{dep:opam-admin-index.0}))))
(diff opam-admin-index.err %{dep:opam-admin-index.0})))
(package opam))

(install
(section man)
Expand Down
Loading

0 comments on commit f4d631b

Please sign in to comment.