@@ -152,7 +152,7 @@ htmlview: html
152
152
$(PYTHON ) -c " import os, webbrowser; webbrowser.open('file://' + os.path.realpath('build/html/index.html'))"
153
153
154
154
.PHONY : htmllive
155
- htmllive : SPHINXBUILD = $(VENVDIR ) /bin/ sphinx-autobuild
155
+ htmllive : SPHINXBUILD = PATH= $(VENVDIR ) /bin:$$PATH sphinx-autobuild
156
156
htmllive : SPHINXOPTS = --re-ignore="/venv/" --open-browser --delay 0
157
157
htmllive : _ensure-sphinx-autobuild html
158
158
@@ -182,13 +182,26 @@ venv:
182
182
echo " The venv has been created in the $( VENVDIR) directory" ; \
183
183
fi
184
184
185
+ .PHONY : dist-no-html
186
+ dist-no-html : dist-text dist-pdf dist-epub dist-texinfo
187
+
185
188
.PHONY : dist
186
189
dist :
187
190
rm -rf dist
188
191
mkdir -p dist
189
-
192
+ $(MAKE ) dist-html
193
+ $(MAKE ) dist-text
194
+ $(MAKE ) dist-pdf
195
+ $(MAKE ) dist-epub
196
+ $(MAKE ) dist-texinfo
197
+
198
+ .PHONY : dist-html
199
+ dist-html :
190
200
# archive the HTML
191
201
@echo " Building HTML..."
202
+ mkdir -p dist
203
+ rm -rf build/html
204
+ find dist -name ' python-$(DISTVERSION)-docs-html*' -exec rm -rf {} \;
192
205
$(MAKE ) html
193
206
cp -pPR build/html dist/python-$(DISTVERSION ) -docs-html
194
207
tar -C dist -cf dist/python-$(DISTVERSION ) -docs-html.tar python-$(DISTVERSION ) -docs-html
@@ -198,8 +211,13 @@ dist:
198
211
rm dist/python-$(DISTVERSION ) -docs-html.tar
199
212
@echo " Build finished and archived!"
200
213
214
+ .PHONY : dist-text
215
+ dist-text :
201
216
# archive the text build
202
217
@echo " Building text..."
218
+ mkdir -p dist
219
+ rm -rf build/text
220
+ find dist -name ' python-$(DISTVERSION)-docs-text*' -exec rm -rf {} \;
203
221
$(MAKE ) text
204
222
cp -pPR build/text dist/python-$(DISTVERSION ) -docs-text
205
223
tar -C dist -cf dist/python-$(DISTVERSION ) -docs-text.tar python-$(DISTVERSION ) -docs-text
@@ -209,9 +227,13 @@ dist:
209
227
rm dist/python-$(DISTVERSION ) -docs-text.tar
210
228
@echo " Build finished and archived!"
211
229
230
+ .PHONY : dist-pdf
231
+ dist-pdf :
212
232
# archive the A4 latex
213
233
@echo " Building LaTeX (A4 paper)..."
234
+ mkdir -p dist
214
235
rm -rf build/latex
236
+ find dist -name ' python-$(DISTVERSION)-docs-pdf*' -exec rm -rf {} \;
215
237
$(MAKE ) latex PAPER=a4
216
238
# remove zip & bz2 dependency on all-pdf,
217
239
# as otherwise the full latexmk process is run twice.
@@ -222,16 +244,24 @@ dist:
222
244
cp build/latex/docs-pdf.tar.bz2 dist/python-$(DISTVERSION ) -docs-pdf-a4.tar.bz2
223
245
@echo " Build finished and archived!"
224
246
247
+ .PHONY : dist-epub
248
+ dist-epub :
225
249
# copy the epub build
226
250
@echo " Building EPUB..."
251
+ mkdir -p dist
227
252
rm -rf build/epub
253
+ rm -f dist/python-$(DISTVERSION ) -docs.epub
228
254
$(MAKE ) epub
229
255
cp -pPR build/epub/Python.epub dist/python-$(DISTVERSION ) -docs.epub
230
256
@echo " Build finished and archived!"
231
257
258
+ .PHONY : dist-texinfo
259
+ dist-texinfo :
232
260
# archive the texinfo build
233
261
@echo " Building Texinfo..."
262
+ mkdir -p dist
234
263
rm -rf build/texinfo
264
+ find dist -name ' python-$(DISTVERSION)-docs-texinfo*' -exec rm -rf {} \;
235
265
$(MAKE ) texinfo
236
266
$(MAKE ) info --directory=build/texinfo
237
267
cp -pPR build/texinfo dist/python-$(DISTVERSION ) -docs-texinfo
0 commit comments