From: Ned Deily Date: Thu, 7 Sep 2017 02:17:08 +0000 (-0700) Subject: Ensure Doc build has Misc/NEWS for changelog X-Git-Tag: v3.3.7~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=63ca503d8ebfd5daf135b9e1b7b5964c7db43948;p=thirdparty%2FPython%2Fcpython.git Ensure Doc build has Misc/NEWS for changelog --- diff --git a/Doc/Makefile b/Doc/Makefile index 82f5bef0fab0..036c5bcf96fa 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 57e2dabffaa3..db72e07ea689 100644 --- a/Doc/whatsnew/changelog.rst +++ b/Doc/whatsnew/changelog.rst @@ -2,5 +2,5 @@ Changelog +++++++++ -.. miscnews:: ../../Misc/NEWS +.. miscnews:: ../build/NEWS