]> www.wagner.pp.ru Git - fiction/Kate-the-Empress.git/blob - Makefile
Merge branch 'master' of file:///work/git/fiction/Kate-the-Empress
[fiction/Kate-the-Empress.git] / Makefile
1 all: Kate-the-Empress.pdf Kate-the-Empress.html Kate-the-Empress.epub Kate-the-Empress.fb2.zip
2
3 Kate-the-Empress.pdf: $(wildcard *.tex)
4         pdflatex book
5         pdflatex book
6         pdflatex book
7         mv book.pdf Kate-the-Empress.pdf
8
9 Kate-the-Empress.html: onefile.tex
10         pandoc  -t html  --toc  --standalone -o $@ $+
11
12 Kate-the-Empress.epub: onefile.tex epub-metadata.xml
13         cat epub-metadata.xml > metadata-tmp.xml
14         echo "<dc:date>`date +%Y-%m-%d`</dc:date>">> metadata-tmp.xml
15         pandoc  -t epub --epub-metadata=metadata-tmp.xml --standalone -o $@ $+
16
17 Kate-the-Empress.fb2.zip: Kate-the-Empress.fb2
18         zip Kate-the-Empress.fb2.zip Kate-the-Empress.fb2
19
20 Kate-the-Empress.fb2: onefile.tex Tex2fb2 fb2meta.xml
21         ./Tex2fb2 fb2meta.xml onefile.tex >Kate-the-Empress.fb2
22
23 fb2lint: Kate-the-Empress.fb2 $(wildcard *.xsd)
24         xmllint --schema FictionBook2.1.xsd Kate-the-Empress.fb2 >/dev/null 2>$@
25
26 onefile.tex: joinfiles.awk $(wildcard *.tex)
27         awk -f joinfiles.awk book.tex >  $@
28
29 clean:
30         rm -f onefile.tex book.log book.aux book.out book.toc Kate-the-Empress.fb2 fb2lint