blob: f7c5162f65890880992eefe33c456b987d1bfe53 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
|
## This file is part of dvisvgm
## Copyright (C) 2005-2018 Martin Gieseking <martin.gieseking@uos.de>
##
## Process this file with automake.
# Don't try to install the manpage file if it can't be built due to missing utilities.
# However, the distribution tarball should always contain a recent manpage. We ensure
# this by adding a dist-hook rule below.
if BUILD_MANPAGE
man_MANS = dvisvgm.1
endif
EXTRA_DIST = $(man_MANS) conf-dblatex-man.xsl conf-dblatex-pdf.xsl tweak-dblatex-pdf.xsl tweak-db-refentry.xsl
CONF_DBLATEX_MAN = $(top_srcdir)/doc/conf-dblatex-man.xsl
CONF_DBLATEX_PDF = $(top_srcdir)/doc/conf-dblatex-pdf.xsl
TWEAK_DBLATEX_PDF = $(top_srcdir)/doc/tweak-dblatex-pdf.xsl
TWEAK_DB_ARTICLE = $(top_srcdir)/doc/tweak-db-article.xsl
TWEAK_DB_REFENTRY = $(top_srcdir)/doc/tweak-db-refentry.xsl
DB_VARS = man.endnotes.list.enabled=0 man.endnotes.are.numbered=0 man.authors.section.enabled=0
dvisvgm.1: dvisvgm-man.xml $(CONF_DBLATEX_MAN)
xmlto -m $(CONF_DBLATEX_MAN) $(addprefix --stringparam , $(DB_VARS)) man $<
dvisvgm.pdf: dvisvgm-man.xml $(CONF_DBLATEX_PDF) $(TWEAK_DBLATEX_PDF)
mv $< $<.tmp
xsltproc -o $< $(TWEAK_DBLATEX_PDF) $<.tmp
dblatex -bxetex --texstyle=./dvisvgm.sty -p $(CONF_DBLATEX_PDF) $<
mv $<.tmp $<
mv $(basename $<).pdf $@
dvi-pdf: dvisvgm.dvi
dvipdfm $<
rm -f $<
dvisvgm.dvi: dvisvgm.1
groff -Tdvi -mandoc ./$< >$@
dvisvgm.html: dvisvgm-man.xml db2html.xsl
xsltproc -o $@ db2html.xsl $<
dvisvgm.epub: dvisvgm-article.xml
a2x -darticle -fepub -L --icons --icons-dir=. $<
mv $(basename $<).epub $@
dvisvgm-man.xml: dvisvgm.txt $(TWEAK_DB_REFENTRY)
asciidoc -a icons -a 'iconsdir=.' -a badges -a 'revnumber=@VERSION@' --unsafe -bdocbook -dmanpage -o $@.tmp $<
xsltproc -o $@ $(TWEAK_DB_REFENTRY) $@.tmp
rm $@.tmp
dvisvgm-article.xml: dvisvgm.txt
asciidoc -a icons -a 'iconsdir=.' -a badges -a 'revnumber=@VERSION@' --unsafe -bdocbook -darticle -o $@.tmp $<
xsltproc -o $@ $(TWEAK_DB_ARTICLE) $@.tmp
rm $@.tmp
sed -i "s/{VERSION}/@VERSION@/" $@
epub: dvisvgm.epub
html: dvisvgm.html
man: dvisvgm.1
pdf: dvisvgm.pdf
clean:
rm -f dvisvgm.pdf dvisvgm.html dvisvgm-man.xml dvisvgm-article.xml dvisvgm.txt dvisvgm.dvi dvisvgm.epub
distclean-local:
rm -f dvisvgm.pdf dvisvgm.html dvisvgm-man.xml dvisvgm-article.xml dvisvgm.txt dvisvgm.dvi dvisvgm.epub dvisvgm.1
# Ensure that distribution tarballs always contain a recent manpage, i.e.
# let "make dist" and "make distcheck" fail if dvisvgm.1 can't be built.
dist-hook:
@if test ! -f dvisvgm.1; then \
echo "----------------------------------------------------------------"; \
echo "manpage file dvisvgm.1 could not be built because one or more of"; \
echo "the following utilities are missing: asciidoc, xmlto, xsltproc "; \
echo "----------------------------------------------------------------"; \
false; \
fi
|