ia64/xen-unstable

view docs/Makefile @ 3528:5580df9a800b

bitkeeper revision 1.1159.223.36 (41f644c9famqz8rwdr0g7NzC9KVv3g)

Merge freefall.cl.cam.ac.uk:/auto/groups/xeno-xenod/BK/xen-2.0-testing.bk
into freefall.cl.cam.ac.uk:/auto/groups/xeno/users/iap10/xeno-clone/xen-2.0-testing.bk
author iap10@freefall.cl.cam.ac.uk
date Tue Jan 25 13:08:25 2005 +0000 (2005-01-25)
parents 78b5439ce414
children 074d7606fd61 5c6d547e4e59
line source
1 #!/usr/bin/make -f
3 INSTALL = install
4 INSTALL_DIR = $(INSTALL) -d -m0755
6 PS2PDF := ps2pdf
7 DVIPS := dvips
8 LATEX := latex
9 FIG2DEV := fig2dev
10 TGIF := tgif
11 LATEX2HTML := latex2html
13 package = xen
14 prefix = /usr
15 docdir = $(prefix)/share/doc
16 pkgdocdir = $(docdir)/$(package)
18 DOC_TEX := $(wildcard src/*.tex)
19 DOC_PS := $(patsubst src/%.tex,ps/%.ps,$(DOC_TEX))
20 DOC_PDF := $(patsubst src/%.tex,pdf/%.pdf,$(DOC_TEX))
21 DOC_HTML := $(patsubst src/%.tex,html/%/index.html,$(DOC_TEX))
23 GFX = $(patsubst %.obj, %.eps, $(wildcard figs/*.obj))
24 GFX += $(patsubst %.fig, %.eps, $(wildcard figs/*.fig))
26 all: ps pdf html
27 rm -f *.aux *.dvi *.bbl *.blg *.glo *.idx *.ilg *.log *.ind *.toc
29 ps: $(DOC_PS)
31 pdf: $(DOC_PDF)
33 html: $(DOC_HTML)
35 clean:
36 rm -rf .word_count *.aux *.dvi *.bbl *.blg *.glo *.idx *~
37 rm -rf *.ilg *.log *.ind *.toc *.bak core
38 rm -rf $(GFX) ps pdf html
40 install: all
41 rm -rf $(DESTDIR)$(pkgdocdir)
42 $(INSTALL_DIR) $(DESTDIR)$(pkgdocdir)
43 cp -dR ps $(DESTDIR)$(pkgdocdir)
44 cp -dR pdf $(DESTDIR)$(pkgdocdir)
45 cp -dR html $(DESTDIR)$(pkgdocdir)
47 pdf/%.pdf: ps/%.ps
48 $(INSTALL_DIR) $(@D)
49 $(PS2PDF) $< $@.new
50 mv $@.new $@
52 ps/%.ps: %.dvi
53 $(INSTALL_DIR) $(@D)
54 $(DVIPS) -Ppdf -G0 -o $@.new $<
55 mv $@.new $@
57 %.dvi: src/%.tex $(GFX)
58 $(LATEX) $< >/dev/null
59 if [ -e $*.toc ] ; then $(LATEX) $< >/dev/null ; fi
61 %.eps: %.fig
62 $(FIG2DEV) -L eps $< $@
64 %.eps: %.obj
65 $(TGIF) -print -color -eps $<
67 html/%/index.html: src/%.tex
68 $(INSTALL_DIR) $(@D)
69 $(LATEX2HTML) -split 0 -show_section_numbers -toc_depth 3 -nonavigation \
70 -numbered_footnotes -local_icons -noinfo -math -dir $(@D) \
71 $< 1>/dev/null 2>/dev/null