1 # Makefile for Iooclient
4 # You can set these variables from the command line.
6 SPHINXOPTS = -D version=$(VERSION) -D release=$(VERSION)
9 SPHINXBUILD = sphinx-build
21 PAPEROPT_a4 = -D latex_paper_size=a4
22 PAPEROPT_letter = -D latex_paper_size=letter
23 ALLSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS)
24 SPHINXFILES = $(DOCSDIR)/$(SRCDIR)/*
26 tag = $(shell git describe --abbrev=0)
27 ver = $(shell git describe --abbrev=0 | egrep -o '([0-9]+\.){1,10}[0-9]+' | sed -e 's/\./_/g')
28 name = $(shell basename $(shell pwd))
30 .PHONY: help html api dist distclean docclean install
33 @echo "Please use \`make <target>' where <target> is one of"
34 @echo " doc to make html and api doc"
35 @echo " dist to make distribution file"
36 @echo " docclean to clean up API and HTML docuentation"
37 @echo " distclean to clean docs, archive and installation build files"
38 @echo " html to make standalone sphinx HTML files"
39 @echo " api to make standalone epydoc API files"
40 @echo " install to install the IOOclient library"
44 git archive --format tar --prefix $(name)-$(ver)/ -o $(name)-$(ver).tar $(tag)
45 gzip -f $(name)-$(ver).tar
49 @echo "Removed $(BUILDDIR)"
53 @echo "Removed tar.gz (if any)"
54 @rm -rf $(BUILDDIR)/$(APIDIR)
55 @echo "Removed the API directory (if any)"
56 @rm -rf $(BUILDDIR)/$(HTMLDIR)
57 @echo "Removed the HTML directory (if any)"
58 @sudo rm -rf $(IOOBUILD)
59 @echo "Removed the $(IOOBUILD) directory (if any)"
61 doc: $(BUILDDIR)/api $(BUILDDIR)/html
64 @sudo python setup.py install
68 @mkdir -p $(BUILDDIR)/$(APIDIR)
69 $(EPYBUILD) -v -c $(DOCSDIR)/$(EPYCONF)/epydoc.conf --exclude migrations -o $(BUILDDIR)/$(APIDIR) $(IOODIR)
71 @echo "Build finished. The API pages are in $(BUILDDIR)/$(APIDIR)"
73 $(BUILDDIR)/html: $(SPHINXFILES)
75 @test -n "sphinx-build" || \
76 { echo 'sphinx-build' not found during configure; exit 1; }
77 sphinx-build -b html \
78 $(ALLSPHINXOPTS) -d $(BUILDDIR)/doctrees $(DOCSDIR)/$(SRCDIR) $(BUILDDIR)/html