]> pere.pagekite.me Git - text-madewithcc.git/blobdiff - Makefile
Reflow XMl with xmllint after generating it, to make sure it get predictable indentation.
[text-madewithcc.git] / Makefile
index 08413604269e8b05e4e9117bf37205146612b535..286d9349fec92beb2128d31a6b36657488aed16a 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -80,6 +80,7 @@ $(SOURCE).xml: $(SOURCE).md fixup-docbook.rb
          pandoc -s -o $$TEMP $(PANDOC_OPTS) $(SOURCE).md && \
          ruby fixup-docbook.rb $$TEMP $@ && \
          rm $$TEMP
+       xmllint --format $@ > $@.new && mv $@.new $@
 
 pdf: $(SOURCE).pdf
        for LANG in $(LANGS); do \
@@ -101,8 +102,7 @@ DBLATEX_OPTS = -T simple -t tex -b xetex -p extra/pdf.xsl
 # handled by LaTeX/dblatex, see <URL: https://bugs.debian.org/889603 >.
 %.tex: %.xml
        dblatex $(DBLATEX_OPTS) $^
-       perl -p -i -e 's/ / /g; \
-               s/\\chapter\{(Colophon|Dedication)\}/\\chapter*{}/;' $@
+       perl -p -i -e 's/ / /g' $@
 
 XMLLINTOPTS = --nonet --noout  --xinclude --postvalid
 lint: $(SOURCE).xml