X-Git-Url: https://pere.pagekite.me/gitweb/text-destroy-surveillance.git/blobdiff_plain/968523fdfb49598a5aa0b8cf3356a2a688274eb8..refs/heads/master:/Makefile diff --git a/Makefile b/Makefile index 44413e7..aba0ac6 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ SOURCE=how-to-destroy-surveillance-capitalism -GENERATED = $(SOURCE).xml $(SOURCE).pdf \ +GENERATED = $(SOURCE).xml $(SOURCE).pdf $(SOURCE).html $(SOURCE).epub \ $(SOURCE).nb.xml $(SOURCE).nb.pdf $(SOURCE).nb.html $(SOURCE).nb.epub PANDOC_OPTS = \ @@ -11,21 +11,21 @@ DBLATEX_OPTS = \ all: $(GENERATED) # Workaround for missing titles -complete-book.xml: $(SOURCE).xml Makefile book.xml bookinfo.xml +$(SOURCE).xml: $(SOURCE)-body.xml Makefile book.xml bookinfo.xml xmllint --nonet --xinclude --postvalid book.xml > $@.new && \ mv $@.new $@ -$(SOURCE).pdf: complete-book.xml Makefile pdf.xsl - dblatex $(DBLATEX_OPTS) complete-book.xml -o $@ +$(SOURCE).pdf: $(SOURCE).xml Makefile pdf.xsl + dblatex $(DBLATEX_OPTS) $(SOURCE).xml -o $@ -$(SOURCE).xml: $(SOURCE).rst Makefile - pandoc -s -o $@ $(PANDOC_OPTS) $(SOURCE).rst +$(SOURCE)-body.xml: $(SOURCE)-body.rst Makefile + pandoc -s -o $@ $(PANDOC_OPTS) $(SOURCE)-body.rst sed -i \ -e 's%“%%g' \ -e 's%”%%g' $@ -po/$(SOURCE).pot: complete-book.xml - po4a-gettextize -f docbook -m complete-book.xml \ +po/$(SOURCE).pot: $(SOURCE).xml + po4a-gettextize -f docbook -m $(SOURCE).xml \ -M UTF-8 -L UTF-8 \ --package-name "How to Destroy Surveillance Capitalism" \ --copyright-holder "Cory Doctorow" \ @@ -34,7 +34,7 @@ po/$(SOURCE).pot: complete-book.xml po/$(SOURCE).%.po: po/$(SOURCE).pot po4a --no-translations --msgmerge-opt --no-location po4a.cfg -$(SOURCE).nb.xml: po/$(SOURCE).nb.po complete-book.xml +$(SOURCE).nb.xml: po/$(SOURCE).nb.po $(SOURCE).xml po4a --translate-only $(SOURCE).nb.xml po4a.cfg $(SOURCE).nb.pdf: $(SOURCE).nb.xml Makefile pdf.xsl dblatex $(DBLATEX_OPTS) $(SOURCE).nb.xml -o $@ @@ -50,7 +50,7 @@ lint: book.xml xmllint $(XMLLINTOPTS) $^ clean: - $(RM) *~ $(GENERATED) complete-book.xml + $(RM) *~ $(GENERATED) $(SOURCE).xml distclean: clean