Revision 76fe50f0

b/Makefile
1
# Makefile for Iooclient
2
#
3

  
4
# You can set these variables from the command line.
5

  
6
IOODIR = iooclient
7
DOCSDIR = docs
8
SPHINXOPTS    =
9
SPHINXBUILD   = sphinx-build
10
EPYBUILD	  = epydoc
11
EPYCONF	  = source
12
APIDIR		  = api
13
HTMLDIR		  = html
14
PAPER         =
15
BUILDDIR      = $(DOCSDIR)/build
16
IOOBUILD 	  = build
17

  
18
# Internal variables.
19
PAPEROPT_a4     = -D latex_paper_size=a4
20
PAPEROPT_letter = -D latex_paper_size=letter
21
ALLSPHINXOPTS   = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source
22

  
23
tag = $(shell git describe --abbrev=0)
24
ver = $(shell git describe --abbrev=0 | egrep -o '([0-9]+\.){1,10}[0-9]+' | sed -e 's/\./_/g')
25
name   	   = $(shell basename $(shell pwd))
26

  
27
.PHONY: help html api dist distclean docclean install
28

  
29
help:
30
	@echo "Please use \`make <target>' where <target> is one of"
31
	@echo "  doc		to make html and api doc"
32
	@echo "  dist      	to make distribution file"
33
	@echo "  docclean	to clean up API and HTML docuentation"
34
	@echo "  distclean	to clean docs, archive and installation build files"
35
	@echo "  html      	to make standalone sphinx HTML files"
36
	@echo "  api      	to make standalone epydoc API files"
37
	@echo "  install	to install the IOOclient library"
38
	
39
	
40
dist:
41
	git archive --format tar --prefix $(name)-$(ver)/ -o $(name)-$(ver).tar $(tag)
42
	gzip -f $(name)-$(ver).tar
43

  
44
docclean:
45
	@rm -rf $(BUILDDIR)
46
	@echo "Removed $(BUILDDIR)"
47

  
48
distclean:
49
	@rm -f *tar.gz
50
	@echo "Removed tar.gz (if any)"
51
	@rm -rf $(BUILDDIR)/$(APIDIR)
52
	@echo "Removed the API directory (if any)"
53
	@rm -rf $(BUILDDIR)/$(HTMLDIR)
54
	@echo "Removed the HTML directory (if any)"
55
	@sudo rm -rf $(IOOBUILD)
56
	@echo "Removed the $(IOOBUILD) directory (if any)"
57
	
58
doc:
59
	html api
60

  
61
html:
62
	$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/$(HTMLDIR)
63
	@echo
64
	@echo "Build finished. The HTML pages are in $(BUILDDIR)/$(HTMLDIR)."
65

  
66
api:
67
	@mkdir -p $(BUILDDIR)/$(APIDIR)
68
	$(EPYBUILD) -v -c $(DOCSDIR)/$(EPYCONF)/epydoc.conf --exclude migrations -o $(BUILDDIR)/$(APIDIR) $(IOODIR)
69
	@echo
70
	@echo "Build finished. The API pages are in $(BUILDDIR)/$(APIDIR)"
71

  
72
install:
73
	@sudo python setup.py install
74

  
75

  
/dev/null
1
# Makefile for Sphinx documentation
2
#
3

  
4
# You can set these variables from the command line.
5
SPHINXOPTS    =
6
SPHINXBUILD   = sphinx-build
7
EPYBUILD	  = epydoc
8
EPYCONFLOC	  = source
9
APIDIR		  = api
10

  
11
PAPER         =
12
BUILDDIR      = build
13

  
14

  
15
# Internal variables.
16
PAPEROPT_a4     = -D latex_paper_size=a4
17
PAPEROPT_letter = -D latex_paper_size=letter
18
ALLSPHINXOPTS   = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source
19

  
20
.PHONY: help clean html dirhtml pickle json htmlhelp qthelp latex changes linkcheck doctest
21

  
22
help:
23
	@echo "Please use \`make <target>' where <target> is one of"
24
	@echo "  html      to make standalone sphinx HTML files"
25
	@echo "  api      to make standalone epydoc API files"
26
	
27
clean:
28
	-rm -rf $(BUILDDIR)/*
29

  
30
html:
31
	$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
32
	@echo
33
	@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
34

  
35
api:
36
	@mkdir -p $(BUILDDIR)/$(APIDIR)
37
	$(EPYBUILD) -v -c $(EPYCONFLOC)/epydoc.conf --exclude migrations -o $(BUILDDIR)/$(APIDIR) iooclient
38
	@echo
39
	@echo "Build finished. The API pages are in $(BUILDDIR)/$(APIDIR)"
40

  
41

  

Also available in: Unified diff