File: epub.make

package info (click to toggle)
gnucash-docs 2.6.4-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 78,984 kB
  • ctags: 120
  • sloc: xml: 171,527; sh: 7,767; makefile: 311
file content (30 lines) | stat: -rw-r--r-- 785 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# 2011-07-10, SASAKI Suguru: EPUB creation.

epubfile = $(docname).epub

$(epubfile): $(entities)

epub: $(epubfile)

epub-am:

.xml.epub:
	EPUB_TMPDIR=`mktemp -d .epubtmpXXXXXXXX`; \
	posthook='exit 1'; \
	(cd "$$EPUB_TMPDIR" && \
	echo "application/epub+zip" > mimetype && \
	$(XSLTPROC) --stringparam base.dir OEBPS/ \
	            --stringparam epub.metainf.dir META-INF/ \
	            --stringparam epub.oebps.dir OEBPS/ \
	            $(abs_top_srcdir)/xsl/1.75.2/epub/docbook.xsl \
	            $(abs_srcdir)/$(docname).xml && \
	cp -L -R $(abs_srcdir)/figures OEBPS/ && \
	zip -X -r ../$(epubfile) mimetype META-INF OEBPS && \
	cd ..) && posthook=''; \
	if test -d "$$EPUB_TMPDIR"; then \
	  rm -v -fr "$$EPUB_TMPDIR"; \
	fi; \
	eval "$$posthook";

CLEANFILES += $(epubfile)