| 1 |
#
|
| 2 |
# Makefile for DDP documentation generated with xmlto etc
|
| 3 |
#
|
| 4 |
# (Repository HOWTO, How software producers can distribute software
|
| 5 |
# in .deb format, etc)
|
| 6 |
|
| 7 |
manual := $(notdir $(CURDIR))
|
| 8 |
|
| 9 |
# this can and will be overriden by a higher level makefile
|
| 10 |
PUBLISHDIR := /org/www.debian.org/www/doc/manuals
|
| 11 |
|
| 12 |
sources := $(manual).xml
|
| 13 |
|
| 14 |
all: html #pdf dvi ps # pdf, dvi and ps don't work (bug #223553 ??)
|
| 15 |
|
| 16 |
publish: all
|
| 17 |
test -d $(PUBLISHDIR)/$(manual) || install -d -m 755 $(PUBLISHDIR)/$(manual)
|
| 18 |
rm -f $(PUBLISHDIR)/$(manual)/*.html
|
| 19 |
install -p -m 644 $(manual).html $(PUBLISHDIR)/$(manual)
|
| 20 |
# install -p -m 644 $(manual).pdf $(PUBLISHDIR)/$(manual)
|
| 21 |
# install -p -m 644 $(manual).dvi $(PUBLISHDIR)/$(manual)
|
| 22 |
# install -p -m 644 $(manual).ps $(PUBLISHDIR)/$(manual)
|
| 23 |
|
| 24 |
validate:
|
| 25 |
xmllint --noout --loaddtd --catalogs $(sources)
|
| 26 |
|
| 27 |
html: $(manual).html
|
| 28 |
$(manual).html: $(sources)
|
| 29 |
xsltproc --catalogs -o $@ \
|
| 30 |
/usr/share/sgml/docbook/stylesheet/xsl/nwalsh/html/docbook.xsl \
|
| 31 |
$<
|
| 32 |
|
| 33 |
fo: $(manual).fo
|
| 34 |
$(manual).fo: $(sources)
|
| 35 |
xsltproc --catalogs -o $@ \
|
| 36 |
/usr/share/sgml/docbook/stylesheet/xsl/nwalsh/fo/docbook.xsl \
|
| 37 |
$<
|
| 38 |
|
| 39 |
dvi: $(manual).dvi
|
| 40 |
$(manual).dvi: $(manual).fo
|
| 41 |
# needs being run twice to generate toc
|
| 42 |
xmltex --interaction=batchmode $<
|
| 43 |
xmltex --interaction=batchmode $<
|
| 44 |
|
| 45 |
ps: $(manual).ps
|
| 46 |
$(manual).ps: $(manual).dvi
|
| 47 |
dvips $<
|
| 48 |
|
| 49 |
pdf: $(manual).pdf
|
| 50 |
$(manual).pdf: $(manual).fo
|
| 51 |
# needs being run twice to generate toc
|
| 52 |
# yes, this is suboptimal but it's the easiest way
|
| 53 |
pdfxmltex --interaction=batchmode $<
|
| 54 |
pdfxmltex --interaction=batchmode $<
|
| 55 |
|
| 56 |
clean distclean:
|
| 57 |
rm -f $(manual).aux $(manual).html $(manual).dvi $(manual).fo \
|
| 58 |
$(manual).log $(manual).pdf $(manual).ps $(manual).out $(manual).toc
|
| 59 |
rm -f *~ .*~ core tsa*
|
| 60 |
|
| 61 |
.PHONY: all publish clean distclean dvi fo html pdf ps validate
|