Statistics
| Branch: | Tag: | Revision:

root / Makefile @ 51ce199a

History | View | Annotate | Download (1.5 kB)

1
flowspytag = $(shell git describe --abbrev=0)
2
flowspyver = $(shell git describe --abbrev=0 | egrep -o '([0-9]+\.){1,10}[0-9]+' | sed -e 's/\./_/g')
3
name   	   = $(shell basename $(shell pwd))
4

    
5
# You can set these variables from the command line.
6
SPHINXOPTS    =
7
SPHINXBUILD   = sphinx-build
8
PAPER         =
9
BUILDDIR      = doc/build
10

    
11
# Internal variables.
12
PAPEROPT_a4     = -D latex_paper_size=a4
13
PAPEROPT_letter = -D latex_paper_size=letter
14
ALLSPHINXOPTS   = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) doc/source
15

    
16
.PHONY: help dist distclean docclean html latex text
17

    
18
help:
19
	@echo "Please use \`make <target>' where <target> is one of"
20
	@echo "  html      to make standalone HTML files"
21
	@echo "  latex     to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
22
	@echo "  text      to make standalone txt files"
23

    
24
dist: 
25
	git archive --format tar --prefix $(name)-$(flowspyver)/ -o $(name)-$(flowspyver).tar $(flowspytag)
26
	gzip -f $(name)-$(flowspyver).tar
27

    
28
distclean:
29
	@rm -f *tar.gz
30

    
31
docclean:
32
	-rm -rf $(BUILDDIR)/*
33

    
34
html:
35
	$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
36
	@echo
37
	@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
38

    
39
latex:
40
	$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
41
	@echo
42
	@echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
43
	@echo "Run \`make all-pdf' or \`make all-ps' in that directory to" \
44
	      "run these through (pdf)latex."
45

    
46
text:
47
	$(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
48
	@echo
49
	@echo "Done"	
50