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

Use asciidoctor to generate man pages from asciidoc sources #3069

Closed

Conversation

hansu
Copy link
Member

@hansu hansu commented Aug 16, 2024

asciidoctor does a much better job in converting the man pages from the asciidoc format than a2x.
But asciidoctor needs to be installed on the CI.

Resolves #3057

@hansu hansu marked this pull request as ready for review August 19, 2024 20:22
@hansu
Copy link
Member Author

hansu commented Aug 19, 2024

  1. Does anyone knows how to install software on the GitHub CI?
  2. Man pages which include other man pages makes some problems
    e.g. I get
    make: *** No rule to make target '../docs/man/millturn.1', needed by '../docs/html/man/man1/millturngui.1.html'. Stop.
    The millturn.1 man page is generated from milltun.1.adoc, but millturngui.1 just consists of ".so millturn.1" - there is no millturngui.1.adoc. I wonder how does it know to include that man page?

@petterreinholdtsen
Copy link
Collaborator

petterreinholdtsen commented Aug 24, 2024 via email

@hansu
Copy link
Member Author

hansu commented Aug 24, 2024

How do you trigger this problem?

Just build the docs from this branch (with first asciidoctor installed)

the .SO pages are
generated when there are several names listed in a .adoc manpage, the
first one get the content, the rest get a .SO redirect.

So the last line here generates an include for millturngui? Interesting automatism.

== NAME

millturn, millturngui - Vismach Virtual Machine GUI

@andypugh
Copy link
Collaborator

`make: *** No rule to make target '../docs/man/millturn.1', needed by '../docs/html/man/man1/millturngui.1.html'.

This sounds familiar, in that millturn and friends were the subject of a recent commit, is this related?

5d44850

@hansu
Copy link
Member Author

hansu commented Sep 1, 2024

Yes and the problem is more that we have now one man page for millturn and one for millturngui where we had only one for both before. But that one I got resolved with Petters hint, now I am at the man3 pages...

@hansu hansu force-pushed the asciidoctor-for-manpage-generation branch from d52975b to 305997b Compare September 2, 2024 11:14
@hansu
Copy link
Member Author

hansu commented Sep 2, 2024

This man page for example

= rtapi_module_param(3rtapi)

== NAME

rtapi_module_param, EXPORT_FUNCTION, RTAPI_MP_INT, RTAPI_MP_LONG,
RTAPI_MP_STRING, RTAPI_MP_ARRAY_INT, RTAPI_MP_ARRAY_LONG,
RTAPI_MP_ARRAY_STRING, MODULE_LICENSE, MODULE_AUTHOR,
MODULE_DESCRIPTION - Specifying module parameters

creates files like EXPORT_FUNCTION.3
which contains .so rtapi_module_param.3
So far so good.
But it fails when trying to generate the HTML pages:

make: *** No rule to make target '../docs/man/rtapi_module_param.3', needed by '../docs/html/man/man3/EXPORT_FUNCTION.3.html'. Stop.

If I omit the including like I started in d52975b but there should be way to fix it without that.

As I have no idea, I will close that. Seems we have to live with the slightly ugly man pages now.

If someone has an idea to fix that, feel free to open this again.

@hansu hansu closed this Sep 2, 2024
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.

Man pages in adoc format are not converted properly
3 participants