1
1
#
2
2
# 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.
4
4
#
5
5
# $COPYRIGHT$
6
6
#
@@ -60,6 +60,8 @@ RST_SOURCE_FILES = \
60
60
EXTRA_DIST = \
61
61
requirements.txt \
62
62
no-prrte-content.rst.txt \
63
+ generate-mpi-man3-bindings.py \
64
+ mpi-standard-apis.json \
63
65
html \
64
66
man \
65
67
$(SPHINX_CONFIG ) \
@@ -845,6 +847,10 @@ OMPI_MAN3_RST = $(OMPI_MAN3:%.3=man-openmpi/man3/%.3.rst)
845
847
OMPI_MAN3_BUILT = $(OMPI_MAN3:%.3=$(MAN_OUTDIR ) /%.3 )
846
848
OMPI_MAN3_INSTALL_FROM = $(OMPI_MAN3:%.3=$(MAN_INSTALL_FROM ) /%.3 )
847
849
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
+
848
854
OMPI_MAN7_RST = $(OMPI_MAN7:%.7=man-openmpi/man7/%.7.rst )
849
855
OMPI_MAN7_BUILT = $(OMPI_MAN7:%.7=$(MAN_OUTDIR ) /%.7 )
850
856
OMPI_MAN7_INSTALL_FROM = $(OMPI_MAN7:%.7=$(MAN_INSTALL_FROM ) /%.7 )
@@ -923,7 +929,7 @@ man: $(ALL_MAN_BUILT)
923
929
# Remove the copies of the built HTML and man pages to get back to a
924
930
# clean git clone.
925
931
maintainer-clean-local :
926
- rm -rf html man
932
+ rm -rf html man man-openmpi/man3/bindings
927
933
928
934
# If we're doing a VPATH build, we may have "html" and "man"
929
935
# directories in the build tree (e.g., if we did "make dist"). Remove
@@ -969,8 +975,8 @@ $(builddir)/schizo-ompi-rst-content:
969
975
$(builddir ) /prrte-rst-content :
970
976
$(OMPI_V_MKDIR ) if test ! -d " $@ " ; then mkdir " $@ " ; fi
971
977
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
974
980
# locations in the RST docroot (i.e., via
975
981
# /schizo-ompi-rst-content/schizo-ompi-cli.rstxt and via
976
982
# /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
1000
1006
cp -pf $(srcdir ) /no-prrte-content.rst.txt " $@ "
1001
1007
endif
1002
1008
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
+
1003
1018
$(ALL_MAN_BUILT ) : $(builddir ) /prrte-rst-content
1004
1019
$(ALL_MAN_BUILT ) : $(builddir ) /schizo-ompi-rst-content/schizo-ompi-cli.rstxt
1005
1020
$(ALL_MAN_BUILT ) : $(RST_SOURCE_FILES ) $(IMAGE_SOURCE_FILES )
1006
1021
$(ALL_MAN_BUILT ) : $(TEXT_SOURCE_FILES ) $(SPHINX_CONFIG )
1022
+ $(ALL_MAN_BUILT ) : $(SENTINEL_OMPI_MAN3_BINDING )
1007
1023
1008
1024
# Render the RST source into both 1) full HTML docs and 2) nroff man
1009
1025
# pages.
@@ -1031,7 +1047,7 @@ $(ALL_MAN_BUILT): $(TEXT_SOURCE_FILES) $(SPHINX_CONFIG)
1031
1047
# not think of anything better to do.
1032
1048
#
1033
1049
# 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
1035
1051
# exist or any of the sources in the source tree -- thanks to
1036
1052
# make/VPATH handling -- have changed compared to the target).
1037
1053
# 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)
1041
1057
# changed. We're going to overwrite any local changes in the build
1042
1058
# tree, but you shouldn't be editing the build tree, anyway. So --
1043
1059
# good enough.
1060
+
1044
1061
$(ALL_MAN_BUILT ) :
1045
1062
$(OMPI_V_SPHINX_COPYRST ) if test " $( srcdir) " ! = " $( builddir) " ; then \
1046
1063
len=` echo " $( srcdir) /" | wc -c` ; \
0 commit comments