make externally defined python, gs, latex programs optionally available in all Makefiles
[PyX/mjg.git] / manual / Makefile
blob372e733681547e0e2ca8508bc8bc74903202fa17
1 # You need mkhowto from the python distribution for creating this manual.
2 # Get a copy of a current python source archive and make a symbolic link
3 # from <whatever>/Python-x.x.x/Doc/tools/mkhowto into this directory.
4 # Furthermore you need tex, latex2html and a few other things to build
5 # the manual (see the python documentation about creating documentations
6 # for details).
8 PYTHON ?= python
10 default: dvi
12 clean:
13 -rm -fr manual.dvi *.eps *.pdf *.aux *.out *.toc *.log manual
15 all:
16 make clean
17 make html
18 make pdf
19 make dvi
21 src=$(wildcard *.tex) pyxversion.tex pyxdate.tex
23 dvi: manual.dvi
24 pdf: manual.pdf
25 html: manual/manual.html
27 manual.pdf: $(src) pdf_figs
28 #for index-with-own-hyperrefs debugging, anybody interested?
29 #./mkhowto --a4 --pdf --keep manual.tex
30 ./mkhowto --a4 --pdf manual.tex
32 manual.dvi: $(src) eps_figs
33 ./mkhowto --a4 --dvi manual.tex
35 manual/manual.html: $(src) eps_figs
36 ./mkhowto --image-type png --favicon "/pyx.ico" \
37 --up-link "/" --up-title "PyX homepage" \
38 --html manual.tex
40 pyxversion.tex: ../pyx/version.py
41 $(PYTHON) -c "import sys;sys.path[:0]=[\"..\"];import pyx.version;print pyx.version.version+'%'" > pyxversion.tex
43 pyxdate.tex: ../pyx/version.py
44 $(PYTHON) -c "import sys;sys.path[:0]=[\"..\"];import pyx.version;print pyx.version.date+'%'" > pyxdate.tex
46 eps_figs: $(patsubst %.py, %.eps, $(wildcard *.py))
48 pdf_figs: $(patsubst %.py, %.pdf, $(wildcard *.py))
50 %.eps: %.py
51 export PYTHONPATH=$(CURDIR)/.. ; $(PYTHON) $^
53 %.pdf: %.py
54 export PYTHONPATH=$(CURDIR)/.. ; $(PYTHON) $^