ia64/xen-unstable

view docs/Makefile @ 6191:430ce2bade9b

Trivial fixes for a couple of xenlinux compile warnings.

Signed-off-by: <andrew.warfield@cl.cam.ac.uk>
author akw27@arcadians.cl.cam.ac.uk
date Mon Aug 15 13:50:39 2005 +0000 (2005-08-15)
parents a01199a95070
children 89a842453d77 4d899a738d59 b35215021b32 8ca0f98ba8e2
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