Skip to content

Commit d7754d6

Browse files
author
Philip Langdale
committed
Python API: Add Makefile target to generate api docs.
We currently generate the epydocs from the publishing script, which means someone just looking at the repo doesn't know what command line to use. Let's add a Makefile rule to do the work. This work is based on: #15 (cherry picked from commit 6b402f8)
1 parent 8bf307e commit d7754d6

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

python/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
build/
22
dist/
3+
doc/
34
*.egg-info/
45
.git-hash
56

python/Makefile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,15 @@
1414
# See the License for the specific language governing permissions and
1515
# limitations under the License.
1616

17+
DOCDIR ?= doc
18+
1719
.PHONY: help
1820
help:
1921
@echo 'The build targets are:'
2022
@echo ' dist : Create a source distribution tarball'
23+
@echo ' test : Run unit tests'
24+
@echo ' doc : Generate epydoc format documentation'
25+
@echo ' clean : Clean up all generated files'
2126

2227
.PHONY: test
2328
test:
@@ -33,5 +38,10 @@ dist: test
3338
clean:
3439
rm -rf *.egg-info
3540
rm -rf dist
41+
rm -rf doc
3642
rm -rf build
3743
find . -name *.py[co] -exec rm -f {} \;
44+
45+
.PHONY: doc
46+
doc:
47+
epydoc -v --html -o $(DOCDIR) -n python-cm_api `find src -name "*.py"`

0 commit comments

Comments
 (0)