doc/makefile
author Sandrine Ribeau <sandrine.ribeau@logilab.fr>
Wed, 12 Nov 2008 17:21:30 -0800
changeset 49 3d1f3e5246ff
parent 35 ef2bb51fbe5f
permissions -rw-r--r--
Improved first page. Added an introduction section to provide a practical and short overview of CubicWeb.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
     1
MKHTML=mkdoc
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
     2
MKHTMLOPTS=--doctype article --target html --stylesheet standard 
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
     3
SRC=.
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
     4
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
     5
TXTFILES:= $(wildcard *.txt)
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
     6
TARGET := $(TXTFILES:.txt=.html)
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
     7
35
ef2bb51fbe5f merged makefiles
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 0
diff changeset
     8
# You can set these sphinx variables from the command line.
ef2bb51fbe5f merged makefiles
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 0
diff changeset
     9
SPHINXOPTS    =
ef2bb51fbe5f merged makefiles
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 0
diff changeset
    10
SPHINXBUILD   = sphinx-build
ef2bb51fbe5f merged makefiles
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 0
diff changeset
    11
PAPER         =
ef2bb51fbe5f merged makefiles
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 0
diff changeset
    12
ef2bb51fbe5f merged makefiles
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 0
diff changeset
    13
# Internal variables for sphinx
ef2bb51fbe5f merged makefiles
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 0
diff changeset
    14
PAPEROPT_a4     = -D latex_paper_size=a4
ef2bb51fbe5f merged makefiles
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 0
diff changeset
    15
PAPEROPT_letter = -D latex_paper_size=letter
ef2bb51fbe5f merged makefiles
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 0
diff changeset
    16
ALLSPHINXOPTS   = -d build/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
ef2bb51fbe5f merged makefiles
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 0
diff changeset
    17
ef2bb51fbe5f merged makefiles
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 0
diff changeset
    18
ef2bb51fbe5f merged makefiles
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 0
diff changeset
    19
.PHONY: help clean html web pickle htmlhelp latex changes linkcheck
ef2bb51fbe5f merged makefiles
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 0
diff changeset
    20
ef2bb51fbe5f merged makefiles
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 0
diff changeset
    21
help:
ef2bb51fbe5f merged makefiles
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 0
diff changeset
    22
	@echo "Please use \`make <target>' where <target> is one of"
ef2bb51fbe5f merged makefiles
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 0
diff changeset
    23
	@echo "  all       to make standalone HTML files, developer manual and API doc"
ef2bb51fbe5f merged makefiles
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 0
diff changeset
    24
	@echo "  apidoc    to make API doc"
ef2bb51fbe5f merged makefiles
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 0
diff changeset
    25
	@echo "  html      to make standalone HTML files"
ef2bb51fbe5f merged makefiles
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 0
diff changeset
    26
	@echo "---  "	
ef2bb51fbe5f merged makefiles
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 0
diff changeset
    27
	@echo "  pickle    to make pickle files (usable by e.g. sphinx-web)"
ef2bb51fbe5f merged makefiles
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 0
diff changeset
    28
	@echo "  htmlhelp  to make HTML files and a HTML help project"
ef2bb51fbe5f merged makefiles
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 0
diff changeset
    29
	@echo "  latex     to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
ef2bb51fbe5f merged makefiles
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 0
diff changeset
    30
	@echo "  changes   to make an overview over all changed/added/deprecated items"
ef2bb51fbe5f merged makefiles
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 0
diff changeset
    31
	@echo "  linkcheck to check all external links for integrity"
ef2bb51fbe5f merged makefiles
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 0
diff changeset
    32
ef2bb51fbe5f merged makefiles
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 0
diff changeset
    33
clean:
ef2bb51fbe5f merged makefiles
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 0
diff changeset
    34
	rm -rf apidoc/
ef2bb51fbe5f merged makefiles
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 0
diff changeset
    35
	rm -f *.html
ef2bb51fbe5f merged makefiles
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 0
diff changeset
    36
	cd devmanual_fr && make	clean
ef2bb51fbe5f merged makefiles
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 0
diff changeset
    37
	-rm -rf build/*
ef2bb51fbe5f merged makefiles
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 0
diff changeset
    38
ef2bb51fbe5f merged makefiles
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 0
diff changeset
    39
all: ${TARGET} devmanual apidoc html
0
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    40
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    41
%.html: %.txt
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    42
	${MKHTML} ${MKHTMLOPTS} $<
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    43
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    44
devmanual:
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    45
	cd devmanual_fr && make	
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    46
#apydoc: 
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    47
#	epydoc --html -o epydoc/ -n ../server/*.py ../core/*.py ../common/*.py ../server/*/*.py ../modpython/*/*.py ../common/*/*.py
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    48
apidoc:
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    49
	epydoc --html -o apidoc -n "cubicweb" --exclude=setup --exclude=__pkginfo__ ../
35
ef2bb51fbe5f merged makefiles
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 0
diff changeset
    50
ef2bb51fbe5f merged makefiles
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 0
diff changeset
    51
# run sphinx ###
ef2bb51fbe5f merged makefiles
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 0
diff changeset
    52
html:
ef2bb51fbe5f merged makefiles
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 0
diff changeset
    53
	mkdir -p build/html build/doctrees
ef2bb51fbe5f merged makefiles
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 0
diff changeset
    54
	$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) build/html
ef2bb51fbe5f merged makefiles
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 0
diff changeset
    55
	@echo
ef2bb51fbe5f merged makefiles
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 0
diff changeset
    56
	@echo "Build finished. The HTML pages are in build/html."
ef2bb51fbe5f merged makefiles
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 0
diff changeset
    57
ef2bb51fbe5f merged makefiles
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 0
diff changeset
    58
pickle:
ef2bb51fbe5f merged makefiles
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 0
diff changeset
    59
	mkdir -p build/pickle build/doctrees
ef2bb51fbe5f merged makefiles
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 0
diff changeset
    60
	$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) build/pickle
ef2bb51fbe5f merged makefiles
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 0
diff changeset
    61
	@echo
ef2bb51fbe5f merged makefiles
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 0
diff changeset
    62
	@echo "Build finished; now you can process the pickle files or run"
ef2bb51fbe5f merged makefiles
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 0
diff changeset
    63
	@echo "  sphinx-web build/pickle"
ef2bb51fbe5f merged makefiles
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 0
diff changeset
    64
	@echo "to start the sphinx-web server."
ef2bb51fbe5f merged makefiles
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 0
diff changeset
    65
ef2bb51fbe5f merged makefiles
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 0
diff changeset
    66
web: pickle
ef2bb51fbe5f merged makefiles
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 0
diff changeset
    67
ef2bb51fbe5f merged makefiles
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 0
diff changeset
    68
htmlhelp:
ef2bb51fbe5f merged makefiles
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 0
diff changeset
    69
	mkdir -p build/htmlhelp build/doctrees
ef2bb51fbe5f merged makefiles
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 0
diff changeset
    70
	$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) build/htmlhelp
ef2bb51fbe5f merged makefiles
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 0
diff changeset
    71
	@echo
ef2bb51fbe5f merged makefiles
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 0
diff changeset
    72
	@echo "Build finished; now you can run HTML Help Workshop with the" \
ef2bb51fbe5f merged makefiles
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 0
diff changeset
    73
	      ".hhp project file in build/htmlhelp."
ef2bb51fbe5f merged makefiles
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 0
diff changeset
    74
ef2bb51fbe5f merged makefiles
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 0
diff changeset
    75
latex:
ef2bb51fbe5f merged makefiles
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 0
diff changeset
    76
	mkdir -p build/latex build/doctrees
ef2bb51fbe5f merged makefiles
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 0
diff changeset
    77
	$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) build/latex
ef2bb51fbe5f merged makefiles
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 0
diff changeset
    78
	@echo
ef2bb51fbe5f merged makefiles
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 0
diff changeset
    79
	@echo "Build finished; the LaTeX files are in build/latex."
ef2bb51fbe5f merged makefiles
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 0
diff changeset
    80
	@echo "Run \`make all-pdf' or \`make all-ps' in that directory to" \
ef2bb51fbe5f merged makefiles
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 0
diff changeset
    81
	      "run these through (pdf)latex."
ef2bb51fbe5f merged makefiles
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 0
diff changeset
    82
ef2bb51fbe5f merged makefiles
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 0
diff changeset
    83
changes:
ef2bb51fbe5f merged makefiles
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 0
diff changeset
    84
	mkdir -p build/changes build/doctrees
ef2bb51fbe5f merged makefiles
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 0
diff changeset
    85
	$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) build/changes
ef2bb51fbe5f merged makefiles
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 0
diff changeset
    86
	@echo
ef2bb51fbe5f merged makefiles
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 0
diff changeset
    87
	@echo "The overview file is in build/changes."
ef2bb51fbe5f merged makefiles
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 0
diff changeset
    88
ef2bb51fbe5f merged makefiles
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 0
diff changeset
    89
linkcheck:
ef2bb51fbe5f merged makefiles
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 0
diff changeset
    90
	mkdir -p build/linkcheck build/doctrees
ef2bb51fbe5f merged makefiles
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 0
diff changeset
    91
	$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) build/linkcheck
ef2bb51fbe5f merged makefiles
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 0
diff changeset
    92
	@echo
ef2bb51fbe5f merged makefiles
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 0
diff changeset
    93
	@echo "Link check complete; look for any errors in the above output " \
ef2bb51fbe5f merged makefiles
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 0
diff changeset
    94
	      "or in build/linkcheck/output.txt."