Support library images. Do this by
1. Listing LIB_IMAGES as a dependency on certain targets, to ensure that library images are pulled in correctly. 2. Create a new FORMAT, html.tar, to cater for the case where we might be producing a single .html file, but we need to tar that up for distribution and the tar file needs to include all the images. 3. Update the various install-* targets to include the images. 4. Update the package-* targets to include the images While I'm here, pull out the .doc target. For some reason I thought our tool chain could produce Microsoft Word .doc files. It can't.
This commit is contained in:
parent
03f0782120
commit
57f6bf9869
Notes:
svn2git
2020-12-08 03:00:23 +00:00
svn path=/head/; revision=7627
1 changed files with 29 additions and 11 deletions
|
@ -1,5 +1,5 @@
|
||||||
#
|
#
|
||||||
# $FreeBSD: doc/share/mk/doc.docbook.mk,v 1.11 2000/04/29 07:46:15 kuriyama Exp $
|
# $FreeBSD: doc/share/mk/doc.docbook.mk,v 1.12 2000/07/14 08:42:49 nbm Exp $
|
||||||
#
|
#
|
||||||
# This include file <doc.docbook.mk> handles building and installing of
|
# This include file <doc.docbook.mk> handles building and installing of
|
||||||
# DocBook documentation in the FreeBSD Documentation Project.
|
# DocBook documentation in the FreeBSD Documentation Project.
|
||||||
|
@ -57,9 +57,11 @@ DOCBOOKCATALOG= ${PREFIX}/share/sgml/docbook/catalog
|
||||||
JADECATALOG= ${PREFIX}/share/sgml/jade/catalog
|
JADECATALOG= ${PREFIX}/share/sgml/jade/catalog
|
||||||
DSSSLCATALOG= ${PREFIX}/share/sgml/docbook/dsssl/modular/catalog
|
DSSSLCATALOG= ${PREFIX}/share/sgml/docbook/dsssl/modular/catalog
|
||||||
|
|
||||||
|
LIB_IMAGES?=
|
||||||
|
|
||||||
JADEOPTS= ${JADEFLAGS} -c ${FREEBSDCATALOG} -c ${DSSSLCATALOG} -c ${DOCBOOKCATALOG} -c ${JADECATALOG} ${EXTRA_CATALOGS:S/^/-c /g}
|
JADEOPTS= ${JADEFLAGS} -c ${FREEBSDCATALOG} -c ${DSSSLCATALOG} -c ${DOCBOOKCATALOG} -c ${JADECATALOG} ${EXTRA_CATALOGS:S/^/-c /g}
|
||||||
|
|
||||||
KNOWN_FORMATS= html html-split html-split.tar txt rtf ps pdf tex dvi tar pdb
|
KNOWN_FORMATS= html html.tar html-split html-split.tar txt rtf ps pdf tex dvi tar pdb
|
||||||
|
|
||||||
# ------------------------------------------------------------------------
|
# ------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
|
@ -115,6 +117,9 @@ CLEANFILES+= ${DOC}.html-split.tar
|
||||||
.elif ${_cf} == "html"
|
.elif ${_cf} == "html"
|
||||||
_docs+= ${DOC}.html
|
_docs+= ${DOC}.html
|
||||||
CLEANFILES+= ${DOC}.html
|
CLEANFILES+= ${DOC}.html
|
||||||
|
.elif ${_cf} == "html.tar"
|
||||||
|
_docs+= ${DOC}.html.tar
|
||||||
|
CLEANFILES+= ${DOC}.html ${DOC}.html.tar
|
||||||
.elif ${_cf} == "txt"
|
.elif ${_cf} == "txt"
|
||||||
_docs+= ${DOC}.txt
|
_docs+= ${DOC}.txt
|
||||||
CLEANFILES+= ${DOC}.html ${DOC}.txt
|
CLEANFILES+= ${DOC}.html ${DOC}.txt
|
||||||
|
@ -166,13 +171,13 @@ CLEANFILES+= ${DOC}.${_curformat}.${_curcomp}
|
||||||
|
|
||||||
all: ${_docs}
|
all: ${_docs}
|
||||||
|
|
||||||
index.html HTML.manifest: ${SRCS}
|
index.html HTML.manifest: ${SRCS} ${LIB_IMAGES}
|
||||||
${JADE} -V html-manifest -ioutput.html ${JADEOPTS} -d ${DSLHTML} -t sgml ${MASTERDOC}
|
${JADE} -V html-manifest -ioutput.html ${JADEOPTS} -d ${DSLHTML} -t sgml ${MASTERDOC}
|
||||||
.if !defined(NO_TIDY)
|
.if !defined(NO_TIDY)
|
||||||
-tidy -i -m -f /dev/null ${TIDYFLAGS} `xargs < HTML.manifest`
|
-tidy -i -m -f /dev/null ${TIDYFLAGS} `xargs < HTML.manifest`
|
||||||
.endif
|
.endif
|
||||||
|
|
||||||
${DOC}.html: ${SRCS}
|
${DOC}.html: ${SRCS} ${LIB_IMAGES}
|
||||||
${JADE} -ioutput.html -V nochunks ${JADEOPTS} -d ${DSLHTML} -t sgml ${MASTERDOC} > ${.TARGET}
|
${JADE} -ioutput.html -V nochunks ${JADEOPTS} -d ${DSLHTML} -t sgml ${MASTERDOC} > ${.TARGET}
|
||||||
.if !defined(NO_TIDY)
|
.if !defined(NO_TIDY)
|
||||||
-tidy -i -m -f /dev/null ${TIDYFLAGS} ${.TARGET}
|
-tidy -i -m -f /dev/null ${TIDYFLAGS} ${.TARGET}
|
||||||
|
@ -180,6 +185,11 @@ ${DOC}.html: ${SRCS}
|
||||||
|
|
||||||
${DOC}.html-split.tar: HTML.manifest
|
${DOC}.html-split.tar: HTML.manifest
|
||||||
tar cf ${.TARGET} `xargs < HTML.manifest`
|
tar cf ${.TARGET} `xargs < HTML.manifest`
|
||||||
|
tar uf ${.TARGET} ${LIB_IMAGES}
|
||||||
|
|
||||||
|
${DOC}.html.tar: ${DOC}.html
|
||||||
|
tar cf ${.TARGET} ${DOC}.html
|
||||||
|
tar uf ${.TARGET} ${LIB_IMAGES}
|
||||||
|
|
||||||
${DOC}.txt: ${DOC}.html
|
${DOC}.txt: ${DOC}.html
|
||||||
w3m -S -dump ${.ALLSRC} > ${.TARGET}
|
w3m -S -dump ${.ALLSRC} > ${.TARGET}
|
||||||
|
@ -193,9 +203,6 @@ ${.CURDIR:T}.pdb: ${DOC}.pdb
|
||||||
${DOC}.rtf: ${SRCS}
|
${DOC}.rtf: ${SRCS}
|
||||||
${JADE} -Vrtf-backend -ioutput.print ${JADEOPTS} -d ${DSLPRINT} -t rtf -o ${.TARGET} ${MASTERDOC}
|
${JADE} -Vrtf-backend -ioutput.print ${JADEOPTS} -d ${DSLPRINT} -t rtf -o ${.TARGET} ${MASTERDOC}
|
||||||
|
|
||||||
${DOC}.doc: ${SRCS}
|
|
||||||
${JADE} -ioutput.print ${JADEOPTS} -d ${DSLPRINT} -t doc -o ${.TARGET} ${MASTERDOC}
|
|
||||||
|
|
||||||
${DOC}.tex: ${SRCS}
|
${DOC}.tex: ${SRCS}
|
||||||
${JADE} -Vtex-backend -ioutput.print ${JADEOPTS} -d ${DSLPRINT} -t tex -o ${.TARGET} ${MASTERDOC}
|
${JADE} -Vtex-backend -ioutput.print ${JADEOPTS} -d ${DSLPRINT} -t tex -o ${.TARGET} ${MASTERDOC}
|
||||||
|
|
||||||
|
@ -270,7 +277,7 @@ _PROG_COMPRESS_zip: .USE
|
||||||
.for _curformat in ${KNOWN_FORMATS}
|
.for _curformat in ${KNOWN_FORMATS}
|
||||||
_cf=${_curformat}
|
_cf=${_curformat}
|
||||||
.for _curcompress in ${KNOWN_COMPRESS}
|
.for _curcompress in ${KNOWN_COMPRESS}
|
||||||
.if ${_cf} == "html-split"
|
.if ${_cf} == "html-split" || ${_cf} == "html"
|
||||||
${DOC}.${_cf}.tar.${_curcompress}: ${DOC}.${_cf}.tar _PROG_COMPRESS_${_curcompress}
|
${DOC}.${_cf}.tar.${_curcompress}: ${DOC}.${_cf}.tar _PROG_COMPRESS_${_curcompress}
|
||||||
.else
|
.else
|
||||||
${DOC}.${_cf}.${_curcompress}: ${DOC}.${_cf} _PROG_COMPRESS_${_curcompress}
|
${DOC}.${_cf}.${_curcompress}: ${DOC}.${_cf} _PROG_COMPRESS_${_curcompress}
|
||||||
|
@ -283,8 +290,7 @@ ${DOC}.${_cf}.${_curcompress}: ${DOC}.${_cf} _PROG_COMPRESS_${_curcompress}
|
||||||
# Install targets
|
# Install targets
|
||||||
#
|
#
|
||||||
# Build install-* targets, one per allowed value in FORMATS. Need to
|
# Build install-* targets, one per allowed value in FORMATS. Need to
|
||||||
# build
|
# build two specific targets;
|
||||||
# two specific targets;
|
|
||||||
#
|
#
|
||||||
# install-html-split - Handles multiple .html files being generated
|
# install-html-split - Handles multiple .html files being generated
|
||||||
# from one source. Uses the HTML.manifest file
|
# from one source. Uses the HTML.manifest file
|
||||||
|
@ -320,12 +326,21 @@ install-${_cf}: index.html
|
||||||
@if [ -f ${.OBJDIR}/${DOC}.ln ]; then \
|
@if [ -f ${.OBJDIR}/${DOC}.ln ]; then \
|
||||||
(cd ${DESTDIR}; sh ${.OBJDIR}/${DOC}.ln); \
|
(cd ${DESTDIR}; sh ${.OBJDIR}/${DOC}.ln); \
|
||||||
fi
|
fi
|
||||||
|
.for _curimage in ${LIB_IMAGES}
|
||||||
|
${INSTALL_DOCS} ${_curimage} ${DESTDIR}/${_curimage:H}
|
||||||
|
.endfor
|
||||||
.for _compressext in ${KNOWN_COMPRESS}
|
.for _compressext in ${KNOWN_COMPRESS}
|
||||||
install-${_cf}.tar.${_compressext}: ${DOC}.${_cf}.tar.${_compressext}
|
install-${_cf}.tar.${_compressext}: ${DOC}.${_cf}.tar.${_compressext}
|
||||||
@[ -d ${DESTDIR} ] || mkdir -p ${DESTDIR}
|
@[ -d ${DESTDIR} ] || mkdir -p ${DESTDIR}
|
||||||
${INSTALL_DOCS} ${.ALLSRC} ${DESTDIR}
|
${INSTALL_DOCS} ${.ALLSRC} ${DESTDIR}
|
||||||
.endfor
|
.endfor
|
||||||
|
.elif ${_cf} == "html"
|
||||||
|
install-${_cf}: ${DOC}.${_cf}
|
||||||
|
@[ -d ${DESTDIR} ] || mkdir -p ${DESTDIR}
|
||||||
|
${INSTALL_DOCS} ${.ALLSRC} ${DESTDIR}
|
||||||
|
.for _curimage in ${LIB_IMAGES}
|
||||||
|
${INSTALL_DOCS} ${_curimage} ${DESTDIR}/${_curimage:H}
|
||||||
|
.endfor
|
||||||
.else
|
.else
|
||||||
install-${_cf}: ${DOC}.${_cf}
|
install-${_cf}: ${DOC}.${_cf}
|
||||||
@[ -d ${DESTDIR} ] || mkdir -p ${DESTDIR}
|
@[ -d ${DESTDIR} ] || mkdir -p ${DESTDIR}
|
||||||
|
@ -370,6 +385,9 @@ package-${_curformat}: install-${_curformat}
|
||||||
@cp HTML.manifest PLIST
|
@cp HTML.manifest PLIST
|
||||||
.else
|
.else
|
||||||
@echo ${DOC}.${_curformat} > PLIST
|
@echo ${DOC}.${_curformat} > PLIST
|
||||||
|
@for lib_images in ${LIB_IMAGES}; do \
|
||||||
|
echo $$lib_images >> PLIST; \
|
||||||
|
done
|
||||||
.endif
|
.endif
|
||||||
@pkg_create -v -c -"FDP ${.CURDIR:T} ${_curformat} package" \
|
@pkg_create -v -c -"FDP ${.CURDIR:T} ${_curformat} package" \
|
||||||
-d -"FDP ${.CURDIR:T} ${_curformat} package" -f PLIST \
|
-d -"FDP ${.CURDIR:T} ${_curformat} package" -f PLIST \
|
||||||
|
|
Loading…
Reference in a new issue