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

Updates for generating manpages with Dune #4

Merged
merged 7 commits into from
Jul 4, 2019

Conversation

dra27
Copy link

@dra27 dra27 commented Jul 2, 2019

The Windows tweaks are minor - the major change is to ensure that cmdliner errors cause build errors

@dra27
Copy link
Author

dra27 commented Jul 2, 2019

This is the output if there are escaping errors (cf. ocaml#3911):

DRA@Phantasos ~/opam
$ make
/cygdrive/c/Users/DRA/Documents/opam/src_ext/dune-local/_boot/install/default/bin/dune.exe build --profile=release  opam.install
Done: 2433/2444 (jobs: 4)File "doc/man/opam-switch.err", line 1, characters 0-0:
        diff (internal) (exit 1)
(cd _build/default && C:\cygwin\bin\diff.exe -u --strip-trailing-cr doc/man/opam-switch.err doc/man/opam-switch.0)
--- doc/man/opam-switch.err     2019-07-02 10:36:37.167849500 +0100
+++ doc/man/opam-switch.0       2019-07-01 17:46:41.789094300 +0100
@@ -1 +0,0 @@
-cmdliner error: Illegal escape char '.' in "Switch handles $(i,SWITCH) can be either a plain name, for 
switches that will be held inside $(i,~\\.opam), or a directory name, which in that case is the directory 
where the switch prefix will be installed, as _opam. Opam will automatically select a switch by that name 
found in the current directory or its parents, unless $(i,OPAMSWITCH) is set or $(b,--switch) is specified. 
When creating a directory switch, if package definitions are found locally, the user is automatically 
prompted to install them after the switch is created unless $(b,--no-install) is specified."
make: *** [Makefile:110: opam.install] Error 1

@dra27
Copy link
Author

dra27 commented Jul 4, 2019

A few more fixes, @AltGr - I realised that opam.1 wasn't actually being built because it wasn't down to be installed! It's a useful place to hook in and use automatic promotion - this means that if you were to add a command, you run make once and the working tree updates then you run make again and it actually builds with the new topics (you can test this by, say, removing the clean command in opamCommands.ml and seeing that it takes two runs of make to remove _build/install/default/man/man1/opam-clean.1

@dra27
Copy link
Author

dra27 commented Jul 4, 2019

What isn't right is what's going on in make tests - I need to make it so that make tests realises that the working tree has become dirty by running make

@AltGr AltGr merged commit 27e4b51 into OCamlPro:dune-man Jul 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants