X-Git-Url: http://wagner.pp.ru/gitweb/?a=blobdiff_plain;f=Makefile;h=6d28215400984687e4c7e41b6c577d88952d986d;hb=e5bfea5f53b2ec72166bcd3dab3666d9e6c32c8c;hp=1ff488d7442014f2db9c99abf31a6c7b0881d83d;hpb=7e6e5d0bef82cbdd5e4a80a295179a33e929ca0e;p=fiction%2FKate-the-Empress.git diff --git a/Makefile b/Makefile index 1ff488d..6d28215 100644 --- a/Makefile +++ b/Makefile @@ -1,11 +1,28 @@ -all: Kate-the-Empress.pdf Kate-the-Empress.html +all: Kate-the-Empress.pdf Kate-the-Empress.html Kate-the-Empress.epub Kate-the-Empress.fb2.zip Kate-the-Empress.pdf: $(wildcard *.tex) + pdflatex book + pdflatex book pdflatex book mv book.pdf Kate-the-Empress.pdf -Kate-the-Empress.html: $(wildcard *.tex) - cp book.tex Kate-the-Empress.tex - latex2html -no_navigation -split=0 -no_subdir -prefix=Kate-the-Empress Kate-the-Empress.tex - sed -i.bak -e 's/ -- /\ \— /g' -e 's/ --$$/\ \—/' -e 's/^-- /\— /' Kate-the-Empress.html - rm Kate-the-Empress.tex +Kate-the-Empress.html: onefile.tex + pandoc -t html --toc --standalone -o $@ $+ + +Kate-the-Empress.epub: onefile.tex + pandoc -t epub --standalone -o $@ $+ + +Kate-the-Empress.fb2.zip: Kate-the-Empress.fb2 + zip Kate-the-Empress.fb2.zip Kate-the-Empress.fb2 + +Kate-the-Empress.fb2: onefile.tex Tex2fb2 fb2meta.xml + ./Tex2fb2 fb2meta.xml onefile.tex >Kate-the-Empress.fb2 + +fb2lint: Kate-the-Empress.fb2 $(wildcard *.xsd) + xmllint --schema FictionBook2.1.xsd Kate-the-Empress.fb2 >/dev/null 2>$@ + +onefile.tex: joinfiles.awk $(wildcard *.tex) + awk -f joinfiles.awk book.tex > $@ + +clean: + rm -f onefile.tex book.log book.aux book.out book.toc Kate-the-Empress.fb2 fb2lint