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 \
 
  24         --xinclude data/html.xsl
 
  28 all: lint lint.nb epub pdf
 
  30 freeculture.nb.po: freeculture.pot
 
  31         po4a --no-translations --msgmerge-opt --no-location po4a.cfg
 
  33 freeculture.nb.xml: freeculture.nb.po freeculture.xml
 
  34         po4a --translate-only freeculture.nb.xml po4a.cfg 
 
  36 pdf: freeculture.nb.pdf freeculture.pdf
 
  37 epub: freeculture.nb.epub 
 
  38 html: freeculture.html freeculture.nb.html 
 
  41         $(DBLATEX) $^ --param=lingua=nb
 
  44         $(XP) $^ && mv index.html $@
 
  50         GET $(url) | gunzip > freeculture.xml
 
  52 freeculture.pot: freeculture.xml
 
  53         po4a-gettextize -f docbook -m $^  > $@.new && mv $@.new $@
 
  55 stats: update-stats progress.png
 
  58         printf "%s " $$(date +"%Y-%m-%dT%H%M") ; \
 
  59         msgfmt -o /dev/null --statistics freeculture.nb.po 2>&1 \
 
  61 progress.png: stats.txt progress.gnuplot
 
  62         awk '{print $$1, $$2, $$5, $$8}' < stats.txt > stats.csv
 
  63         gnuplot progress.gnuplot
 
  67         xmllint --nonet --noout --postvalid --xinclude freeculture.xml
 
  69 lint.nb: freeculture.nb.xml
 
  70         xmllint --nonet --noout --postvalid --xinclude freeculture.nb.xml