Files
xen/docs/Makefile
T
cl349@firebug.cl.cam.ac.uk 7554eb1321 bitkeeper revision 1.1159.258.18 (4226f857ltmzeYRsvtnlD8t5FVTvhw)
Remove support for tgif as a tool.  We don't use it and it's hard to find as
and rpm.
Signed-off-by: cl349@cl.cam.ac.uk
2005-03-03 11:43:19 +00:00

64 lines
1.4 KiB
Makefile

#!/usr/bin/make -f
INSTALL = install
INSTALL_DIR = $(INSTALL) -d -m0755
PS2PDF := ps2pdf
DVIPS := dvips
LATEX := latex
FIG2DEV := fig2dev
LATEX2HTML := latex2html
pkgdocdir := /usr/share/doc/xen
DOC_TEX := $(wildcard src/*.tex)
DOC_PS := $(patsubst src/%.tex,ps/%.ps,$(DOC_TEX))
DOC_PDF := $(patsubst src/%.tex,pdf/%.pdf,$(DOC_TEX))
DOC_HTML := $(patsubst src/%.tex,html/%/index.html,$(DOC_TEX))
GFX = $(patsubst %.fig, %.eps, $(wildcard figs/*.fig))
all: ps pdf html
rm -f *.aux *.dvi *.bbl *.blg *.glo *.idx *.ilg *.log *.ind *.toc
ps: $(DOC_PS)
pdf: $(DOC_PDF)
html: $(DOC_HTML)
clean:
rm -rf .word_count *.aux *.dvi *.bbl *.blg *.glo *.idx *~
rm -rf *.ilg *.log *.ind *.toc *.bak core
rm -rf $(GFX) ps pdf html
install: all
rm -rf $(DESTDIR)$(pkgdocdir)
$(INSTALL_DIR) $(DESTDIR)$(pkgdocdir)
cp -dR ps $(DESTDIR)$(pkgdocdir)
cp -dR pdf $(DESTDIR)$(pkgdocdir)
cp -dR html $(DESTDIR)$(pkgdocdir)
pdf/%.pdf: ps/%.ps
$(INSTALL_DIR) $(@D)
$(PS2PDF) $< $@.new
mv $@.new $@
ps/%.ps: %.dvi
$(INSTALL_DIR) $(@D)
$(DVIPS) -Ppdf -G0 -o $@.new $<
mv $@.new $@
%.dvi: src/%.tex $(GFX)
$(LATEX) $< >/dev/null
if [ -e $*.toc ] ; then $(LATEX) $< >/dev/null ; fi
%.eps: %.fig
$(FIG2DEV) -L eps $< $@
html/%/index.html: src/%.tex
$(INSTALL_DIR) $(@D)
$(LATEX2HTML) -split 0 -show_section_numbers -toc_depth 3 -nonavigation \
-numbered_footnotes -local_icons -noinfo -math -dir $(@D) \
$< 1>/dev/null 2>/dev/null