Skip to content

docs: Render C/F90/F08 bindings in man pages #13179

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -516,6 +516,7 @@ docs/_build
docs/_static
docs/_static/css/custom.css
docs/_templates
docs/man-openmpi/man3/bindings/*.rst

# Common Python virtual environment and cache directory names
venv
Expand Down
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,6 @@
[submodule "oac"]
path = config/oac
url = ../../open-mpi/oac
[submodule "3rd-party/pympistandard"]
path = 3rd-party/pympistandard
url = ../../mpi-forum/pympistandard
3 changes: 3 additions & 0 deletions .readthedocs-pre-create-environment.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,6 @@ PRRTE_RST_TARGET_DIR=docs/prrte-rst-content

cp -rp $SCHIZO_SRC_DIR $SCHIZO_TARGET_DIR
cp -rp $PRRTE_RST_SRC_DIR $PRRTE_RST_TARGET_DIR

cd docs
python3 ./generate-mpi-man3-bindings.py --srcdir . --builddir .
2 changes: 1 addition & 1 deletion 3rd-party/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

SUBDIRS = $(OPAL_3RDPARTY_SUBDIRS)
DIST_SUBDIRS = $(OPAL_3RDPARTY_DIST_SUBDIRS)
EXTRA_DIST = $(OPAL_3RDPARTY_EXTRA_DIST) autogen.subdirs
EXTRA_DIST = $(OPAL_3RDPARTY_EXTRA_DIST) autogen.subdirs pympistandard

distclean-local:
rm -rf $(OPAL_3RDPARTY_DISTCLEAN_DIRS)
Expand Down
1 change: 1 addition & 0 deletions 3rd-party/pympistandard
Submodule pympistandard added at 7bc6bb
27 changes: 22 additions & 5 deletions docs/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#
# Copyright (c) 2022 Cisco Systems, Inc. All rights reserved.
# Copyright (c) 2023-2024 Jeffrey M. Squyres. All rights reserved.
# Copyright (c) 2023-2025 Jeffrey M. Squyres. All rights reserved.
#
# $COPYRIGHT$
#
Expand Down Expand Up @@ -60,6 +60,8 @@ RST_SOURCE_FILES = \
EXTRA_DIST = \
requirements.txt \
no-prrte-content.rst.txt \
generate-mpi-man3-bindings.py \
mpi-standard-apis.json \
html \
man \
$(SPHINX_CONFIG) \
Expand Down Expand Up @@ -843,6 +845,10 @@ OMPI_MAN3_RST = $(OMPI_MAN3:%.3=man-openmpi/man3/%.3.rst)
OMPI_MAN3_BUILT = $(OMPI_MAN3:%.3=$(MAN_OUTDIR)/%.3)
OMPI_MAN3_INSTALL_FROM = $(OMPI_MAN3:%.3=$(MAN_INSTALL_FROM)/%.3)

# Use this one file as a sentinel for building all the Open MPI man
# page API bindings files
SENTINEL_OMPI_MAN3_BINDING = $(builddir)/man-openmpi/man3/bindings/mpi_init.rst

OMPI_MAN7_RST = $(OMPI_MAN7:%.7=man-openmpi/man7/%.7.rst)
OMPI_MAN7_BUILT = $(OMPI_MAN7:%.7=$(MAN_OUTDIR)/%.7)
OMPI_MAN7_INSTALL_FROM = $(OMPI_MAN7:%.7=$(MAN_INSTALL_FROM)/%.7)
Expand Down Expand Up @@ -921,7 +927,7 @@ man: $(ALL_MAN_BUILT)
# Remove the copies of the built HTML and man pages to get back to a
# clean git clone.
maintainer-clean-local:
rm -rf html man
rm -rf html man man-openmpi/man3/bindings

# If we're doing a VPATH build, we may have "html" and "man"
# directories in the build tree (e.g., if we did "make dist"). Remove
Expand Down Expand Up @@ -967,8 +973,8 @@ $(builddir)/schizo-ompi-rst-content:
$(builddir)/prrte-rst-content:
$(OMPI_V_MKDIR) if test ! -d "$@"; then mkdir "$@"; fi

# Get the schizo-ompi-rst-cli.rst file that we need. CAVEAT: we name
# it ".in" so that Sphinx doesn't slurp it in via two different
# Get the schizo-ompi-cli.rst file that we need. CAVEAT: we name it
# ".rstxt" so that Sphinx doesn't slurp it in via two different
# locations in the RST docroot (i.e., via
# /schizo-ompi-rst-content/schizo-ompi-cli.rstxt and via
# /man-openmpi/man1/mpirun.1.rst). Sphinx *shouldn't* do this -- it
Expand Down Expand Up @@ -998,10 +1004,20 @@ $(builddir)/schizo-ompi-rst-content/schizo-ompi-cli.rstxt: $(srcdir)/no-prrte-co
cp -pf $(srcdir)/no-prrte-content.rst.txt "$@"
endif

$(builddir)/man-openmpi/man3/bindings:
$(OMPI_V_MKDIR) if test ! -d "$@"; then mkdir -p "$@"; fi

$(SENTINEL_OMPI_MAN3_BINDING): $(builddir)/man-openmpi/man3/bindings
$(SENTINEL_OMPI_MAN3_BINDING): generate-mpi-man3-bindings.py
$(SENTINEL_OMPI_MAN3_BINDING): mpi-standard-apis.json
$(OMPI_V_GEN) $(PYTHON3) $(srcdir)/generate-mpi-man3-bindings.py \
--srcdir $(srcdir) --builddir $(builddir)

$(ALL_MAN_BUILT): $(builddir)/prrte-rst-content
$(ALL_MAN_BUILT): $(builddir)/schizo-ompi-rst-content/schizo-ompi-cli.rstxt
$(ALL_MAN_BUILT): $(RST_SOURCE_FILES) $(IMAGE_SOURCE_FILES)
$(ALL_MAN_BUILT): $(TEXT_SOURCE_FILES) $(SPHINX_CONFIG)
$(ALL_MAN_BUILT): $(SENTINEL_OMPI_MAN3_BINDING)

# Render the RST source into both 1) full HTML docs and 2) nroff man
# pages.
Expand Down Expand Up @@ -1029,7 +1045,7 @@ $(ALL_MAN_BUILT): $(TEXT_SOURCE_FILES) $(SPHINX_CONFIG)
# not think of anything better to do.
#
# NOTE: This is a little gross in that for a VPATH build, we *always*
# copy from the source tree to the dest tree (if the target does not
# copy from the source tree to the build tree (if the target does not
# exist or any of the sources in the source tree -- thanks to
# make/VPATH handling -- have changed compared to the target).
# However, we're using "cp -p", so even though we're copying *all the
Expand All @@ -1039,6 +1055,7 @@ $(ALL_MAN_BUILT): $(TEXT_SOURCE_FILES) $(SPHINX_CONFIG)
# changed. We're going to overwrite any local changes in the build
# tree, but you shouldn't be editing the build tree, anyway. So --
# good enough.

$(ALL_MAN_BUILT):
$(OMPI_V_SPHINX_COPYRST) if test "$(srcdir)" != "$(builddir)"; then \
len=`echo "$(srcdir)/" | wc -c`; \
Expand Down
Loading