1 SRC_URL=http://www.wagner.pp.ru/~vitus/fiction
2 UPLOAD_URL=https://www.wagner.pp.ru/dav/vitus/fiction
3 all: Kate-the-Empress.pdf Kate-the-Empress.html Kate-the-Empress.epub Kate-the-Empress.fb2.zip
5 publish: Kate-the-Empress.pdf Kate-the-Empress.html Kate-the-Empress.epub Kate-the-Empress.fb2.zip
6 for i in $^; do curl -n -T $$i $(UPLOAD_URL)/$$i || exit 1;done
9 Kate-the-Empress.pdf: $(wildcard *.tex)
13 mv book.pdf Kate-the-Empress.pdf
15 Kate-the-Empress.html: onefile.tex
16 pandoc -t html --toc --standalone -o $@ $+
18 Kate-the-Empress.epub: onefile.tex epub-metadata.xml
19 cat epub-metadata.xml > metadata-tmp.xml
20 echo "<dc:date>`date +%Y-%m-%d`</dc:date>">> metadata-tmp.xml
21 pandoc -t epub --epub-metadata=metadata-tmp.xml --standalone -o $@ $+
23 Kate-the-Empress.fb2.zip: Kate-the-Empress.fb2
24 zip Kate-the-Empress.fb2.zip Kate-the-Empress.fb2
26 Kate-the-Empress.fb2: onefile.tex Tex2fb2 fb2meta.xml
27 ./Tex2fb2 fb2meta.xml onefile.tex >Kate-the-Empress.fb2
29 fb2lint: Kate-the-Empress.fb2 $(wildcard *.xsd)
30 xmllint --schema FictionBook2.1.xsd Kate-the-Empress.fb2 >/dev/null 2>$@
32 onefile.tex: joinfiles.awk $(wildcard *.tex)
33 awk -f joinfiles.awk book.tex > $@
36 rm -f onefile.tex book.log book.aux book.out book.toc Kate-the-Empress.fb2 fb2lint