FN := trname FINAL = 0 EPUBFIX = META-INF css cover-logo.png cover.png TRNO = XX/201X RESTENC = ISO-8859-2 RXOPTS = --stringparam tr-number $(TRNO) XSLDIR = /Users/lhotka/Projects/techrep
.PHONY: all init pdf html rss epub tarball
all: pdf html rss epub
pdf: $(FN).pdf
html: index.html
rss: $(FN).rss
epub: $(FN).epub
- init:
- if [ ! -d META-INF ] ; then cp -r $(XSLDIR)/EPUB/* . ; fi
- tarball: $(FN).pdf index.html $(FN).rss $(FN).epub
- mkdir $(FN) cp $(shell xsltproc $(XSLDIR)/piclist.xsl $(FN).ctr) $^ $(FN) tar czvf $(FN).tar.gz $(FN) rm -rf $(FN)
- %.rxml: %.rxt
- rst2xml -i $(RESTENC) $< $@
- %.ctr: %.rxml
- xsltproc --novalid $(RXOPTS) -o $@ $(XSLDIR)/rxml2tr.xsl $<
- %.tex: %.ctr
- xsltproc --stringparam final $(FINAL) -o $@ $(XSLDIR)/trtotex.xsl $<
- %.pdf: %.tex
- xetex $<
- index.html: $(FN).ctr
- xsltproc --stringparam tr-name $(FN) -o $@ $(XSLDIR)/trtoxhtml.xsl $<
- $(FN).rss: $(FN).ctr
- xsltproc --stringparam tr-name $(FN) -o $@ $(XSLDIR)/trtorss.xsl $<
- $(FN).epub: content.opf etr.html etr-title.html etr-toc.html toc.ncx
zip -DX0
$@ mimetype zip -DrX9 $ @$^ $ (EPUBFIX)$(shell xsltproc $(XSLDIR)/piclist.xsl $(FN).ctr)
- content.opf: $(FN).ctr
- xsltproc -o $@ $(XSLDIR)/trtoopf.xsl $<
- etr.html: $(FN).ctr
- xsltproc -o $@ $(XSLDIR)/trtoepub.xsl $<
- etr-title.html: $(FN).ctr
- xsltproc -o $@ $(XSLDIR)/trtoetitle.xsl $<
- etr-toc.html: $(FN).ctr
- xsltproc -o $@ $(XSLDIR)/trtoetoc.xsl $<
- toc.ncx: $(FN).ctr
- xsltproc --stringparam tr-name $(FN) -o $@ $(XSLDIR)/trtoncx.xsl $<