11#
22# Copyright (c) 2022 Cisco Systems, Inc. All rights reserved.
3- # Copyright (c) 2023-2024 Jeffrey M. Squyres. All rights reserved.
3+ # Copyright (c) 2023-2025 Jeffrey M. Squyres. All rights reserved.
44#
55# $COPYRIGHT$
66#
@@ -60,6 +60,8 @@ RST_SOURCE_FILES = \
6060EXTRA_DIST = \
6161 requirements.txt \
6262 no-prrte-content.rst.txt \
63+ generate-mpi-man3-bindings.py \
64+ mpi-standard-apis.json \
6365 html \
6466 man \
6567 $(SPHINX_CONFIG ) \
@@ -845,6 +847,10 @@ OMPI_MAN3_RST = $(OMPI_MAN3:%.3=man-openmpi/man3/%.3.rst)
845847OMPI_MAN3_BUILT = $(OMPI_MAN3:%.3=$(MAN_OUTDIR ) /%.3 )
846848OMPI_MAN3_INSTALL_FROM = $(OMPI_MAN3:%.3=$(MAN_INSTALL_FROM ) /%.3 )
847849
850+ # Use this one file as a sentinel for building all the Open MPI man
851+ # page API bindings files
852+ SENTINEL_OMPI_MAN3_BINDING = $(builddir ) /man-openmpi/man3/bindings/mpi_init.rst
853+
848854OMPI_MAN7_RST = $(OMPI_MAN7:%.7=man-openmpi/man7/%.7.rst )
849855OMPI_MAN7_BUILT = $(OMPI_MAN7:%.7=$(MAN_OUTDIR ) /%.7 )
850856OMPI_MAN7_INSTALL_FROM = $(OMPI_MAN7:%.7=$(MAN_INSTALL_FROM ) /%.7 )
@@ -923,7 +929,7 @@ man: $(ALL_MAN_BUILT)
923929# Remove the copies of the built HTML and man pages to get back to a
924930# clean git clone.
925931maintainer-clean-local :
926- rm -rf html man
932+ rm -rf html man man-openmpi/man3/bindings
927933
928934# If we're doing a VPATH build, we may have "html" and "man"
929935# directories in the build tree (e.g., if we did "make dist"). Remove
@@ -969,8 +975,8 @@ $(builddir)/schizo-ompi-rst-content:
969975$(builddir ) /prrte-rst-content :
970976 $(OMPI_V_MKDIR ) if test ! -d " $@ " ; then mkdir " $@ " ; fi
971977
972- # Get the schizo-ompi-rst- cli.rst file that we need. CAVEAT: we name
973- # it ".in " so that Sphinx doesn't slurp it in via two different
978+ # Get the schizo-ompi-cli.rst file that we need. CAVEAT: we name it
979+ # ".rstxt " so that Sphinx doesn't slurp it in via two different
974980# locations in the RST docroot (i.e., via
975981# /schizo-ompi-rst-content/schizo-ompi-cli.rstxt and via
976982# /man-openmpi/man1/mpirun.1.rst). Sphinx *shouldn't* do this -- it
@@ -1000,10 +1006,20 @@ $(builddir)/schizo-ompi-rst-content/schizo-ompi-cli.rstxt: $(srcdir)/no-prrte-co
10001006 cp -pf $(srcdir ) /no-prrte-content.rst.txt " $@ "
10011007endif
10021008
1009+ $(builddir ) /man-openmpi/man3/bindings :
1010+ $(OMPI_V_MKDIR ) if test ! -d " $@ " ; then mkdir -p " $@ " ; fi
1011+
1012+ $(SENTINEL_OMPI_MAN3_BINDING ) : $(builddir ) /man-openmpi/man3/bindings
1013+ $(SENTINEL_OMPI_MAN3_BINDING ) : generate-mpi-man3-bindings.py
1014+ $(SENTINEL_OMPI_MAN3_BINDING ) : mpi-standard-apis.json
1015+ $(OMPI_V_GEN ) $(PYTHON3 ) $(srcdir ) /generate-mpi-man3-bindings.py \
1016+ --srcdir $(srcdir ) --builddir $(builddir )
1017+
10031018$(ALL_MAN_BUILT ) : $(builddir ) /prrte-rst-content
10041019$(ALL_MAN_BUILT ) : $(builddir ) /schizo-ompi-rst-content/schizo-ompi-cli.rstxt
10051020$(ALL_MAN_BUILT ) : $(RST_SOURCE_FILES ) $(IMAGE_SOURCE_FILES )
10061021$(ALL_MAN_BUILT ) : $(TEXT_SOURCE_FILES ) $(SPHINX_CONFIG )
1022+ $(ALL_MAN_BUILT ) : $(SENTINEL_OMPI_MAN3_BINDING )
10071023
10081024# Render the RST source into both 1) full HTML docs and 2) nroff man
10091025# pages.
@@ -1031,7 +1047,7 @@ $(ALL_MAN_BUILT): $(TEXT_SOURCE_FILES) $(SPHINX_CONFIG)
10311047# not think of anything better to do.
10321048#
10331049# NOTE: This is a little gross in that for a VPATH build, we *always*
1034- # copy from the source tree to the dest tree (if the target does not
1050+ # copy from the source tree to the build tree (if the target does not
10351051# exist or any of the sources in the source tree -- thanks to
10361052# make/VPATH handling -- have changed compared to the target).
10371053# However, we're using "cp -p", so even though we're copying *all the
@@ -1041,6 +1057,7 @@ $(ALL_MAN_BUILT): $(TEXT_SOURCE_FILES) $(SPHINX_CONFIG)
10411057# changed. We're going to overwrite any local changes in the build
10421058# tree, but you shouldn't be editing the build tree, anyway. So --
10431059# good enough.
1060+
10441061$(ALL_MAN_BUILT ) :
10451062 $(OMPI_V_SPHINX_COPYRST ) if test " $( srcdir) " ! = " $( builddir) " ; then \
10461063 len=` echo " $( srcdir) /" | wc -c` ; \
0 commit comments