X-Git-Url: https://pere.pagekite.me/gitweb/text-madewithcc.git/blobdiff_plain/4f798e70c047f9412b94d9ce4c0508d367278014..adb2d64d3273efa5f44c492252bec94df99eaf8e:/Makefile diff --git a/Makefile b/Makefile index 4e94cd5..ebedadf 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,23 +95,21 @@ 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' $@ +# Useful for spell checking the text +%.txt: %.xml + xmlto txt $< XMLLINTOPTS = --nonet --noout --xinclude --postvalid lint: $(SOURCE).xml