Use xmlto; add to 'clean' target. epub github/epub
authorPhil Pennock <pdp@exim.org>
Mon, 1 Apr 2013 20:16:32 +0000 (16:16 -0400)
committerPhil Pennock <pdp@exim.org>
Mon, 1 Apr 2013 20:49:59 +0000 (16:49 -0400)
Instead of hardcoded xsltproc path and using zip ourselves, just use
xmlto, which delegates epub post-process to a script which handles all
this for us (doing the same thing).  Left previous commit in, so have
something to revert to if adding cover art or the like proves annoying
with xmlto in the way.

Added *.epub to "make clean"

doc/doc-docbook/Makefile

index a741585dc0f1ce0b145b3cbe774e4eb676660c2d..334e490d5c7147f089191703497c1d540f4f001c 100644 (file)
@@ -5,8 +5,6 @@ notarget:;    @echo "** You must specify a target, in the form x.y, where x is '
              @echo "** One other possible target is 'exim.8'".
              exit 1
 
-EPUB_DOCBOOK= /usr/local/share/xsl/docbook/epub/docbook.xsl
-
 ############################# EVERYTHING ###############################
 #
 # Generate all the documentation files...
@@ -116,12 +114,8 @@ filter.info:  filter-info.xml
              makeinfo -o filter.info filter.texinfo
 
 filter.epub:   filter-epub.xml
-       rm -rf book-filter
-       mkdir book-filter
-       xsltproc -o book-filter/ $(EPUB_DOCBOOK) filter-epub.xml
-       echo "application/epub+zip" > book-filter/mimetype
-       ( cd book-filter; zip -XqD ../filter.epub mimetype )
-       ( cd book-filter; zip -Xr9D ../filter.epub META-INF OEBPS )
+       xmlto epub filter-epub.xml
+       mv filter-epub.epub filter.epub
 
 ########################################################################
 
@@ -207,12 +201,8 @@ spec.info:    spec-info.xml
              makeinfo -o spec.info --no-split spec.texinfo
 
 spec.epub:   spec-epub.xml
-       rm -rf book-spec
-       mkdir book-spec
-       xsltproc -o book-spec/ $(EPUB_DOCBOOK) spec-epub.xml
-       echo "application/epub+zip" > book-spec/mimetype
-       ( cd book-spec; zip -XqD ../spec.epub mimetype )
-       ( cd book-spec; zip -Xr9D ../spec.epub META-INF OEBPS )
+       xmlto epub spec-epub.xml
+       mv spec-epub.epub spec.epub
 
 ########################################################################
 
@@ -320,7 +310,8 @@ clean:; /bin/rm -rf exim.8 \
              *.fo *.pdf *.ps \
              filter*.html spec*.html test*.html \
              filter*.txt spec*.txt test*.txt \
-             *.info* *.texinfo *.texi
+             *.info* *.texinfo *.texi \
+             *.epub
 
 ########################################################################
 # vim: set ts=4 :