Skip to content

Commit e5af7ab

Browse files
committed
docs: conditionally install wrapper compiler man pages
Only install the C++, Fortran, and/or Java wrapper compiler pages if configure determines that we're actually building bindings for the corresponding language. Ensure to *always* include all the wrapper compiler pages in the tarball, though. Thanks to Orion Poplawski for identifying the problem and suggesting an initial fix. Signed-off-by: Jeff Squyres <jsquyres@cisco.com>
1 parent 1e2e97c commit e5af7ab

File tree

2 files changed

+48
-14
lines changed

2 files changed

+48
-14
lines changed

config/ompi_setup_mpi_fortran.m4

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -887,4 +887,9 @@ end type test_mpi_handle],
887887
AC_DEFINE_UNQUOTED(OMPI_BUILD_FORTRAN_BINDINGS,
888888
$OMPI_BUILD_FORTRAN_BINDINGS,
889889
[The level of fortran bindings to be built])
890+
891+
# This is an overall "are we building any Fortran MPI bindings"
892+
# conditional
893+
AM_CONDITIONAL([OMPI_BUILD_ANY_FORTRAN_BINDINGS],
894+
[test $OMPI_BUILD_FORTRAN_BINDINGS -gt 0])
890895
])

docs/Makefile.am

Lines changed: 43 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -796,29 +796,41 @@ EXTRA_DIST += \
796796
###########################################################################
797797

798798
# These files are not generated by Sphinx (they are redirects to
799-
# Sphinx-generated man pages).
800-
OMPI_MAN1_REDIRECTS = \
801-
man-openmpi/man1/mpicc.1 \
799+
# Sphinx-generated man pages) -- they exist directly in Git. We
800+
# *always* want these files to be in EXTRA_DIST (so that they're in
801+
# distribution tarballs). We'll decide later whether we install each
802+
# of these (e.g., if configure disabled the Java bindings, we won't
803+
# install mpijavac.1).
804+
OMPI_MAN1_C_REDIRECTS = man-openmpi/man1/mpicc.1
805+
OMPI_MAN1_CXX_REDIRECTS = \
802806
man-openmpi/man1/mpicxx.1 \
803-
man-openmpi/man1/mpic++.1 \
807+
man-openmpi/man1/mpic++.1
808+
OMPI_MAN1_FORTRAN_REDIRECTS = \
804809
man-openmpi/man1/mpifort.1 \
805810
man-openmpi/man1/mpif77.1 \
806-
man-openmpi/man1/mpif90.1 \
807-
man-openmpi/man1/mpijavac.1
811+
man-openmpi/man1/mpif90.1
812+
OMPI_MAN1_JAVA_REDIRECTS = man-openmpi/man1/mpijavac.1
808813

809-
OSHMEM_MAN1_REDIRECTS = \
814+
OSHMEM_MAN1_C_REDIRECTS = \
810815
man-openshmem/man1/oshcc.1 \
816+
man-openshmem/man1/shmemcc.1
817+
OSHMEM_MAN1_CXX_REDIRECTS = \
811818
man-openshmem/man1/oshcxx.1 \
812819
man-openshmem/man1/oshc++.1 \
813-
man-openshmem/man1/oshfort.1 \
814-
man-openshmem/man1/shmemcc.1 \
815820
man-openshmem/man1/shmemcxx.1 \
816-
man-openshmem/man1/shmemc++.1 \
821+
man-openshmem/man1/shmemc++.1
822+
OSHMEM_MAN1_FORTRAN_REDIRECTS = \
823+
man-openshmem/man1/oshfort.1 \
817824
man-openshmem/man1/shmemfort.1
818825

819826
EXTRA_DIST += \
820-
$(OMPI_MAN1_REDIRECTS) \
821-
$(OSHMEM_MAN1_REDIRECTS)
827+
$(OMPI_MAN1_C_REDIRECTS) \
828+
$(OMPI_MAN1_CXX_REDIRECTS) \
829+
$(OMPI_MAN1_FORTRAN_REDIRECTS) \
830+
$(OMPI_MAN1_JAVA_REDIRECTS) \
831+
$(OSHMEM_MAN1_C_REDIRECTS) \
832+
$(OSHMEM_MAN1_CXX_REDIRECTS) \
833+
$(OSHMEM_MAN1_FORTRAN_REDIRECTS)
822834

823835
###########################################################################
824836
if OPAL_BUILD_DOCS
@@ -877,15 +889,32 @@ if OPAL_INSTALL_DOCS
877889

878890
man1_MANS = \
879891
$(OMPI_MAN1_BUILT) \
880-
$(OMPI_MAN1_REDIRECTS)
892+
$(OMPI_MAN1_C_REDIRECTS)
893+
if OMPI_HAVE_CXX_COMPILER
894+
man1_MANS += $(OMPI_MAN1_CXX_REDIRECTS)
895+
endif
896+
if OMPI_BUILD_ANY_FORTRAN_BINDINGS
897+
man1_MANS += $(OMPI_MAN1_FORTRAN_REDIRECTS)
898+
endif
899+
if OMPI_WANT_JAVA_BINDINGS
900+
man1_MANS += $(OMPI_MAN1_JAVA_REDIRECTS)
901+
endif
881902

882903
man3_MANS = $(OMPI_MAN3_BUILT)
883904
man5_MANS = $(OMPI_MAN5_BUILT)
884905

885906
if PROJECT_OSHMEM
886907
man1_MANS += \
887908
$(OSHMEM_MAN1_BUILT) \
888-
$(OSHMEM_MAN1_REDIRECTS)
909+
$(OSHMEM_MAN1_C_REDIRECTS)
910+
# There is no OSHMEM equivalent of this conditional; just use the OMPI
911+
# conditional.
912+
if OMPI_HAVE_CXX_COMPILER
913+
man1_MANS += $(OSHMEM_MAN1_CXX_REDIRECTS)
914+
endif
915+
if OSHMEM_BUILD_FORTRAN_BINDINGS
916+
man1_MANS += $(OSHMEM_MAN1_FORTRAN_REDIRECTS)
917+
endif
889918

890919
man3_MANS += $(OSHMEM_MAN3_BUILT)
891920
endif

0 commit comments

Comments
 (0)