revert-update-doc
authorLLVM Packaging Team <pkg-llvm-team@lists.alioth.debian.org>
Fri, 17 Feb 2023 11:57:29 +0000 (11:57 +0000)
committerGianfranco Costamagna <locutusofborg@debian.org>
Fri, 17 Feb 2023 11:57:29 +0000 (11:57 +0000)
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

Gbp-Pq: Name revert-update-doc.diff

clang-tools-extra/docs/conf.py
clang/docs/conf.py
lld/docs/conf.py
llvm/cmake/modules/AddSphinxTarget.cmake
llvm/docs/conf.py
polly/docs/conf.py

index ee5daa2d047c0afbd5b0f918c99d33c454cf637e..4467a7d63a5bbb5861dffed8f378cd5c02115af8 100644 (file)
@@ -44,6 +44,15 @@ master_doc = 'index'
 project = u'Extra Clang Tools'
 copyright = u'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 = '14'
+# The full version, including alpha/beta/rc tags.
+release = '14'
+
 # 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 4b1b889cf82d8f9af189a87491cfcbcf73d15708..e4499768ca8dab253f821e1032e97372dc25835a 100644 (file)
@@ -62,6 +62,15 @@ master_doc = 'index'
 project = u'Clang'
 copyright = u'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 = '14'
+# The full version, including alpha/beta/rc tags.
+release = '14'
+
 # The language for content autogenerated by Sphinx. Refer to documentation
 # for a list of supported languages.
 #language = None
@@ -96,11 +105,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 95befddf80ea35f769e7a8afc8ab174f15e23db8..8d0fec72caf8e6e796454c47450bb66c87ede638 100644 (file)
@@ -43,6 +43,15 @@ master_doc = 'index'
 project = u'lld'
 copyright = u'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 = '14'
+# The full version, including alpha/beta/rc tags.
+release = '14'
+
 # The language for content autogenerated by Sphinx. Refer to documentation
 # for a list of supported languages.
 #language = None
index bbc889c6b085087937ad115878660b562a48b7e6..5bd368b6d553636ce701e77f6e5ed62615c24fed 100644 (file)
@@ -39,10 +39,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}
@@ -50,9 +46,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
index 80aef2202bcd6bf9bacd7ec627df308af217b00c..2142e114380b54631cb34aac93b57fece32113b8 100644 (file)
@@ -61,6 +61,15 @@ master_doc = 'index'
 project = u'LLVM'
 copyright = u'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 = '14'
+# The full version, including alpha/beta/rc tags.
+release = '14'
+
 # The language for content autogenerated by Sphinx. Refer to documentation
 # for a list of supported languages.
 #language = None
index 44623f4fcd1a010a22f0ec880b26f5307c3b591d..7fdf11ce8e2e63a2b1f8980ea4d5ec2d4e5b161f 100644 (file)
@@ -44,6 +44,15 @@ master_doc = 'index'
 project = u'Polly'
 copyright = u'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 = '14.0'
+# The full version, including alpha/beta/rc tags.
+release = '14.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 ---------------------------------------------------