From: LLVM Packaging Team Date: Wed, 30 Oct 2024 20:56:13 +0000 (+0100) Subject: revert-update-doc X-Git-Tag: archive/raspbian/1%19.1.3-1+rpi1~16 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=3b80ed836211d619b24c4f33b21c32f9b3c2a80e;p=llvm-toolchain-19.git revert-update-doc commit e80c52986e1bb3afa6a92c58b1cb897877923a66 Author: Tom Stellard 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 Gbp-Pq: Name revert-update-doc.diff --- diff --git a/clang-tools-extra/docs/conf.py b/clang-tools-extra/docs/conf.py index 7279f7b547..901297ee00 100644 --- a/clang-tools-extra/docs/conf.py +++ b/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 --------------------------------------------------- diff --git a/clang/docs/conf.py b/clang/docs/conf.py index a734735a31..a33f967f85 100644 --- a/clang/docs/conf.py +++ b/clang/docs/conf.py @@ -57,6 +57,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 @@ -88,11 +97,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 --------------------------------------------------- diff --git a/lld/docs/conf.py b/lld/docs/conf.py index 6f411ed386..f4be590b86 100644 --- a/lld/docs/conf.py +++ b/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 diff --git a/llvm/cmake/modules/AddSphinxTarget.cmake b/llvm/cmake/modules/AddSphinxTarget.cmake index 9de169d729..961a1d77b4 100644 --- a/llvm/cmake/modules/AddSphinxTarget.cmake +++ b/llvm/cmake/modules/AddSphinxTarget.cmake @@ -40,10 +40,6 @@ function (add_sphinx_target builder project) 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} @@ -51,9 +47,6 @@ function (add_sphinx_target builder project) -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 diff --git a/llvm/docs/conf.py b/llvm/docs/conf.py index 7f2ed53096..cdb1d2321f 100644 --- a/llvm/docs/conf.py +++ b/llvm/docs/conf.py @@ -63,6 +63,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 diff --git a/polly/docs/conf.py b/polly/docs/conf.py index f587d28197..e5b11ba828 100644 --- a/polly/docs/conf.py +++ b/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 ---------------------------------------------------