]> pere.pagekite.me Git - text-destroy-surveillance.git/commitdiff
Restructure build for proper english HTML edition.
authorPetter Reinholdtsen <pere@hungry.com>
Mon, 12 Oct 2020 15:35:03 +0000 (17:35 +0200)
committerPetter Reinholdtsen <pere@hungry.com>
Mon, 12 Oct 2020 15:35:03 +0000 (17:35 +0200)
Makefile
book.xml
how-to-destroy-surveillance-capitalism-body.rst [moved from how-to-destroy-surveillance-capitalism.rst with 100% similarity]
po4a.cfg

index 44413e7f4edd03964b7995af294a1539de9222c3..b0c7e8c18221341f4a236bcf6e46792facd86612 100644 (file)
--- 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%“%<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" \
@@ -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
 
index 65df28fe7f44d031c0f5a2447e052e331e5e738f..40ed878fce4b6b6ef2ae9eeb746cb9a395571146 100644 (file)
--- a/book.xml
+++ b/book.xml
@@ -7,7 +7,7 @@
   <xi:include href="bookinfo.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
   <chapter label="">
     <title>How to Destroy Surveillance Capitalism</title>
-  <xi:include href="how-to-destroy-surveillance-capitalism.xml#xpointer(/article/sect1)"
+  <xi:include href="how-to-destroy-surveillance-capitalism-body.xml#xpointer(/article/sect1)"
              xmlns:xi="http://www.w3.org/2001/XInclude" />
   </chapter>
 </book>
index 35d28b73952871f667c95cc112ad9e358e3fdcbd..a021ac23d531dd1b4cb2feead7fa2f31272ed007 100644 (file)
--- a/po4a.cfg
+++ b/po4a.cfg
@@ -1,4 +1,4 @@
 [po_directory] po
 
-[type: docbook] complete-book.xml $lang:$lang.xml \
+[type: docbook] how-to-destroy-surveillance-capitalism.xml $lang:$lang.xml \
        opt:"-M UTF-8 -k 0" opt_nb:"-L UTF-8"