]> pere.pagekite.me Git - text-destroy-surveillance.git/blobdiff - Makefile
Make it clear that this project is about the Norwegian edition only.
[text-destroy-surveillance.git] / Makefile
index 44413e7f4edd03964b7995af294a1539de9222c3..aba0ac65c08c4fc0d5a323ca7d12485504b0d348 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,5 @@
 SOURCE=how-to-destroy-surveillance-capitalism
 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 = \
        $(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
 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 $@
 
        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%“%<quote>%g' \
                -e 's%”%</quote>%g' $@
 
        sed -i \
                -e 's%“%<quote>%g' \
                -e 's%”%</quote>%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" \
        -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
 
 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 $@
        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:
        xmllint $(XMLLINTOPTS) $^
 
 clean:
-       $(RM) *~ $(GENERATED) complete-book.xml
+       $(RM) *~ $(GENERATED) $(SOURCE).xml
 
 distclean: clean
 
 
 distclean: clean