From: Richard Henwood Date: Fri, 10 Feb 2012 21:31:13 +0000 (-0600) Subject: LUDOC-32: build epub from manual. X-Git-Tag: 2.2.0~21^2 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=8dc3134b26b21280698a69558c26950e6cf38062;p=doc%2Fmanual.git LUDOC-32: build epub from manual. Makefile now contains the correct rules to build an epub version of the manual. Signed-off-by: Richard Henwood Change-Id: I5e126b137b535522c720fdac863562f194a2e17e --- diff --git a/Makefile b/Makefile index 335ee38..5f30015 100644 --- a/Makefile +++ b/Makefile @@ -27,14 +27,14 @@ XSL=$(or $(shell ls -d $(XSL_UBN) 2> /dev/null), \ $(shell ls -d $(XSL_MAC) 2> /dev/null)) .PHONY: all -all: clean check xhtml html pdf diff +all: clean check xhtml html pdf epub diff .PHONY: check check: $(SRC_XML) xmllint --noout --xinclude --noent --relaxng $(RNG) ./index.xml # Note: can't use "suffix" instead of "subst", because it keeps the '.' -$(TGT_BASE).html $(TGT_BASE).xhtml $(TGT_BASE).fo: $(SRCS) +$(TGT_BASE).html $(TGT_BASE).xhtml $(TGT_BASE).fo $(TGT_BASE).epub: $(SRCS) xsltproc --stringparam fop1.extensions 1 \ --stringparam section.label.includes.component.label 1 \ --stringparam section.autolabel 1 \ @@ -54,6 +54,15 @@ xhtml: $(TGT_BASE).xhtml .PHONY: pdf pdf: $(TGT_BASE).pdf +.PHONY: epub +epub: $(TGT_BASE).epub + echo "application/epub+zip" > mimetype + cp -r ./figures ./OEBPS/ + zip -0Xq $(TGT_BASE).epub mimetype + zip -Xr9D $(TGT_BASE).epub OEBPS/* + zip -Xr9D $(TGT_BASE).epub META-INF/* + + # get the git hash for the last successful build of the manual .PHONY: mastermanual.revision mastermanual.revision: @@ -80,4 +89,6 @@ push: .PHONY: clean clean: rm -f $(TGT_BASE).html $(TGT_BASE).xhtml $(TGT_BASE).pdf\ - mastermanual.revision mastermanual.index + mastermanual.revision mastermanual.index mimetype\ + $(TGT_BASE).diff.html + rm -rf ./META-INF ./OEBPS