Skip to content

Commit d13b25d

Browse files
authored
Merge pull request #11004 from jsquyres/pr/conditionally-install-wrapper-compiler-man-pages
docs: conditionally install wrapper compiler man pages
2 parents 9dfebe1 + 6cdcea8 commit d13b25d

File tree

3 files changed

+54
-57
lines changed

3 files changed

+54
-57
lines changed

autogen.pl

Lines changed: 6 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,6 @@
4646
my @subdirs;
4747

4848
# Command line parameters
49-
my $no_ompi_arg = 0;
50-
my $no_orte_arg = 0;
51-
my $no_prrte_arg = 0;
52-
my $no_oshmem_arg = 0;
5349
my $no_3rdparty_arg = "";
5450
my $quiet_arg = 0;
5551
my $debug_arg = 0;
@@ -1297,11 +1293,7 @@ sub replace_config_sub_guess {
12971293

12981294
# Command line parameters
12991295

1300-
my $ok = Getopt::Long::GetOptions("no-ompi" => \$no_ompi_arg,
1301-
"no-orte" => \$no_orte_arg,
1302-
"no-prrte" => \$no_prrte_arg,
1303-
"no-oshmem" => \$no_oshmem_arg,
1304-
"no-3rdparty=s" => \$no_3rdparty_arg,
1296+
my $ok = Getopt::Long::GetOptions("no-3rdparty=s" => \$no_3rdparty_arg,
13051297
"quiet|q" => \$quiet_arg,
13061298
"debug|d" => \$debug_arg,
13071299
"help|h" => \$help_arg,
@@ -1316,10 +1308,6 @@ sub replace_config_sub_guess {
13161308
print "Invalid command line argument.\n\n"
13171309
if (!$ok);
13181310
print "Options:
1319-
--no-ompi | -no-ompi Do not build the Open MPI layer
1320-
--no-orte | -no-orte Do not build Open MPI's runtime support (alias for --no-prrte)
1321-
--no-prrte | -no-prrte Do not build Open MPI's runtime support
1322-
--no-oshmem | -no-oshmem Do not build the OSHMEM layer
13231311
--no-3rdparty <package> Do not build the listed 3rd-party package (comma separtated list)
13241312
--quiet | -q Do not display normal verbose output
13251313
--debug | -d Output lots of debug information
@@ -1344,24 +1332,6 @@ sub replace_config_sub_guess {
13441332
my $project_name_long = "Open MPI";
13451333
my $project_name_short = "openmpi";
13461334

1347-
if (! -e "ompi") {
1348-
$no_ompi_arg = 1;
1349-
debug "No ompi subdirectory found - will not build MPI layer\n";
1350-
}
1351-
if (! -e "oshmem") {
1352-
$no_oshmem_arg = 1;
1353-
debug "No oshmem subdirectory found - will not build OSHMEM\n";
1354-
}
1355-
# alias --no-orte to --no-prrte
1356-
if ($no_orte_arg == 1) {
1357-
$no_prrte_arg = 1;
1358-
}
1359-
1360-
if ($no_ompi_arg == 1) {
1361-
$project_name_long = "Open Portability Access Layer";
1362-
$project_name_short = "open-pal";
1363-
}
1364-
13651335
my_die "Invalid value for --jobs $automake_jobs. Must be greater than 0."
13661336
if (defined $automake_jobs && $automake_jobs <= 0);
13671337

@@ -1419,9 +1389,6 @@ sub replace_config_sub_guess {
14191389

14201390
my @enabled_3rdparty_packages = ();
14211391
my @disabled_3rdparty_packages = split(/,/, $no_3rdparty_arg);
1422-
if ($no_prrte_arg) {
1423-
push(@disabled_3rdparty_packages, "prrte");
1424-
}
14251392
# Alias: 'openpmix' -> 'pmix'
14261393
if (list_contains("openpmix", @disabled_3rdparty_packages)) {
14271394
push(@disabled_3rdparty_packages, "pmix");
@@ -1583,10 +1550,8 @@ sub replace_config_sub_guess {
15831550
# Top-level projects to examine
15841551
my $projects;
15851552
push(@{$projects}, { name => "opal", dir => "opal", need_base => 1 });
1586-
push(@{$projects}, { name => "ompi", dir => "ompi", need_base => 1 })
1587-
if (!$no_ompi_arg);
1588-
push(@{$projects}, { name => "oshmem", dir => "oshmem", need_base => 1 })
1589-
if (!$no_ompi_arg && !$no_oshmem_arg);
1553+
push(@{$projects}, { name => "ompi", dir => "ompi", need_base => 1 });
1554+
push(@{$projects}, { name => "oshmem", dir => "oshmem", need_base => 1 });
15901555

15911556
$m4 .= "dnl Separate m4 define for each project\n";
15921557
foreach my $p (@$projects) {
@@ -1694,11 +1659,9 @@ sub replace_config_sub_guess {
16941659
#---------------------------------------------------------------------------
16951660

16961661
# Find MPI extensions
1697-
if (!$no_ompi_arg) {
1698-
++$step;
1699-
verbose "\n$step. Searching for Open MPI extensions\n\n";
1700-
mpiext_run_global("ompi/mpiext");
1701-
}
1662+
++$step;
1663+
verbose "\n$step. Searching for Open MPI extensions\n\n";
1664+
mpiext_run_global("ompi/mpiext");
17021665

17031666
#---------------------------------------------------------------------------
17041667

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)