Skip to content

Commit a864450

Browse files
Simplify Makefile based on Sphinx 1.2+ capabilities.
1 parent e5b6370 commit a864450

File tree

1 file changed

+14
-60
lines changed

1 file changed

+14
-60
lines changed

doc/Makefile

+14-60
Original file line numberDiff line numberDiff line change
@@ -1,69 +1,23 @@
1-
# Makefile for Sphinx documentation
2-
#
1+
# Makefile to generate cx_Oracle documentation using Sphinx
32

4-
# You can set these variables from the command line.
53
SPHINXOPTS =
64
SPHINXBUILD = sphinx-build
7-
PAPER =
8-
BUILD_DIR = build
9-
10-
# Internal variables.
11-
PAPEROPT_a4 = -D latex_paper_size=a4
12-
PAPEROPT_letter = -D latex_paper_size=letter
13-
ALLSPHINXOPTS = -d $(BUILD_DIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) src
14-
15-
.PHONY: help clean html web htmlhelp latex changes linkcheck
16-
17-
help:
18-
@echo "Please use \`make <target>' where <target> is one of"
19-
@echo " html to make standalone HTML files"
20-
@echo " web to make files usable by Sphinx.web"
21-
@echo " htmlhelp to make HTML files and a HTML help project"
22-
@echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
23-
@echo " changes to make an overview over all changed/added/deprecated items"
24-
@echo " linkcheck to check all external links for integrity"
25-
26-
clean:
27-
-rm -rf $(BUILD_DIR)
5+
SOURCEDIR = src
6+
BUILDDIR = build
287

8+
.PHONY: html
299
html:
30-
mkdir -p $(BUILD_DIR)/doctrees
31-
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILD_DIR)/html
32-
@echo
33-
@echo "Build finished. The HTML pages are in $(BUILD_DIR)/html"
34-
35-
web:
36-
mkdir -p $(BUILD_DIR)/web $(BUILD_DIR)/doctrees
37-
$(SPHINXBUILD) -b web $(ALLSPHINXOPTS) $(BUILD_DIR)/web
38-
@echo
39-
@echo "Build finished; now you can run"
40-
@echo " python -m sphinx.web $(BUILD_DIR)/web"
41-
@echo "to start the server."
10+
@$(SPHINXBUILD) -M html $(SOURCEDIR) $(BUILDDIR) $(SPHINXOPTS)
4211

43-
htmlhelp:
44-
mkdir -p $(BUILD_DIR)/htmlhelp $(BUILD_DIR)/doctrees
45-
$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILD_DIR)/htmlhelp
46-
@echo
47-
@echo "Build finished; now you can run HTML Help Workshop with the" \
48-
".hhp project file in $(BUILD_DIR)/htmlhelp."
12+
.PHONY: epub
13+
epub:
14+
@$(SPHINXBUILD) -M epub $(SOURCEDIR) $(BUILDDIR) $(SPHINXOPTS)
4915

50-
latex:
51-
mkdir -p $(BUILD_DIR)/latex $(BUILD_DIR)/doctrees
52-
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILD_DIR)/latex
53-
@echo
54-
@echo "Build finished; the LaTeX files are in $(BUILD_DIR)/latex."
55-
@echo "Run \`make all-pdf' or \`make all-ps' in that directory to" \
56-
"run these through (pdf)latex."
16+
.PHONY: pdf
17+
pdf:
18+
@$(SPHINXBUILD) -M latexpdf $(SOURCEDIR) $(BUILDDIR) $(SPHINXOPTS)
5719

58-
changes:
59-
mkdir -p $(BUILD_DIR)/changes $(BUILD_DIR)/doctrees
60-
$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILD_DIR)/changes
61-
@echo
62-
@echo "The overview file is in $(BUILD_DIR)/changes."
20+
.PHONY: clean
21+
clean:
22+
rm -rf $(BUILDDIR)/*
6323

64-
linkcheck:
65-
mkdir -p $(BUILD_DIR)/linkcheck $(BUILD_DIR)/doctrees
66-
$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILD_DIR)/linkcheck
67-
@echo
68-
@echo "Link check complete; look for any errors in the above output " \
69-
"or in $(BUILD_DIR)/linkcheck/output.txt."

0 commit comments

Comments
 (0)