debuggers.hg

view docs/Makefile @ 3531:119c53bf0d16

bitkeeper revision 1.1159.223.20 (41f2c8174klQJ8mMgM3YDtJ6GQBXjw)

Missing prat of earlier patch.
Description: use INSTALL everywhere
Use install(by way of INSTALL variables) to create directories, install
programs, and install data files.

From: Adam Heath <doogie@brainfood.com>
Signed-off-by: ian.pratt@cl.cam.ac.uk
author iap10@labyrinth.cl.cam.ac.uk
date Sat Jan 22 21:39:35 2005 +0000 (2005-01-22)
parents 519af10797e4
children 78b5439ce414
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 docdir = /usr/share/doc
15 pkgdocdir = $(docdir)/$(package)
17 DOC_TEX := $(wildcard src/*.tex)
18 DOC_PS := $(patsubst src/%.tex,ps/%.ps,$(DOC_TEX))
19 DOC_PDF := $(patsubst src/%.tex,pdf/%.pdf,$(DOC_TEX))
20 DOC_HTML := $(patsubst src/%.tex,html/%/index.html,$(DOC_TEX))
22 GFX = $(patsubst %.obj, %.eps, $(wildcard figs/*.obj))
23 GFX += $(patsubst %.fig, %.eps, $(wildcard figs/*.fig))
25 all: ps pdf html
26 rm -f *.aux *.dvi *.bbl *.blg *.glo *.idx *.ilg *.log *.ind *.toc
28 ps: $(DOC_PS)
30 pdf: $(DOC_PDF)
32 html: $(DOC_HTML)
34 clean:
35 rm -rf .word_count *.aux *.dvi *.bbl *.blg *.glo *.idx *~
36 rm -rf *.ilg *.log *.ind *.toc *.bak core
37 rm -rf $(GFX) ps pdf html
39 install: all
40 rm -rf $(prefix)$(pkgdocdir)
41 $(INSTALL_DIR) $(prefix)$(pkgdocdir)
42 cp -dR ps $(prefix)$(pkgdocdir)
43 cp -dR pdf $(prefix)$(pkgdocdir)
44 cp -dR html $(prefix)$(pkgdocdir)
46 pdf/%.pdf: ps/%.ps
47 $(INSTALL_DIR) $(@D)
48 $(PS2PDF) $< $@.new
49 mv $@.new $@
51 ps/%.ps: %.dvi
52 $(INSTALL_DIR) $(@D)
53 $(DVIPS) -Ppdf -G0 -o $@.new $<
54 mv $@.new $@
56 %.dvi: src/%.tex $(GFX)
57 $(LATEX) $< >/dev/null
58 if [ -e $*.toc ] ; then $(LATEX) $< >/dev/null ; fi
60 %.eps: %.fig
61 $(FIG2DEV) -L eps $< $@
63 %.eps: %.obj
64 $(TGIF) -print -color -eps $<
66 html/%/index.html: src/%.tex
67 $(INSTALL_DIR) $(@D)
68 $(LATEX2HTML) -split 0 -show_section_numbers -toc_depth 3 -nonavigation \
69 -numbered_footnotes -local_icons -noinfo -math -dir $(@D) \
70 $< 1>/dev/null 2>/dev/null