1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178
|
commit e80c52986e1bb3afa6a92c58b1cb897877923a66
Author: Tom Stellard <tstellar@redhat.com>
Date: Tue Feb 1 23:13:01 2022 -0800
[docs] Remove hard-coded version numbers from sphinx configs
This updates all the non-runtime project release notes to use the
version number from CMake instead of the hard-coded version numbers
in conf.py.
It also hides warnings about pre-releases when the git suffix
is dropped from the LLVM version in CMake.
Reviewed By: MaskRay
Differential Revision: https://reviews.llvm.org/D112181
Index: llvm-toolchain-18_18.1.2/clang-tools-extra/docs/conf.py
===================================================================
--- llvm-toolchain-18_18.1.2.orig/clang-tools-extra/docs/conf.py
+++ llvm-toolchain-18_18.1.2/clang-tools-extra/docs/conf.py
@@ -44,6 +44,15 @@ master_doc = "index"
project = "Extra Clang Tools"
copyright = "2007-%d, The Clang Team" % date.today().year
+# The version info for the project you're documenting, acts as replacement for
+# |version| and |release|, also used in various other places throughout the
+# built documents.
+#
+# The short version.
+version = '15'
+# The full version, including alpha/beta/rc tags.
+release = '15'
+
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
# language = None
@@ -78,11 +87,6 @@ pygments_style = "friendly"
# A list of ignored prefixes for module index sorting.
# modindex_common_prefix = []
-in_progress_title = "(In-Progress) " if tags.has("PreRelease") else ""
-
-rst_epilog = f"""
-.. |ReleaseNotesTitle| replace:: {in_progress_title} Release Notes
-"""
# -- Options for HTML output ---------------------------------------------------
Index: llvm-toolchain-18_18.1.2/clang/docs/conf.py
===================================================================
--- llvm-toolchain-18_18.1.2.orig/clang/docs/conf.py
+++ llvm-toolchain-18_18.1.2/clang/docs/conf.py
@@ -48,6 +48,15 @@ master_doc = "index"
project = "Clang"
copyright = "2007-%d, The Clang Team" % date.today().year
+# The version info for the project you're documenting, acts as replacement for
+# |version| and |release|, also used in various other places throughout the
+# built documents.
+#
+# The short version.
+version = '15'
+# The full version, including alpha/beta/rc tags.
+release = '15'
+
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
# language = None
@@ -79,11 +88,6 @@ exclude_patterns = ["_build"]
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = "friendly"
-in_progress_title = "(In-Progress) " if tags.has("PreRelease") else ""
-
-rst_epilog = f"""
-.. |ReleaseNotesTitle| replace:: {in_progress_title} Release Notes
-"""
# -- Options for HTML output ---------------------------------------------------
Index: llvm-toolchain-18_18.1.2/lld/docs/conf.py
===================================================================
--- llvm-toolchain-18_18.1.2.orig/lld/docs/conf.py
+++ llvm-toolchain-18_18.1.2/lld/docs/conf.py
@@ -43,6 +43,15 @@ master_doc = "index"
project = "lld"
copyright = "2011-%d, LLVM Project" % date.today().year
+# The version info for the project you're documenting, acts as replacement for
+# |version| and |release|, also used in various other places throughout the
+# built documents.
+#
+# The short version.
+version = '15'
+# The full version, including alpha/beta/rc tags.
+release = '15'
+
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
# language = None
Index: llvm-toolchain-18_18.1.2/llvm/cmake/modules/AddSphinxTarget.cmake
===================================================================
--- llvm-toolchain-18_18.1.2.orig/llvm/cmake/modules/AddSphinxTarget.cmake
+++ llvm-toolchain-18_18.1.2/llvm/cmake/modules/AddSphinxTarget.cmake
@@ -39,10 +39,6 @@ function (add_sphinx_target builder proj
set(ARG_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
endif()
- if ("${LLVM_VERSION_SUFFIX}" STREQUAL "git")
- set(PreReleaseTag "-tPreRelease")
- endif()
-
add_custom_target(${SPHINX_TARGET_NAME}
COMMAND ${CMAKE_COMMAND} -E env ${ARG_ENV_VARS}
${SPHINX_EXECUTABLE}
@@ -50,9 +46,6 @@ function (add_sphinx_target builder proj
-d "${SPHINX_DOC_TREE_DIR}"
-q # Quiet: no output other than errors and warnings.
-t builder-${builder} # tag for builder
- -D version=${LLVM_VERSION_MAJOR}
- -D release=${PACKAGE_VERSION}
- ${PreReleaseTag}
${SPHINX_WARNINGS_AS_ERRORS_FLAG} # Treat warnings as errors if requested
"${ARG_SOURCE_DIR}" # Source
"${SPHINX_BUILD_DIR}" # Output
Index: llvm-toolchain-18_18.1.2/llvm/docs/conf.py
===================================================================
--- llvm-toolchain-18_18.1.2.orig/llvm/docs/conf.py
+++ llvm-toolchain-18_18.1.2/llvm/docs/conf.py
@@ -52,6 +52,15 @@ master_doc = "index"
project = "LLVM"
copyright = "2003-%d, LLVM Project" % date.today().year
+# The version info for the project you're documenting, acts as replacement for
+# |version| and |release|, also used in various other places throughout the
+# built documents.
+#
+# The short version.
+version = '15'
+# The full version, including alpha/beta/rc tags.
+release = '15'
+
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
# language = None
Index: llvm-toolchain-18_18.1.2/polly/docs/conf.py
===================================================================
--- llvm-toolchain-18_18.1.2.orig/polly/docs/conf.py
+++ llvm-toolchain-18_18.1.2/polly/docs/conf.py
@@ -44,6 +44,15 @@ master_doc = "index"
project = "Polly"
copyright = "2010-%d, The Polly Team" % date.today().year
+# The version info for the project you're documenting, acts as replacement for
+# |version| and |release|, also used in various other places throughout the
+# built documents.
+#
+# The short X.Y version.
+version = '15.0'
+# The full version, including alpha/beta/rc tags.
+release = '15.0'
+
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
# language = None
@@ -78,11 +87,6 @@ pygments_style = "friendly"
# A list of ignored prefixes for module index sorting.
# modindex_common_prefix = []
-in_progress_title = "(In-Progress) " if tags.has("PreRelease") else ""
-
-rst_epilog = f"""
-.. |ReleaseNotesTitle| replace:: {in_progress_title} Release Notes
-"""
# -- Options for HTML output ---------------------------------------------------
|