summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNed Deily <nad@python.org>2017-07-27 19:50:04 (GMT)
committerLarry Hastings <larry@hastings.org>2017-08-07 07:34:16 (GMT)
commitabe7b60b80f5cb23f84a49f95ef6ce23521eed14 (patch)
treebb9d4828edbc1916c4df0fc6ff8283318da5a58e
parent19b2890014d3098147d16475c492a47a43893768 (diff)
downloadcpython-abe7b60b80f5cb23f84a49f95ef6ce23521eed14.zip
cpython-abe7b60b80f5cb23f84a49f95ef6ce23521eed14.tar.gz
cpython-abe7b60b80f5cb23f84a49f95ef6ce23521eed14.tar.bz2
[3.5] bpo-31036: use an existing Misc/NEWS rather than trying to use blurb (#2874)
* bpo-31036: use an existing Misc/NEWS rather than trying to use blurb * bpo-31036: avoid echoing comments (cherry picked from commit 3de144890ad3bc50694368a1b33be6d7f3a780b3)
-rw-r--r--Doc/Makefile14
1 files changed, 13 insertions, 1 deletions
diff --git a/Doc/Makefile b/Doc/Makefile
index 5075b02..04da82f 100644
--- a/Doc/Makefile
+++ b/Doc/Makefile
@@ -40,7 +40,19 @@ help:
build:
-mkdir -p build
- $(BLURB) merge -f build/NEWS
+# 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
$(SPHINXBUILD) $(ALLSPHINXOPTS)
@echo