5 url = http://www.sslug.dk/~chlor/lessig/freeculture.sgml.2004-04-01.gz
8 # Valid book options are a4paper, a5paper, b5paper, letterpaper,
9 # legalpaper, landscape, 11pt, 12pt, oneside, twocolumn, notitlepage,
10 # titlepage, openany, draft, fleqn, leqno
12 -P latex.class.options=a5paper \
15 --xsl-user=data/user_param.xsl \
16 --xsl-user=data/xetex_param.xsl \
22 all: lint lint.nb html epub pdf
24 freeculture.nb.po: freeculture.pot
25 po4a --no-translations --msgmerge-opt --no-location po4a.cfg
27 freeculture.nb.xml: freeculture.nb.po freeculture.xml
28 po4a --translate-only freeculture.nb.xml po4a.cfg
30 pdf: freeculture.nb.pdf freeculture.pdf
31 epub: freeculture.nb.epub
32 html: freeculture.html freeculture.nb.html
35 # $(DBLATEX) $^ --param=lingua=nb
37 # Alternative processing path to dblatex is to use xmlto using fop to
38 # create PDF like this. The PDF output (visual design) is better, but
39 # the PDF index and footnote handling is worse.
40 xmlto --noautosize -m xmlto-pdf.xsl --with-fop pdf $^
43 xmlto html-nochunks $^
49 GET $(url) | gunzip > freeculture.xml
51 freeculture.pot: freeculture.xml
52 po4a-gettextize -f docbook -m $^ > $@.new && mv $@.new $@
54 stats: update-stats progress.png
57 printf "%s " $$(date +"%Y-%m-%dT%H%M") ; \
58 msgfmt -o /dev/null --statistics freeculture.nb.po 2>&1 \
60 progress.png: stats.txt progress.gnuplot
61 awk '{print $$1, $$2, $$5, $$8}' < stats.txt > stats.csv
62 gnuplot progress.gnuplot
65 # Have to disable --postvalid, when using xref with xrefstyle.
66 # See <URL: http://bugs.debian.org/682944 > for the bug report.
67 XMLLINTOPTS = --nonet --noout --xinclude --postvalid
69 xmllint $(XMLLINTOPTS) freeculture.xml
71 lint.nb: freeculture.nb.xml
72 xmllint $(XMLLINTOPTS) freeculture.nb.xml