This revision was automatically updated to reflect the committed changes.
Closed by commit rGe80c52986e1b: [docs] Remove hard-coded version numbers from 
sphinx configs (authored by tstellar).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D112181/new/

https://reviews.llvm.org/D112181

Files:
  clang-tools-extra/docs/ReleaseNotes.rst
  clang-tools-extra/docs/conf.py
  clang/docs/ReleaseNotes.rst
  clang/docs/conf.py
  lld/docs/ReleaseNotes.rst
  lld/docs/conf.py
  llvm/cmake/modules/AddSphinxTarget.cmake
  llvm/docs/ReleaseNotes.rst
  llvm/docs/conf.py
  polly/docs/ReleaseNotes.rst
  polly/docs/conf.py

Index: polly/docs/conf.py
===================================================================
--- polly/docs/conf.py
+++ polly/docs/conf.py
@@ -44,15 +44,6 @@
 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-devel'
-# The full version, including alpha/beta/rc tags.
-release = '14.0-devel'
-
 # The language for content autogenerated by Sphinx. Refer to documentation
 # for a list of supported languages.
 #language = None
@@ -87,6 +78,11 @@
 # 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: polly/docs/ReleaseNotes.rst
===================================================================
--- polly/docs/ReleaseNotes.rst
+++ polly/docs/ReleaseNotes.rst
@@ -1,14 +1,15 @@
-=============================
-Release Notes 14.0 (upcoming)
-=============================
+===========================================
+Release Notes |release| |ReleaseNotesTitle|
+===========================================
 
-In Polly 14 the following important changes have been incorporated.
+In Polly |version| the following important changes have been incorporated.
 
-.. warning::
+.. only:: PreRelease
 
-  These release notes are for the next release of Polly and describe
-  the new features that have recently been committed to our development
-  branch.
+  .. warning::
+    These release notes are for the next release of Polly and describe
+    the new features that have recently been committed to our development
+    branch.
 
 - The command line option -polly-opt-fusion has been removed. What the
   flag does was frequently misunderstood and is rarely useful. However,
Index: llvm/docs/conf.py
===================================================================
--- llvm/docs/conf.py
+++ llvm/docs/conf.py
@@ -61,15 +61,6 @@
 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 = '13'
-# The full version, including alpha/beta/rc tags.
-release = '13'
-
 # The language for content autogenerated by Sphinx. Refer to documentation
 # for a list of supported languages.
 #language = None
Index: llvm/docs/ReleaseNotes.rst
===================================================================
--- llvm/docs/ReleaseNotes.rst
+++ llvm/docs/ReleaseNotes.rst
@@ -1,21 +1,23 @@
-=========================
-LLVM 14.0.0 Release Notes
-=========================
+============================
+LLVM |release| Release Notes
+============================
 
 .. contents::
     :local:
 
-.. warning::
-   These are in-progress notes for the upcoming LLVM 14 release.
-   Release notes for previous releases can be found on
-   `the Download Page <https://releases.llvm.org/download.html>`_.
+.. only:: PreRelease
+
+  .. warning::
+     These are in-progress notes for the upcoming LLVM |version| release.
+     Release notes for previous releases can be found on
+     `the Download Page <https://releases.llvm.org/download.html>`_.
 
 
 Introduction
 ============
 
 This document contains the release notes for the LLVM Compiler Infrastructure,
-release 14.0.0.  Here we describe the status of LLVM, including major improvements
+release |release|.  Here we describe the status of LLVM, including major improvements
 from the previous release, improvements in various subprojects of LLVM, and
 some of the current users of the code.  All LLVM releases may be downloaded
 from the `LLVM releases web site <https://llvm.org/releases/>`_.
Index: llvm/cmake/modules/AddSphinxTarget.cmake
===================================================================
--- llvm/cmake/modules/AddSphinxTarget.cmake
+++ llvm/cmake/modules/AddSphinxTarget.cmake
@@ -39,6 +39,10 @@
     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}
@@ -46,6 +50,9 @@
                             -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: lld/docs/conf.py
===================================================================
--- lld/docs/conf.py
+++ lld/docs/conf.py
@@ -43,15 +43,6 @@
 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: lld/docs/ReleaseNotes.rst
===================================================================
--- lld/docs/ReleaseNotes.rst
+++ lld/docs/ReleaseNotes.rst
@@ -1,19 +1,21 @@
-========================
-lld 14.0.0 Release Notes
-========================
+===========================
+lld |release| Release Notes
+===========================
 
 .. contents::
     :local:
 
-.. warning::
-   These are in-progress notes for the upcoming LLVM 14.0.0 release.
-   Release notes for previous releases can be found on
-   `the Download Page <https://releases.llvm.org/download.html>`_.
+.. only:: PreRelease
+
+  .. warning::
+     These are in-progress notes for the upcoming LLVM |release| release.
+     Release notes for previous releases can be found on
+     `the Download Page <https://releases.llvm.org/download.html>`_.
 
 Introduction
 ============
 
-This document contains the release notes for the lld linker, release 14.0.0.
+This document contains the release notes for the lld linker, release |release|.
 Here we describe the status of lld, including major improvements
 from the previous release. All lld releases may be downloaded
 from the `LLVM releases web site <https://llvm.org/releases/>`_.
Index: clang/docs/conf.py
===================================================================
--- clang/docs/conf.py
+++ clang/docs/conf.py
@@ -62,15 +62,6 @@
 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 = '13'
-# The full version, including alpha/beta/rc tags.
-release = '13'
-
 # The language for content autogenerated by Sphinx. Refer to documentation
 # for a list of supported languages.
 #language = None
@@ -105,6 +96,11 @@
 # 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: clang/docs/ReleaseNotes.rst
===================================================================
--- clang/docs/ReleaseNotes.rst
+++ clang/docs/ReleaseNotes.rst
@@ -1,6 +1,6 @@
-========================================
-Clang 14.0.0 (In-Progress) Release Notes
-========================================
+===========================================
+Clang |release| |ReleaseNotesTitle|
+===========================================
 
 .. contents::
    :local:
@@ -8,17 +8,18 @@
 
 Written by the `LLVM Team <https://llvm.org/>`_
 
-.. warning::
+.. only:: PreRelease
 
-   These are in-progress notes for the upcoming Clang 14 release.
-   Release notes for previous releases can be found on
-   `the Download Page <https://releases.llvm.org/download.html>`_.
+  .. warning::
+     These are in-progress notes for the upcoming Clang |version| release.
+     Release notes for previous releases can be found on
+     `the Download Page <https://releases.llvm.org/download.html>`_.
 
 Introduction
 ============
 
 This document contains the release notes for the Clang C/C++/Objective-C
-frontend, part of the LLVM Compiler Infrastructure, release 14.0.0. Here we
+frontend, part of the LLVM Compiler Infrastructure, release |release|. Here we
 describe the status of Clang in some detail, including major
 improvements from the previous release and new feature work. For the
 general LLVM release notes, see `the LLVM
@@ -35,8 +36,8 @@
 the current one. To see the release notes for a specific release, please
 see the `releases page <https://llvm.org/releases/>`_.
 
-What's New in Clang 14.0.0?
-===========================
+What's New in Clang |release|?
+==============================
 
 Some of the major new features and improvements to Clang are listed
 here. Generic improvements to Clang as a whole or to its underlying
Index: clang-tools-extra/docs/conf.py
===================================================================
--- clang-tools-extra/docs/conf.py
+++ clang-tools-extra/docs/conf.py
@@ -44,15 +44,6 @@
 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
@@ -87,6 +78,11 @@
 # 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: clang-tools-extra/docs/ReleaseNotes.rst
===================================================================
--- clang-tools-extra/docs/ReleaseNotes.rst
+++ clang-tools-extra/docs/ReleaseNotes.rst
@@ -1,5 +1,5 @@
 ====================================================
-Extra Clang Tools 14.0.0 (In-Progress) Release Notes
+Extra Clang Tools |release| |ReleaseNotesTitle|
 ====================================================
 
 .. contents::
@@ -8,17 +8,18 @@
 
 Written by the `LLVM Team <https://llvm.org/>`_
 
-.. warning::
+.. only:: PreRelease
 
-   These are in-progress notes for the upcoming Extra Clang Tools 14 release.
-   Release notes for previous releases can be found on
-   `the Download Page <https://releases.llvm.org/download.html>`_.
+  .. warning::
+     These are in-progress notes for the upcoming Extra Clang Tools |version| release.
+     Release notes for previous releases can be found on
+     `the Download Page <https://releases.llvm.org/download.html>`_.
 
 Introduction
 ============
 
 This document contains the release notes for the Extra Clang Tools, part of the
-Clang release 14.0.0. Here we describe the status of the Extra Clang Tools in
+Clang release |release|. Here we describe the status of the Extra Clang Tools in
 some detail, including major improvements from the previous release and new
 feature work. All LLVM releases may be downloaded from the `LLVM releases web
 site <https://llvm.org/releases/>`_.
@@ -32,8 +33,8 @@
 the current one. To see the release notes for a specific release, please
 see the `releases page <https://llvm.org/releases/>`_.
 
-What's New in Extra Clang Tools 14.0.0?
-=======================================
+What's New in Extra Clang Tools |release|?
+==========================================
 
 Some of the major new features and improvements to Extra Clang Tools are listed
 here. Generic improvements to Extra Clang Tools as a whole or to its underlying
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to