X-Git-Url: https://pere.pagekite.me/gitweb/text-destroy-surveillance.git/blobdiff_plain/359d83af156cf3d6c0ade9ebfc56a93ba187d89a..19317f42d48df5040318ae21d8af13dc21bbe8e3:/Makefile diff --git a/Makefile b/Makefile index 44413e7..b0c7e8c 100644 --- a/Makefile +++ b/Makefile @@ -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