LANGS = de es nb nl pl
-all: pdf
+all: pdf epub
distclean: clean
rm -f $(SOURCE).md
pdflatex $^
pdflatex $^
+epub: $(SOURCE).epub
+%.epub: %.xml
+ dbtoepub $^
+
%.tex: %.xml
dblatex -t tex -b xetex $^
perl -p -i -e 's/\[latin1\]\{inputenc\}/[utf8]{inputenc}\n\\usepackage[$(TEXLANG)]{babel}/; \