Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build the man-pages using dune #3902

Closed
wants to merge 19 commits into from
Closed

Build the man-pages using dune #3902

wants to merge 19 commits into from

Conversation

@AltGr
Copy link
Member

AltGr commented Jun 28, 2019

this avoids a big annoyance on every make install

@AltGr AltGr force-pushed the OCamlPro:dune-man branch from 7cafae0 to 99b4ef8 Jun 28, 2019
@AltGr

This comment has been minimized.

Copy link
Member Author

AltGr commented Jul 4, 2019

@dra27 an idea what's still blocking here ?

@dra27

This comment has been minimized.

Copy link
Contributor

dra27 commented Jul 4, 2019

See the PR I made on the OCamlPro repo - I have another commit to push in a sec

dra27 and others added 5 commits Jul 4, 2019
Updates for generating manpages with Dune
@dra27

This comment has been minimized.

Copy link
Contributor

dra27 commented Jul 4, 2019

Here's the diff with the old opam-actual.install:

--- opam.install	2019-07-04 16:27:03.845855812 +0100
+++ opam-actual.install	2019-07-04 16:29:52.726094232 +0100
@@ -1,27 +1,14 @@
-lib: [
-  "_build/install/default/lib/opam/META"
-  "_build/install/default/lib/opam/dune-package"
-  "_build/install/default/lib/opam/opam"
-]
 bin: [
   "_build/install/default/bin/opam"
 ]
 doc: [
-  "_build/install/default/doc/opam/CHANGES"
-  "_build/install/default/doc/opam/LICENSE"
-  "_build/install/default/doc/opam/README.md"
 ]
 man: [
-  "_build/install/default/man/man1/opam-admin-add-constraint.1"
-  "_build/install/default/man/man1/opam-admin-add-hashes.1"
   "_build/install/default/man/man1/opam-admin-cache.1"
-  "_build/install/default/man/man1/opam-admin-check.1"
   "_build/install/default/man/man1/opam-admin-filter.1"
-  "_build/install/default/man/man1/opam-admin-help.1"
   "_build/install/default/man/man1/opam-admin-index.1"
   "_build/install/default/man/man1/opam-admin-lint.1"
   "_build/install/default/man/man1/opam-admin-list.1"
-  "_build/install/default/man/man1/opam-admin-make.1"
   "_build/install/default/man/man1/opam-admin-upgrade.1"
   "_build/install/default/man/man1/opam-admin.1"
   "_build/install/default/man/man1/opam-clean.1"
@@ -32,6 +19,7 @@
   "_build/install/default/man/man1/opam-info.1"
   "_build/install/default/man/man1/opam-init.1"
   "_build/install/default/man/man1/opam-install.1"
+  "_build/install/default/man/man1/opam-installer.1"
   "_build/install/default/man/man1/opam-lint.1"
   "_build/install/default/man/man1/opam-list.1"
   "_build/install/default/man/man1/opam-lock.1"
@dra27

This comment has been minimized.

Copy link
Contributor

dra27 commented Jul 4, 2019

So, there seem to be the following things left to check/resolve:

  • We're affected by ocaml/dune#2353, so the lib section should disappear in the future (but we'll need to post-process the file on the 2.0 branch to get rid of that)
  • We no longer install opam-installer.1 - however, we don't actually install opam-installer by default. I'm not sure if that's on purpose, or not. We should only install opam-installer.1 if we also install opam-installer (which we possibly should??) and we should also make sure that opam-installer.install (i.e. the separate package) builds opam-installer.1.
  • We're installing some doc files, which is going to exacerbate #3552 and #3711
  • This process has definitely caught some missing opam admin subcommands!
@dra27

This comment has been minimized.

Copy link
Contributor

dra27 commented Jul 4, 2019

This is enough to get opam-installer.1 in the opam-installer package:

diff --git a/doc/man/dune b/doc/man/dune
index 4dd4c3b2..2c5a27d6 100644
--- a/doc/man/dune
+++ b/doc/man/dune
@@ -8,6 +8,14 @@
   (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))
dra27 and others added 8 commits Jul 4, 2019
Another one!
Restores compatibility with make < 3.82
Final set!
@AltGr

This comment has been minimized.

Copy link
Member Author

AltGr commented Jul 22, 2019

Superseded by #3937 (thanks @dra27 !)

@AltGr AltGr closed this Jul 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.