X-Git-Url: https://pere.pagekite.me/gitweb/text-epistlene.git/blobdiff_plain/9c6349b19044edc4d27e94736dfccf68a7f0d9e4..884f3b5532818e9d0cf57edfc79f8ff6d04d7902:/Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..d2f199c --- /dev/null +++ b/Makefile @@ -0,0 +1,28 @@ +SOURCE = gaysir_epistlene + +PANDOC_OPTS = \ + -t docbook4 + +DBLATEX_OPTS = \ + -p pdf.xsl + +all: $(SOURCE).pdf $(SOURCE).epub + +$(SOURCE).xml: $(SOURCE)-body.xml Makefile book.xml bookinfo.xml + xmllint --nonet --xinclude --postvalid book.xml > $@.new && \ + mv $@.new $@ + +$(SOURCE).pdf: $(SOURCE).xml Makefile pdf.xsl + dblatex $(DBLATEX_OPTS) $(SOURCE).xml -o $@ + +$(SOURCE)-body.xml: $(SOURCE).rst Makefile + pandoc -s -o $@ $(PANDOC_OPTS) $(SOURCE).rst + sed -i \ + -e 's%
%g' \ + -e 's%â%%g' $@ + +.xml.epub: + dbtoepub -s epub.xsl $^ -o $@ + +.SUFFIXES: .xml .html .pdf .epub