Skip to content

Commit 7ef55e4

Browse files
committed
[Flang][Docs] Add Sphinx man page support for Flang
This patch enables building Flang man pages by: - Adding a `man_pages` entry in flang/docs/conf.py for Sphinx man builder. - Adding a minimal `index.rst` as the master document. - Adding placeholder `.rst` files for FIRLangRef and FlangCommandLineReference to fix toctree references. These changes unblock builds using `-DLLVM_BUILD_MANPAGES=ON` and allow `ninja docs-flang-man` to generate `flang.1`. Fixes #141757
1 parent 9cdd33d commit 7ef55e4

File tree

4 files changed

+21
-1
lines changed

4 files changed

+21
-1
lines changed

flang/docs/FIRLangRef.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
FIR Language Reference
2+
======================
3+
4+
(TODO: Add FIR language reference documentation)
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Flang Command Line Reference
2+
============================
3+
4+
(TODO: Add Flang CLI documentation)

flang/docs/conf.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,9 @@
227227

228228
# One entry per manual page. List of tuples
229229
# (source start file, name, description, authors, manual section).
230-
man_pages = []
230+
man_pages = [
231+
('index', 'flang', 'Flang Documentation', ['Flang Contributors'], 1)
232+
]
231233

232234
# If true, show URL addresses after external links.
233235
# man_show_urls = False

flang/docs/index.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
Flang Documentation
2+
====================
3+
4+
Welcome to the Flang documentation.
5+
6+
.. toctree::
7+
:maxdepth: 1
8+
9+
FIRLangRef
10+
FlangCommandLineReference

0 commit comments

Comments
 (0)