]> www.wagner.pp.ru Git - fiction/Kate-the-Empress.git/blob - Makefile
Typo fixes
[fiction/Kate-the-Empress.git] / Makefile
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
4
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
7
8
9 Kate-the-Empress.pdf: $(wildcard *.tex)
10         pdflatex book
11         pdflatex book
12         pdflatex book
13         mv book.pdf Kate-the-Empress.pdf
14
15 Kate-the-Empress.html: onefile.tex
16         pandoc  -t html  --toc  --standalone -o $@ $+
17
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 $@ $+
22
23 Kate-the-Empress.fb2.zip: Kate-the-Empress.fb2
24         zip Kate-the-Empress.fb2.zip Kate-the-Empress.fb2
25
26 Kate-the-Empress.fb2: onefile.tex Tex2fb2 fb2meta.xml
27         ./Tex2fb2 fb2meta.xml onefile.tex >Kate-the-Empress.fb2
28
29 fb2lint: Kate-the-Empress.fb2 $(wildcard *.xsd)
30         xmllint --schema FictionBook2.1.xsd Kate-the-Empress.fb2 >/dev/null 2>$@
31
32 onefile.tex: joinfiles.awk $(wildcard *.tex)
33         awk -f joinfiles.awk book.tex |sed -e 's!<<!«!g' -e 's!>>!»!g' >  $@
34
35 clean:
36         rm -f onefile.tex book.log book.aux book.out book.toc Kate-the-Empress.fb2 fb2lint