cmake: Generate man pages at install time #31764

pull hebasto wants to merge 2 commits into bitcoin:master from hebasto:250130-man-install changing 11 files +13 −36
  1. hebasto commented at 12:33 pm on January 30, 2025: member

    This PR enables the man pages to be generated on the fly during installation.

    As the GNU help2man tool is required to generate man pages, the INSTALL_MAN build option is disabled by default.

    Addresses this comment:https://github.com/bitcoin/bitcoin/blob/809d7e763cc9bdfff3288860a1c530460c76ffff/src/CMakeLists.txt#L456

    Fixes #31762.

  2. cmake: Disable `INSTALL_MAN` by default
    In subsequent commits, manpages will be generated on the fly, which
    requires the `help2man` tool.
    c089b990cf
  3. cmake: Generate man pages at install time 8c8c27bf8b
  4. hebasto added the label Build system on Jan 30, 2025
  5. hebasto added this to the milestone 29.0 on Jan 30, 2025
  6. DrahtBot commented at 12:33 pm on January 30, 2025: contributor

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    Code Coverage & Benchmarks

    For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/31764.

    Reviews

    See the guideline for information on the review process. A summary of reviews will appear here.

  7. hebasto commented at 12:38 pm on January 30, 2025: member
    cc @theuni, as the author of the TODO comment.
  8. in contrib/guix/manifest.scm:549 in 8c8c27bf8b
    545@@ -545,6 +546,7 @@ inspecting signatures in Mach-O binaries.")
    546         gcc-toolchain-12
    547         cmake-minimal
    548         gnu-make
    549+        help2man
    


    fanquake commented at 12:40 pm on January 30, 2025:
    How does this change the guix dep graph?
  9. in src/CMakeLists.txt:457 in 8c8c27bf8b
    452@@ -453,9 +453,9 @@ install(TARGETS ${installable_targets}
    453 unset(installable_targets)
    454 
    455 if(INSTALL_MAN)
    456-  # TODO: these stubs are no longer needed. man pages should be generated at install time.
    457-  install(DIRECTORY ../doc/man/
    458+  install(CODE "execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${PROJECT_BINARY_DIR}/doc/man)")
    459+  install(CODE "execute_process(COMMAND ${CMAKE_COMMAND} -E env BUILDDIR=${PROJECT_BINARY_DIR} MANDIR=${PROJECT_BINARY_DIR}/doc/man ${PROJECT_SOURCE_DIR}/contrib/devtools/gen-manpages.py --skip-missing-binaries)")
    


    fanquake commented at 12:43 pm on January 30, 2025:

    –skip-missing-binaries

    I don’t think we should be hardcoding a flag to ignore/skip errors into a script that you’re making a requirement for release builds.

  10. hebasto marked this as a draft on Jan 30, 2025
  11. TheCharlatan commented at 12:53 pm on January 30, 2025: contributor
    Do the release process docs need any changes from this?
  12. hebasto closed this on Jan 30, 2025

  13. hebasto commented at 1:15 pm on January 30, 2025: member
    This approach is not applicable for general cross-compilation scenarios :man_facepalming:
  14. fanquake commented at 1:38 pm on January 30, 2025: member
    One other side-effect of this change would be that someone cloning a tag would no-longer get the manpages. Maybe this doesn’t matter, but would be good to mention.

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2025-02-22 06:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me