[GRASS-git] [OSGeo/grass] 01ac43: CMake: Build man pages from markdown (#7674)

Anna Petrasova noreply at github.com
Mon Jul 13 21:07:16 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/OSGeo/grass
  Commit: 01ac43ddc639e01e14ecb3025ee4a624919e551a
      https://github.com/OSGeo/grass/commit/01ac43ddc639e01e14ecb3025ee4a624919e551a
  Author: Anna Petrasova <kratochanna at gmail.com>
  Date:   2026-07-14 (Tue, 14 Jul 2026)

  Changed paths:
    M CMakeLists.txt
    M cmake/modules/generate_docs.cmake
    M man/CMakeLists.txt
    A man/build_manpages.py
    M utils/CMakeLists.txt

  Log Message:
  -----------
  CMake: Build man pages from markdown (#7674)

* CMake: Build man pages from markdown
Generate the markdown documentation (--md-description + mkmarkdown.py)
in all three doc paths (modules, GUI, scripts) and convert man pages
from it with g.md2man instead of from HTML with g.html2man, mirroring
the Autotools build. Install g.md2man.py and gmd.py, and install the
generated docs/mkdocs tree, which was previously not installed at all.

Add man/build_manpages.py, a sweep run after the index scripts that
converts any markdown page without an up-to-date man page. It ports
man/Makefile's MANPAGES wildcard to CMake, which has no build-time
glob, and produces the index and dynamically named topic_* man pages
that the CMake build previously did not ship.

Run the doc generators in the tool source directory like Autotools
does. This fixes the SOURCE CODE footer in all CMake-built pages,
which previously pointed to a nonexistent build-directory path in the
repository and fell back to an Accessed date instead of the last
commit, and makes the copy-source-into-build-dir steps unnecessary.
Also fix build_class.py receiving the documentation directory as its
year argument.

Verified against an Autotools build: g.md2man output for the same
generated markdown is byte-identical.

Generated with AI assistance (Claude Fable), including the build
verification against the Autotools doc tree.

* address review



To unsubscribe from these emails, change your notification settings at https://github.com/OSGeo/grass/settings/notifications


More information about the grass-commit mailing list