8000 [3.5] bpo-31036: use an existing Misc/NEWS rather than trying to use … · python/cpython@362e9fb · GitHub
[go: up one dir, main page]

Skip to content

Commit 362e9fb

Browse files
authored
[3.5] bpo-31036: use an existing Misc/NEWS rather than trying to use blurb (#2874) (#2926)
(cherry picked from commit 3de1448)
1 parent 2a5a26c commit 362e9fb

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

Doc/Makefile

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,19 @@ help:
4040

4141
build:
4242
-mkdir -p build
43-
$(BLURB) merge -f build/NEWS
43+
# Look first for a Misc/NEWS file (building from a source release tarball
44+
# or old repo) and use that, otherwise look for a Misc/NEWS.d directory
45+
# (building from a newer repo) and use blurb to generate the NEWS file.
46+
@if [ -f ../Misc/NEWS ] ; then \
47+
echo "Using existing Misc/NEWS file"; \
48+
cp ../Misc/NEWS build/NEWS; \
49+
elif [ -d ../Misc/NEWS.d ]; then \
50+
echo "Building NEWS from Misc/NEWS.d with blurb"; \
51+
$(BLURB) merge -f build/NEWS; \
52+
else \
53+
echo "Neither Misc/NEWS.d nor Misc/NEWS found; cannot build docs"; \
54+
exit 1; \
55+
fi
4456
$(SPHINXBUILD) $(ALLSPHINXOPTS)
4557
@echo
4658

0 commit comments

Comments
 (0)
0