]> pere.pagekite.me Git - text-epistlene.git/blobdiff - Makefile
Add clean targets.
[text-epistlene.git] / Makefile
index d2f199c025acf5b26ac2ebfb74dd8cc265299c75..816a9c516aa5f420335155e3538c3b0052e2aca6 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
 SOURCE = gaysir_epistlene
 
 PANDOC_OPTS = \
 SOURCE = gaysir_epistlene
 
 PANDOC_OPTS = \
-  -t docbook4
+  -t docbook4 --top-level-division=part
 
 DBLATEX_OPTS = \
   -p pdf.xsl
 
 DBLATEX_OPTS = \
   -p pdf.xsl
@@ -18,11 +18,21 @@ $(SOURCE).pdf: $(SOURCE).xml Makefile pdf.xsl
 $(SOURCE)-body.xml: $(SOURCE).rst Makefile
        pandoc -s -o $@ $(PANDOC_OPTS) $(SOURCE).rst
        sed -i \
 $(SOURCE)-body.xml: $(SOURCE).rst Makefile
        pandoc -s -o $@ $(PANDOC_OPTS) $(SOURCE).rst
        sed -i \
-               -e 's%<title>.*</title>%<title></title>%g' \
+               -e 's%article%book%g' \
+               -e 's%<title>[0-9]*</title>%<title></title>%g' \
+               -e 's%^  <blockquote>%  <partintro><blockquote>%g' \
+               -e 's%^  </blockquote>%  </blockquote></partintro>%g' \
                -e 's%“%<quote>%g' \
                -e 's%”%</quote>%g' $@
 
 .xml.epub:
        dbtoepub -s epub.xsl $^ -o $@
 
                -e 's%“%<quote>%g' \
                -e 's%”%</quote>%g' $@
 
 .xml.epub:
        dbtoepub -s epub.xsl $^ -o $@
 
+clean:
+       $(RM) *~
+
+distclean: clean
+       $(RM) gaysir_epistlene.epub gaysir_epistlene.pdf
+       $(RM) gaysir_epistlene-body.xml
+
 .SUFFIXES: .xml .html .pdf .epub
 .SUFFIXES: .xml .html .pdf .epub