| 11 |
|
|
| 12 |
sources := $(manual).xml |
sources := $(manual).xml |
| 13 |
|
|
| 14 |
all: html pdf # dvi ps # god damn dvi and ps don't work |
all: html #pdf dvi ps # pdf, dvi and ps don't work (bug #223553 ??) |
| 15 |
|
|
| 16 |
publish: all |
publish: all |
| 17 |
test -d $(PUBLISHDIR)/$(manual) || install -d -m 755 $(PUBLISHDIR)/$(manual) |
test -d $(PUBLISHDIR)/$(manual) || install -d -m 755 $(PUBLISHDIR)/$(manual) |
| 18 |
rm -f $(PUBLISHDIR)/$(manual)/*.html |
rm -f $(PUBLISHDIR)/$(manual)/*.html |
| 19 |
install -p -m 644 $(manual).html $(PUBLISHDIR)/$(manual) |
install -p -m 644 $(manual).html $(PUBLISHDIR)/$(manual) |
| 20 |
install -p -m 644 $(manual).pdf $(PUBLISHDIR)/$(manual) |
# install -p -m 644 $(manual).pdf $(PUBLISHDIR)/$(manual) |
| 21 |
install -p -m 644 $(manual).dvi $(PUBLISHDIR)/$(manual) |
# install -p -m 644 $(manual).dvi $(PUBLISHDIR)/$(manual) |
| 22 |
install -p -m 644 $(manual).ps $(PUBLISHDIR)/$(manual) |
# install -p -m 644 $(manual).ps $(PUBLISHDIR)/$(manual) |
| 23 |
|
|
| 24 |
validate: |
validate: |
| 25 |
xmllint --noout --loaddtd --catalogs $(sources) |
xmllint --noout --loaddtd --catalogs $(sources) |
| 26 |
|
|
| 27 |
html: $(manual).html |
html: $(manual).html |
| 28 |
$(manual).html: $(sources) |
$(manual).html: $(sources) |
| 29 |
xmlto html-nochunks $< |
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 |
dvi: $(manual).dvi |
| 40 |
$(manual).dvi: $(sources) |
$(manual).dvi: $(manual).fo |
| 41 |
xmlto dvi $< |
# needs being run twice to generate toc |
| 42 |
|
xmltex --interaction=batchmode $< |
| 43 |
|
xmltex --interaction=batchmode $< |
| 44 |
|
|
| 45 |
ps: $(manual).ps |
ps: $(manual).ps |
| 46 |
$(manual).ps: $(sources) |
$(manual).ps: $(manual).dvi |
| 47 |
xmlto ps $< |
dvips $< |
| 48 |
|
|
| 49 |
pdf: $(manual).pdf |
pdf: $(manual).pdf |
| 50 |
$(manual).pdf: $(sources) |
$(manual).pdf: $(manual).fo |
| 51 |
xmlto pdf $< |
# 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: |
clean distclean: |
| 57 |
rm -f $(manual).html $(manual).pdf |
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* |
rm -f *~ .*~ core tsa* |
| 60 |
|
|
| 61 |
.PHONY: all publish clean distclean validate |
.PHONY: all publish clean distclean dvi fo html pdf ps validate |