From 63ca503d8ebfd5daf135b9e1b7b5964c7db43948 Mon Sep 17 00:00:00 2001 From: Ned Deily Date: Wed, 6 Sep 2017 19:17:08 -0700 Subject: Ensure Doc build has Misc/NEWS for changelog --- Doc/Makefile | 14 ++++++++++++++ Doc/whatsnew/changelog.rst | 2 +- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/Doc/Makefile b/Doc/Makefile index 82f5bef..036c5bc 100644 --- a/Doc/Makefile +++ b/Doc/Makefile @@ -5,6 +5,7 @@ # You can set these variables from the command line. PYTHON = python +BLURB = blurb SVNROOT = http://svn.python.org/projects SPHINXOPTS = PAPER = @@ -60,6 +61,19 @@ update: clean checkout build: checkout mkdir -p build/$(BUILDER) build/doctrees +# Look first for a Misc/NEWS file (building from a source release tarball +# or old repo) and use that, otherwise look for a Misc/NEWS.d directory +# (building from a newer repo) and use blurb to generate the NEWS file. + @if [ -f ../Misc/NEWS ] ; then \ + echo "Using existing Misc/NEWS file"; \ + cp ../Misc/NEWS build/NEWS; \ + elif [ -d ../Misc/NEWS.d ]; then \ + echo "Building NEWS from Misc/NEWS.d with blurb"; \ + $(BLURB) merge -f build/NEWS; \ + else \ + echo "Neither Misc/NEWS.d nor Misc/NEWS found; cannot build docs"; \ + exit 1; \ + fi $(PYTHON) tools/sphinx-build.py $(ALLSPHINXOPTS) @echo diff --git a/Doc/whatsnew/changelog.rst b/Doc/whatsnew/changelog.rst index 57e2dab..db72e07 100644 --- a/Doc/whatsnew/changelog.rst +++ b/Doc/whatsnew/changelog.rst @@ -2,5 +2,5 @@ Changelog +++++++++ -.. miscnews:: ../../Misc/NEWS +.. miscnews:: ../build/NEWS -- cgit v0.12