ia64/xen-unstable

view docs/Makefile @ 4146:f2d61710e4d9

bitkeeper revision 1.1236.25.24 (42366e9aQ71LQ8uCB-Y1IwVNqx5eqA)

Merge djm@kirby.fc.hp.com://home/djm/src/xen/xeno-unstable-ia64.bk
into sportsman.spdomain:/home/djm/xeno-unstable-ia64.bk
author djm@sportsman.spdomain
date Tue Mar 15 05:11:54 2005 +0000 (2005-03-15)
parents 508b288d20e2
children f234096eb41e
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 LATEX2HTML := latex2html
12 pkgdocdir := /usr/share/doc/xen
14 DOC_TEX := $(wildcard src/*.tex)
15 DOC_PS := $(patsubst src/%.tex,ps/%.ps,$(DOC_TEX))
16 DOC_PDF := $(patsubst src/%.tex,pdf/%.pdf,$(DOC_TEX))
17 DOC_HTML := $(patsubst src/%.tex,html/%/index.html,$(DOC_TEX))
19 GFX = $(patsubst %.fig, %.eps, $(wildcard figs/*.fig))
21 all: build
22 build: ps pdf html
23 rm -f *.aux *.dvi *.bbl *.blg *.glo *.idx *.ilg *.log *.ind *.toc
25 ps: $(DOC_PS)
27 pdf: $(DOC_PDF)
29 html:
30 @if which $(LATEX2HTML) 1>/dev/null 2>/dev/null; then \
31 $(MAKE) $(DOC_HTML); fi
33 clean:
34 rm -rf .word_count *.aux *.dvi *.bbl *.blg *.glo *.idx *~
35 rm -rf *.ilg *.log *.ind *.toc *.bak core
36 rm -rf $(GFX) ps pdf html
38 install: all
39 rm -rf $(DESTDIR)$(pkgdocdir)
40 $(INSTALL_DIR) $(DESTDIR)$(pkgdocdir)
41 cp -dR ps $(DESTDIR)$(pkgdocdir)
42 cp -dR pdf $(DESTDIR)$(pkgdocdir)
43 [ ! -d html ] || cp -dR html $(DESTDIR)$(pkgdocdir)
45 pdf/%.pdf: ps/%.ps
46 $(INSTALL_DIR) $(@D)
47 $(PS2PDF) $< $@.new
48 mv $@.new $@
50 ps/%.ps: %.dvi
51 $(INSTALL_DIR) $(@D)
52 $(DVIPS) -Ppdf -G0 -o $@.new $<
53 mv $@.new $@
55 %.dvi: src/%.tex $(GFX)
56 $(LATEX) $< >/dev/null
57 if [ -e $*.toc ] ; then $(LATEX) $< >/dev/null ; fi
59 %.eps: %.fig
60 $(FIG2DEV) -L eps $< $@
62 html/%/index.html: src/%.tex
63 $(INSTALL_DIR) $(@D)
64 $(LATEX2HTML) -split 0 -show_section_numbers -toc_depth 3 -nonavigation \
65 -numbered_footnotes -local_icons -noinfo -math -dir $(@D) \
66 $< 1>/dev/null 2>/dev/null