xen-vtx-unstable

annotate docs/Makefile @ 6774:4d899a738d59

merge?
author cl349@firebug.cl.cam.ac.uk
date Tue Sep 13 15:05:49 2005 +0000 (2005-09-13)
parents a01199a95070 89a842453d77
children e7c7196fa329 8ca0f98ba8e2
rev   line source
iap10@3490 1 #!/usr/bin/make -f
kaf24@857 2
iap10@3493 3 INSTALL = install
iap10@3493 4 INSTALL_DIR = $(INSTALL) -d -m0755
iap10@3490 5
iap10@3490 6 PS2PDF := ps2pdf
iap10@3490 7 DVIPS := dvips
iap10@3490 8 LATEX := latex
iap10@3490 9 FIG2DEV := fig2dev
iap10@3490 10 LATEX2HTML := latex2html
ewan@6765 11 DOXYGEN := doxygen
iap10@3490 12
kaf24@3537 13 pkgdocdir := /usr/share/doc/xen
iap10@3490 14
iap10@3490 15 DOC_TEX := $(wildcard src/*.tex)
iap10@3490 16 DOC_PS := $(patsubst src/%.tex,ps/%.ps,$(DOC_TEX))
iap10@3490 17 DOC_PDF := $(patsubst src/%.tex,pdf/%.pdf,$(DOC_TEX))
iap10@3490 18 DOC_HTML := $(patsubst src/%.tex,html/%/index.html,$(DOC_TEX))
kaf24@857 19
cl349@3972 20 GFX = $(patsubst %.fig, %.eps, $(wildcard figs/*.fig))
kaf24@857 21
ewan@6765 22 .PHONY: all build dev-docs python-dev-docs ps pdf html clean install
ewan@6765 23
doogie@4109 24 all: build
doogie@4109 25 build: ps pdf html
kaf24@2743 26 rm -f *.aux *.dvi *.bbl *.blg *.glo *.idx *.ilg *.log *.ind *.toc
kaf24@857 27
ewan@6765 28 dev-docs: python-dev-docs
ewan@6765 29
kaf24@2743 30 ps: $(DOC_PS)
kaf24@2743 31
kaf24@2743 32 pdf: $(DOC_PDF)
kaf24@2743 33
kaf24@4107 34 html:
kaf24@4107 35 @if which $(LATEX2HTML) 1>/dev/null 2>/dev/null; then \
kaf24@4107 36 $(MAKE) $(DOC_HTML); fi
kaf24@857 37
ewan@6765 38 python-dev-docs:
ewan@6765 39 mkdir -p api/tools/python
ewan@6765 40 @if which $(DOXYGEN) 1>/dev/null 2>/dev/null; then \
ewan@6765 41 echo "Running doxygen to generate Python tools APIs ... "; \
ewan@6765 42 $(DOXYGEN) Doxyfile; \
ewan@6765 43 $(MAKE) -C api/tools/python/latex ; fi
ewan@6765 44
kaf24@857 45 clean:
kaf24@2743 46 rm -rf .word_count *.aux *.dvi *.bbl *.blg *.glo *.idx *~
kaf24@2743 47 rm -rf *.ilg *.log *.ind *.toc *.bak core
kaf24@2743 48 rm -rf $(GFX) ps pdf html
ewan@6765 49 rm -rf api
kaf24@1139 50
kaf24@2743 51 install: all
iap10@3499 52 rm -rf $(DESTDIR)$(pkgdocdir)
iap10@3499 53 $(INSTALL_DIR) $(DESTDIR)$(pkgdocdir)
iap10@3499 54 cp -dR ps $(DESTDIR)$(pkgdocdir)
iap10@3499 55 cp -dR pdf $(DESTDIR)$(pkgdocdir)
kaf24@4107 56 [ ! -d html ] || cp -dR html $(DESTDIR)$(pkgdocdir)
kaf24@1139 57
kaf24@2743 58 pdf/%.pdf: ps/%.ps
iap10@3493 59 $(INSTALL_DIR) $(@D)
iap10@3490 60 $(PS2PDF) $< $@.new
iap10@3490 61 mv $@.new $@
kaf24@857 62
kaf24@2840 63 ps/%.ps: %.dvi
iap10@3493 64 $(INSTALL_DIR) $(@D)
iap10@3490 65 $(DVIPS) -Ppdf -G0 -o $@.new $<
iap10@3490 66 mv $@.new $@
kaf24@857 67
kaf24@2840 68 %.dvi: src/%.tex $(GFX)
iap10@3490 69 $(LATEX) $< >/dev/null
iap10@3490 70 if [ -e $*.toc ] ; then $(LATEX) $< >/dev/null ; fi
kaf24@857 71
kaf24@857 72 %.eps: %.fig
iap10@3490 73 $(FIG2DEV) -L eps $< $@
kaf24@857 74
kaf24@2743 75 html/%/index.html: src/%.tex
iap10@3493 76 $(INSTALL_DIR) $(@D)
iap10@3490 77 $(LATEX2HTML) -split 0 -show_section_numbers -toc_depth 3 -nonavigation \
iap10@3490 78 -numbered_footnotes -local_icons -noinfo -math -dir $(@D) \
kaf24@2910 79 $< 1>/dev/null 2>/dev/null