MASTER_XHTML=$(MASTER_URL)/artifact/$(TGT_BASE).xhtml
MASTER_XHTML_LAB=$(MASTER_URL_LAB)/artifact/$(TGT_BASE).xhtml
TGT_MASTER=$(TMP)/mastermanual
+CHUNKED_HTML=chunked-html
RNG_UBN=/usr/share/xml/docbook/schema/rng/5.0/docbookxi.rng
$(shell ls -d $(XSL_REL) 2> /dev/null), \
$(shell ls -d $(XSL_F16) 2> /dev/null), \
$(shell ls -d $(XSL_MAC) 2> /dev/null))
+PRIMARYXSL=$(XSL)/$(subst $(TGT_BASE).,,$@)/docbook.xsl
+PRIMARYCHUNKXSL=$(XSL)/html/chunkfast.xsl
.PHONY: all
-all: clean check xhtml html pdf epub
+all: clean check xhtml html chunked-html pdf epub
.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).epub $(TGT_BASE).fo: $(SRCS)
- xsltproc --stringparam fop1.extensions 1 \
- --stringparam section.label.includes.component.label 1 \
- --stringparam section.autolabel 1 \
- --stringparam chapter.autolabel 1 \
- --stringparam appendix.autolabel 1 \
- --xinclude -o $@ $(XSL)/$(subst $(TGT_BASE).,,$@)/docbook.xsl ./index.xml
+# Note: xsl:import is resolved at compile time, so the primary xsl
+# is substituted into the custom xsl with sed before compliation.
+$(CHUNKED_HTML)/%.html: $(SRCS)
+ sed -e 's;PRIMARYXSL;${PRIMARYCHUNKXSL};' ./style/customstyle.xsl | \
+ xsltproc --xinclude -o ${CHUNKED_HTML}/ - ./index.xml
+
+$(TGT_BASE).html $(TGT_BASE).xhtml $(TGT_BASE).epub: $(SRCS)
+ sed -e 's;PRIMARYXSL;${PRIMARYXSL};' ./style/customstyle.xsl | \
+ xsltproc --xinclude -o $@ - ./index.xml
+
+$(TGT_BASE).fo: $(SRCS)
+ sed -e 's;PRIMARYXSL;${PRIMARYXSL};' ./style/customstyle_fo.xsl | \
+ xsltproc --xinclude -o $@ - ./index.xml
+
$(TGT_BASE).pdf: $(TGT_BASE).fo
fop $< $@
epub: $(TGT_BASE).epub
echo "application/epub+zip" > mimetype
cp -r ./figures ./OEBPS/
+ mkdir ./OEBPS/style
+ cp ./style/manual.css ./OEBPS/style/
zip -0Xq $(TGT_BASE).epub mimetype
zip -Xr9D $(TGT_BASE).epub OEBPS/*
zip -Xr9D $(TGT_BASE).epub META-INF/*
+.PHONY: chunked-html
+chunked-html: $(CHUNKED_HTML)/%.html
+ cp -r ./figures ./${CHUNKED_HTML}
+
# get the git hash for the last successful build of the manual
.PHONY: mastermanual.revision
.PHONY: push
push:
- git push ssh://review.whamcloud.com:29418/doc/manual HEAD:refs/for/master
+ git push ssh://review.hpdd.intel.com:29418/doc/manual HEAD:refs/for/master
.PHONY: clean
clean:
rm -f $(TGT_BASE).html $(TGT_BASE).xhtml $(TGT_BASE).pdf\
mastermanual.revision mastermanual.index mimetype\
- $(TGT_BASE).diff.html $(TGT_BASE).epub
- rm -rf ./META-INF ./OEBPS
+ $(TGT_BASE).diff.html $(TGT_BASE).epub $(TGT_BASE).fo
+ rm -rf ./META-INF ./OEBPS ./$(TGT_BASE)