From 0fb0913cd45e936c8325193fa507a4e77487792a Mon Sep 17 00:00:00 2001 From: Rainer Keller Date: Sun, 8 May 2016 16:22:15 +0200 Subject: [PATCH 1/2] In case, we do not build Fortran, Fortran 2008 or CXX, the regexp in make_manpage.pl will delete all lines up to the next ".fi" -- which for functions that do not implement the corresponding interface as code will have all eliminated. Change to delete the man page's content up to the next section header ".SH" Also in case of make V=1, we'd like to see the command line, too. Amend OMPI_Affinity_str according to the other man-pages definitions. --- Makefile.ompi-rules | 6 +++--- ompi/mpi/man/make_manpage.pl | 6 +++--- ompi/mpiext/affinity/c/OMPI_Affinity_str.3in | 5 +++++ 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/Makefile.ompi-rules b/Makefile.ompi-rules index 118ee80843..5be33364a6 100644 --- a/Makefile.ompi-rules +++ b/Makefile.ompi-rules @@ -21,7 +21,7 @@ endif .1in.1: @ echo " BUILDING $@" - @ $(top_srcdir)/ompi/mpi/man/make_manpage.pl \ + $(AM_V_CC) $(top_srcdir)/ompi/mpi/man/make_manpage.pl \ --package-name='@PACKAGE_NAME@' \ --package-version='@PACKAGE_VERSION@' \ --ompi-date='@OMPI_RELEASE_DATE@' \ @@ -32,7 +32,7 @@ endif .3in.3: @ echo " BUILDING $@" - @ $(top_srcdir)/ompi/mpi/man/make_manpage.pl \ + $(AM_V_CC) $(top_srcdir)/ompi/mpi/man/make_manpage.pl \ --package-name='@PACKAGE_NAME@' \ --package-version='@PACKAGE_VERSION@' \ --ompi-date='@OMPI_RELEASE_DATE@' \ @@ -44,7 +44,7 @@ endif .7in.7: @ echo " BUILDING $@" - @ $(top_srcdir)/ompi/mpi/man/make_manpage.pl \ + $(AM_V_CC) $(top_srcdir)/ompi/mpi/man/make_manpage.pl \ --package-name='@PACKAGE_NAME@' \ --package-version='@PACKAGE_VERSION@' \ --ompi-date='@OMPI_RELEASE_DATE@' \ diff --git a/ompi/mpi/man/make_manpage.pl b/ompi/mpi/man/make_manpage.pl index c350a9c8ee..76988760b3 100755 --- a/ompi/mpi/man/make_manpage.pl +++ b/ompi/mpi/man/make_manpage.pl @@ -62,15 +62,15 @@ $file =~ s/#OPAL_DATE#/$opal_date/g; $file =~ s/#ORTE_DATE#/$orte_date/g; if ($cxx == 0) { - $file =~ s/\n\.SH C\+\+ Syntax.+?fi\n/\n/s; + $file =~ s/\n\.SH C\+\+ Syntax.+?\n\.SH/\n\.SH/s; } if ($fortran == 0) { - $file =~ s/\n\.SH Fortran Syntax.+?fi\n/\n/s; + $file =~ s/\n\.SH Fortran Syntax.+?\n\.SH/\n\.SH/s; } if ($f08 == 0) { - $file =~ s/\n\.SH Fortran 2008 Syntax.+?fi\n/\n/s; + $file =~ s/\n\.SH Fortran 2008 Syntax.+?\n\.SH/\n\.SH/s; } open(FILE, ">$output") || diff --git a/ompi/mpiext/affinity/c/OMPI_Affinity_str.3in b/ompi/mpiext/affinity/c/OMPI_Affinity_str.3in index 1c4431729b..a9b0a8b165 100644 --- a/ompi/mpiext/affinity/c/OMPI_Affinity_str.3in +++ b/ompi/mpiext/affinity/c/OMPI_Affinity_str.3in @@ -1,6 +1,8 @@ +.\" -*- nroff -*- .\" Copyright 2007-2010 Oracle and/or its affiliates. All rights reserved. .\" Copyright (c) 1996 Thinking Machines Corporation .\" Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. +.\" $COPYRIGHT$ .TH OMPI_Affinity_str 3 "#OMPI_DATE#" "#PACKAGE_VERSION#" "#PACKAGE_NAME#" .SH NAME \fBOMPI_Affinity_str\fP \- Obtain prettyprint strings of processor affinity information for this process @@ -20,6 +22,9 @@ int OMPI_Affinity_str(ompi_affinity_fmt_type_t \fIfmt_type\fP, .SH Fortran Syntax There is no Fortran binding for this function. . +.SH Fortran 2008 Syntax +There is no Fortran 2008 binding for this function. +. .SH C++ Syntax There is no C++ binding for this function. . From d749cc0a087736b585653f37e4882a2ebb110c50 Mon Sep 17 00:00:00 2001 From: Rainer Keller Date: Tue, 17 May 2016 10:14:21 +0200 Subject: [PATCH 2/2] Incorporate @jsquyres suggestions about OMPI_V_GEN & echo'ing another line. --- Makefile.ompi-rules | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/Makefile.ompi-rules b/Makefile.ompi-rules index 5be33364a6..2a9cb2b7b5 100644 --- a/Makefile.ompi-rules +++ b/Makefile.ompi-rules @@ -20,8 +20,7 @@ if ! MAN_PAGE_BUILD_USEMPIF08_BINDINGS endif .1in.1: - @ echo " BUILDING $@" - $(AM_V_CC) $(top_srcdir)/ompi/mpi/man/make_manpage.pl \ + $(OMPI_V_GEN) $(top_srcdir)/ompi/mpi/man/make_manpage.pl \ --package-name='@PACKAGE_NAME@' \ --package-version='@PACKAGE_VERSION@' \ --ompi-date='@OMPI_RELEASE_DATE@' \ @@ -31,8 +30,7 @@ endif --output=$@ .3in.3: - @ echo " BUILDING $@" - $(AM_V_CC) $(top_srcdir)/ompi/mpi/man/make_manpage.pl \ + $(OMPI_V_GEN) $(top_srcdir)/ompi/mpi/man/make_manpage.pl \ --package-name='@PACKAGE_NAME@' \ --package-version='@PACKAGE_VERSION@' \ --ompi-date='@OMPI_RELEASE_DATE@' \ @@ -43,8 +41,7 @@ endif --output=$@ .7in.7: - @ echo " BUILDING $@" - $(AM_V_CC) $(top_srcdir)/ompi/mpi/man/make_manpage.pl \ + $(OMPI_V_GEN) $(top_srcdir)/ompi/mpi/man/make_manpage.pl \ --package-name='@PACKAGE_NAME@' \ --package-version='@PACKAGE_VERSION@' \ --ompi-date='@OMPI_RELEASE_DATE@' \