diff --git a/libcxx/docs/Makefile.sphinx b/libcxx/docs/Makefile.sphinx deleted file mode 100644 --- a/libcxx/docs/Makefile.sphinx +++ /dev/null @@ -1,37 +0,0 @@ -# Makefile for Sphinx documentation -# -# FIXME: This hack is only in place to allow the libcxx.llvm.org/docs builder -# to work with libcxx. This should be removed when that builder supports -# out-of-tree builds. - -# You can set these variables from the command line. -SPHINXOPTS = -n -W -v -SPHINXBUILD = sphinx-build -PAPER = -BUILDDIR = _build - -# Internal variables. -PAPEROPT_a4 = -D latex_paper_size=a4 -PAPEROPT_letter = -D latex_paper_size=letter -ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . -# the i18n builder cannot share the environment and doctrees with the others -I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . - -.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext default - -default: html - -help: - @echo "Please use \`make ' where is one of" - @echo " html to make standalone HTML files" - -clean: - -rm -rf $(BUILDDIR)/* - -html: - $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html - @echo - @# FIXME: Remove this `cp` once HTML->Sphinx transition is completed. - @# Kind of a hack, but HTML-formatted docs are on the way out anyway. - @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." - diff --git a/libcxx/docs/ReleaseNotes.rst b/libcxx/docs/ReleaseNotes.rst --- a/libcxx/docs/ReleaseNotes.rst +++ b/libcxx/docs/ReleaseNotes.rst @@ -1,6 +1,6 @@ -========================================= -Libc++ 14.0.0 (In-Progress) Release Notes -========================================= +================================================== +Libc++ |version| |ReleaseNotesTitle| +================================================== .. contents:: :local: @@ -8,17 +8,18 @@ Written by the `Libc++ Team `_ -.. warning:: +.. only:: PreRelease - These are in-progress notes for the upcoming libc++ 14 release. - Release notes for previous releases can be found on - `the Download Page `_. + .. warning:: + These are in-progress notes for the upcoming libc++ |version| release. + Release notes for previous releases can be found on + `the Download Page `_. Introduction ============ This document contains the release notes for the libc++ C++ Standard Library, -part of the LLVM Compiler Infrastructure, release 14.0.0. Here we describe the +part of the LLVM Compiler Infrastructure, release |version|. Here we describe the status of libc++ in some detail, including major improvements from the previous release and new feature work. For the general LLVM release notes, see `the LLVM documentation `_. All LLVM releases may @@ -32,8 +33,8 @@ the current one. To see the release notes for a specific release, please see the `releases page `_. -What's New in Libc++ 14.0.0? -============================ +What's New in Libc++ |version|? +=============================== New Features ------------ diff --git a/libcxx/docs/conf.py b/libcxx/docs/conf.py --- a/libcxx/docs/conf.py +++ b/libcxx/docs/conf.py @@ -43,15 +43,6 @@ project = u'libc++' 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 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 @@ -86,6 +77,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 --------------------------------------------------- diff --git a/llvm/cmake/modules/AddSphinxTarget.cmake b/llvm/cmake/modules/AddSphinxTarget.cmake --- a/llvm/cmake/modules/AddSphinxTarget.cmake +++ b/llvm/cmake/modules/AddSphinxTarget.cmake @@ -38,6 +38,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} @@ -45,6 +49,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