From 4cc934cbc86de5bf877204b8663d626e7074e7eb Mon Sep 17 00:00:00 2001 From: Jeff Squyres Date: Thu, 18 Jul 2024 10:15:58 -0400 Subject: [PATCH 1/3] docs: Use html-local Makefile target This avoids an Automake warning about overriding its default "html" target. Signed-off-by: Jeff Squyres --- docs/Makefile.am | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/docs/Makefile.am b/docs/Makefile.am index 9083e02bb87..45ce1d02701 100644 --- a/docs/Makefile.am +++ b/docs/Makefile.am @@ -881,7 +881,14 @@ ALL_MAN_BUILT = \ # built HTML and man docs into a separate location that is included in # the tarball. This gives users a fully copy of the docs included in # distribution tarballs. -html: $(ALL_MAN_BUILT) +# +# Note: we name this "html-local" because otherwise Automake issues a +# warning about us overriding its default "html" target. In our +# particular use case, the rules generated if we name this target +# "html-local" instead of "html" are effectively equivalent to when we +# name this target "html", so we might as well avoid the Automake +# warning. +html-local: $(ALL_MAN_BUILT) $(OMPI_V_COPYALL) rm -rf html; cp -rp $(OUTDIR)/html . man: $(ALL_MAN_BUILT) From 11ff7f07ce1c885d2bdd7c52fe90bb51cf679892 Mon Sep 17 00:00:00 2001 From: Jeff Squyres Date: Thu, 18 Jul 2024 10:16:38 -0400 Subject: [PATCH 2/3] docs/conf.py: whitespace fixes No code or logic changes. Signed-off-by: Jeff Squyres --- docs/conf.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 66ab08d75df..be4127ceb52 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -37,10 +37,10 @@ def read_version_file(path): if not os.path.exists(path): print(f"ERROR: Unable to find file {path}") exit(1) - + with open(path) as fp: version_lines = fp.readlines() - + data = dict() for line in version_lines: if '#' in line: From db7ff49ca05eb876f750fe55debdfc35e5e28241 Mon Sep 17 00:00:00 2001 From: Jeff Squyres Date: Thu, 18 Jul 2024 10:16:51 -0400 Subject: [PATCH 3/3] docs/conf.py: updates per RTD docs RTD is rolling out some changes. Per https://about.readthedocs.com/blog/2024/07/addons-by-default/, these are the changes we need to make. Signed-off-by: Jeff Squyres --- docs/conf.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docs/conf.py b/docs/conf.py index be4127ceb52..87c2d696ada 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -129,6 +129,15 @@ def get_tarball_version(path, expr): if key in os.environ and os.environ[key] == 'True': print("OMPI: found ReadTheDocs build environment") + # Tell Jinja2 templates the build is running on Read the Docs + if "html_context" not in globals(): + html_context = {} + html_context["READTHEDOCS"] = True + + # Define the canonical URL if you are using a custom domain on + # Read the Docs + html_baseurl = os.environ.get("READTHEDOCS_CANONICAL_URL", "") + rtd_v = os.environ['READTHEDOCS_VERSION'] if os.environ['READTHEDOCS_VERSION_TYPE'] == 'external': # Make "release" be shorter than the full "ompi_ver" value.