10000 Ensure Doc build has Misc/NEWS for changelog · stackless-dev/stackless@63ca503 · GitHub
[go: up one dir, main page]

Skip to content
This repository was archived by the owner on Feb 13, 2025. It is now read-only.

Commit 63ca503

Browse files
committed
Ensure Doc build has Misc/NEWS for changelog
1 parent 3b86b44 commit 63ca503

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

Doc/Makefile

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
# You can set these variables from the command line.
77
PYTHON = python
8+
BLURB = blurb
89
SVNROOT = http://svn.python.org/projects
910
SPHINXOPTS =
1011
PAPER =
@@ -60,6 +61,19 @@ update: clean checkout
6061

6162
build: checkout
6263
mkdir -p build/$(BUILDER) build/doctrees
64+
# Look first for a Misc/NEWS file (building from a source release tarball
65+
# or old repo) and use that, otherwise look for a Misc/NEWS.d directory
66+
# (building from a newer repo) and use blurb to generate the NEWS file.
67+
@if [ -f ../Misc/NEWS ] ; then \
68+
echo "Using existing Misc/NEWS file"; \
69+
cp ../Misc/NEWS build/NEWS; \
70+
elif [ -d ../Misc/NEWS.d ]; then \
71+
echo "Building NEWS from Misc/NEWS.d with blurb"; \
72+
$(BLURB) merge -f build/NEWS; \
73+
else \
74+
echo "Neither Misc/NEWS.d nor Misc/NEWS found; cannot build docs"; \
75+
exit 1; \
76+
fi
6377
$(PYTHON) tools/sphinx-build.py $(ALLSPHINXOPTS)
6478
@echo
6579

Doc/whatsnew/changelog.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
Changelog
33
+++++++++
44

5-
.. miscnews:: ../../Misc/NEWS
5+
.. miscnews:: ../build/NEWS
66

0 commit comments

Comments
 (0)
0