X-Git-Url: https://pere.pagekite.me/gitweb/text-madewithcc.git/blobdiff_plain/4f798e70c047f9412b94d9ce4c0508d367278014..f5290fbb77a47b749eb43363446bdedceaffb25b:/Makefile diff --git a/Makefile b/Makefile index 4e94cd5..87758db 100644 --- a/Makefile +++ b/Makefile @@ -20,8 +20,17 @@ PANDOC_OPTS = \ LANGS := $(shell ls po/*/mwcc.po|cut -d/ -f2) +DESTDIR = + +docdir = /usr/share/doc/madewithcc + +install = install + all: pdf epub +install: + $(install) *.pdf *.epub $(DESTDIR)/$(docdir) + distclean: clean rm -f $(SOURCE).md clean: @@ -86,24 +95,18 @@ pdf: $(SOURCE).pdf for LANG in $(LANGS); do \ $(MAKE) $(SOURCE).$$LANG.pdf ; \ done -%.pdf: %.tex - pdflatex $^ - pdflatex $^ +DBLATEX_OPTS = -T simple -t pdf -b xetex -p extra/pdf.xsl +%.pdf: %.xml + dblatex $(DBLATEX_OPTS) $^ epub: $(SOURCE).epub for LANG in $(LANGS); do \ $(MAKE) $(SOURCE).$$LANG.epub ; \ + flightcrew-cli $(SOURCE).$$LANG.epub || exit 1 ; \ done %.epub: %.xml dbtoepub $^ -DBLATEX_OPTS = -T simple -t tex -b xetex -p extra/pdf.xsl -# Replace Unicode Hair Space (U+200A) with space, as   is not -# handled by LaTeX/dblatex, see . -%.tex: %.xml - dblatex $(DBLATEX_OPTS) $^ - perl -p -i -e 's/ / /g' $@ - XMLLINTOPTS = --nonet --noout --xinclude --postvalid lint: $(SOURCE).xml xmllint $(XMLLINTOPTS) $^