Index: projects/db5/share/mk/doc.commands.mk =================================================================== --- projects/db5/share/mk/doc.commands.mk (revision 42132) +++ projects/db5/share/mk/doc.commands.mk (revision 42133) @@ -1,140 +1,142 @@ # # $FreeBSD$ # # # General commands # AWK?= /usr/bin/awk CP?= /bin/cp CAT?= /bin/cat ECHO_CMD?= echo FETCH?= /usr/bin/fetch FIND?= /usr/bin/find GREP?= /usr/bin/grep LN?= /bin/ln MKDIR?= /bin/mkdir MV?= /bin/mv RM?= /bin/rm ISPELL?= ispell ISPELLOPTS?= -l -p /usr/share/dict/freebsd ${ISPELLFLAGS} .if exists(/usr/bin/perl) PERL?= /usr/bin/perl .elif exists(/usr/local/bin/perl) PERL?= /usr/local/bin/perl .else PERL?= perl .endif PKG_CREATE?= /usr/sbin/pkg_create REALPATH?= /bin/realpath SED?= /usr/bin/sed SETENV?= /usr/bin/env SH?= /bin/sh SORT?= /usr/bin/sort TOUCH?= /usr/bin/touch TRUE?= /usr/bin/true XARGS?= /usr/bin/xargs # # Compession and decompression # BUNZIP2?= /usr/bin/bunzip2 BZIP2?= bzip2 BZIPOPTS?= -qf9 GZIP?= gzip GZIPOPTS?= -qf9 TAR?= /usr/bin/tar ZIP?= ${PREFIX}/bin/zip ZIPOPTS?= -9X # # Rendering and format conversion # DVIPS?= ${PREFIX}/bin/dvips .if defined(PAPERSIZE) DVIPSOPTS?= -t ${PAPERSIZE:L} .endif DVIPSOPTS+= ${DVIPSFLAGS} FOP?= ${PREFIX}/bin/fop FOPOPTS?= GROFF?= groff HTML2PDB?= ${PREFIX}/bin/iSiloBSD HTML2PDBOPTS?= -y -d0 -Idef ${HTML2PDBFLAGS} HTML2TXT?= ${PREFIX}/bin/w3m HTML2TXTOPTS?= -dump ${HTML2TXTFLAGS} +JING?= ${PREFIX}/bin/jing + XMLLINT?= ${PREFIX}/bin/xmllint XSLTPROC?= ${PREFIX}/bin/xsltproc # # In teTeX 3.0 and later, pdfetex(1) is used as the default TeX # engine for JadeTeX and tex(1) cannot be used as ${TEX_CMD} anymore # due to incompatibility of the format file. Since the teTeX 3.0 # distribution has "${PREFIX}/share/texmf-dist/LICENSE.texmf," # it is checked here to determine which TeX engine should be used. .if exists(${PREFIX}/share/texmf-dist/LICENSE.texmf) TEX_CMD?= ${PREFIX}/bin/etex PDFTEX_CMD?= ${PREFIX}/bin/pdfetex .else TEX_CMD?= ${PREFIX}/bin/tex PDFTEX_CMD?= ${PREFIX}/bin/pdftex .endif LATEX_CMD?= ${PREFIX}/bin/latex PS2PDF?= ${PREFIX}/bin/ps2pdf FOP_CMD?= ${PREFIX}/share/fop/fop.sh XEP_CMD?= sh ${HOME}/XEP/xep.sh JAVA_CMD?= ${PREFIX}/bin/javavm SAXON_CMD?= ${JAVA_CMD} -jar ${PREFIX}/share/java/classes/saxon.jar # # Image processing # SCR2PNG?= ${PREFIX}/bin/scr2png SCR2PNGOPTS?= ${SCR2PNGFLAGS} SCR2TXT?= ${PREFIX}/bin/scr2txt SCR2TXTOPTS?= -l ${SCR2TXTFLAGS} EPS2PNM?= ${PREFIX}/bin/gs EPS2PNMOPTS?= -q -dBATCH -dGraphicsAlphaBits=4 -dTextAlphaBits=4 \ -dEPSCrop -r${EPS2PNM_RES}x${EPS2PNM_RES} \ -dNOPAUSE -dSAFER -sDEVICE=pnm -sOutputFile=- # # epsgeom is a perl script for 1) extracting geometry information # from a .eps file and 2) arrange it for ghostscript's pnm driver. # EPSGEOM?= ${PERL} ${DOC_PREFIX}/share/misc/epsgeom EPSGEOMOPTS?= ${EPS2PNM_RES} ${EPS2PNM_RES} PNMTOPNG?= ${PREFIX}/bin/pnmtopng PNMTOPNGOPTS?= ${PNGTOPNGFLAGS} PNGTOPNM?= ${PREFIX}/bin/pngtopnm PNGTOPNMOPTS?= ${PNGTOPNMFLAGS} PPMTOPGM?= ${PREFIX}/bin/ppmtopgm PPMTOPGMOPTS?= ${PPMTOPGMFLAGS} PNMTOPS?= ${PREFIX}/bin/pnmtops PNMTOPSOPTS?= -noturn ${PNMTOPSFLAGS} EPSTOPDF?= ${PREFIX}/bin/epstopdf EPSTOPDFOPTS?= ${EPSTOPDFFLAGS} # PIC2PS?= ${GROFF} -p -S -Wall -mtty-char -man # PS2EPS?= ${PREFIX}/bin/gs PS2EPSOPTS?= -q -dNOPAUSE -dSAFER -dDELAYSAFER \ -sPAPERSIZE=letter -r72 -sDEVICE=bit \ -sOutputFile=/dev/null ${PS2EPSFLAGS} ps2epsi.ps PS2BBOX?= ${PREFIX}/bin/gs PS2BBOXOPTS?= -q -dNOPAUSE -dBATCH -dSAFER -dDELAYSAFER \ -sPAPERSIZE=letter -r72 -sDEVICE=bbox \ -sOutputFile=/dev/null ${PS2BBOXFLAGS} # # Spell checking # ISPELL?= ispell ISPELLOPTS?= -l -p /usr/share/dict/freebsd ${ISPELLFLAGS} Index: projects/db5/share/mk/doc.docbook.mk =================================================================== --- projects/db5/share/mk/doc.docbook.mk (revision 42132) +++ projects/db5/share/mk/doc.docbook.mk (revision 42133) @@ -1,705 +1,711 @@ # # $FreeBSD$ # # This include file handles building and installing of # DocBook documentation in the FreeBSD Documentation Project. # # Documentation using DOCFORMAT=docbook is expected to be marked up # according to the DocBook DTD # # ------------------------------------------------------------------------ # # Document-specific variables # # DOC This should be set to the name of the DocBook # marked-up file, without the .xml suffix. # # It also determins the name of the output files - # ${DOC}.html. # # SRCS The names of all the files that are needed to # build this document - This is useful if any of # them need to be generated. Changing any file in # SRCS causes the documents to be rebuilt. # # HAS_INDEX This document has index terms and so an index # can be created if specified with GEN_INDEX. # # ------------------------------------------------------------------------ # # Variables used by both users and documents: # # EXTRA_CATALOGS Additional catalog files that should be used by # any XML processing applications. # # GEN_INDEX If this document has an index (HAS_INDEX) and this # variable is defined, then index.xml will be added # to the list of dependencies for source files, and # collateindex.pl will be run to generate index.xml. # # CSS_SHEET Full path to a CSS stylesheet suitable for DocBook. # Default is ${DOC_PREFIX}/share/misc/docbook.css # # Package building options: # # BZIP2_PACKAGE Use bzip2(1) utility to compress package tarball # instead of gzip(1). It results packages to have # suffix .tbz instead of .tgz. Using bzip2(1) # provides better compression, but requires longer # time and utilizes more CPU resources than gzip(1). # # Documents should use the += format to access these. # MASTERDOC?= ${.CURDIR}/${DOC}.xml +DB5RNC?= ${DOC_PREFIX}/share/xml/freebsd50.rnc + XSLPROF?= /usr/local/share/xsl/docbook-ns/profiling/profile.xsl XSLXHTML?= ${DOC_PREFIX}/${LANGCODE}/share/xsl/freebsd-xhtml.xsl XSLXHTMLCHUNK?= ${DOC_PREFIX}/${LANGCODE}/share/xsl/freebsd-xhtml-chunk.xsl XSLEPUB?= ${DOC_PREFIX}/${LANGCODE}/share/xsl/freebsd-epub.xsl XSLFO?= ${DOC_PREFIX}/${LANGCODE}/share/xsl/freebsd-fo.xsl XSLPGP?= ${DOC_PREFIX}/share/xsl/freebsd-pgpkeyring.xsl XSLSCH?= /usr/local/share/xsl/iso-schematron/xslt1/iso_schematron_skeleton_for_xslt1.xsl IMAGES_LIB?= SCHEMATRONS?= ${DOC_PREFIX}/share/xml/freebsd.sch XSLTPROCOPTS?= --nonet KNOWN_FORMATS= html html.tar html-split html-split.tar \ epub txt rtf ps pdf tex dvi tar pdb CSS_SHEET?= ${DOC_PREFIX}/share/misc/docbook.css # # Instruction for bsd.subdir.mk to not to process SUBDIR directive. # It is not necessary since doc.docbook.mk do it too. # NO_SUBDIR= YES # # Index generation # .if defined(GEN_INDEX) XSLTPROCOPTS+= --param generate.index "1" .endif # ------------------------------------------------------------------------ # # Look at ${FORMATS} and work out which documents need to be generated. # It is assumed that the HTML transformation will always create a file # called index.html, and that for every other transformation the name # of the generated file is ${DOC}.format. # # ${_docs} will be set to a list of all documents that must be made # up to date. # # ${CLEANFILES} is a list of files that should be removed by the "clean" # target. ${COMPRESS_EXT:S/^/${DOC}.${_cf}.&/ takes the COMPRESS_EXT # var, and prepends the filename to each listed extension, building a # second list of files with the compressed extensions added. # # Note: ".for _curformat in ${KNOWN_FORMATS}" is used several times in # this file. I know they could have been rolled together in to one, much # larger, loop. However, that would have made things more complicated # for a newcomer to this file to unravel and understand, and a syntax # error in the loop would have affected the entire # build/compress/install process, instead of just one of them, making it # more difficult to debug. # # Note: It is the aim of this file that *all* the targets be available, # not just those appropriate to the current ${FORMATS} and # ${INSTALL_COMPRESSED} values. # # For example, if FORMATS=html and INSTALL_COMPRESSED=gz you could still # type # # make book.rtf.bz2 # # and it will do the right thing. Or # # make install-rtf.bz2 # # for that matter. But don't expect "make clean" to work if the FORMATS # and INSTALL_COMPRESSED variables are wrong. # .if ${.OBJDIR} != ${.CURDIR} LOCAL_CSS_SHEET= ${.OBJDIR}/${CSS_SHEET:T} .else LOCAL_CSS_SHEET= ${CSS_SHEET:T} .endif CLEANFILES+= ${DOC}.parsed.xml ${DOC}.parsed.print.xml .for _curformat in ${FORMATS} _cf=${_curformat} .if ${_cf} == "html-split" _docs+= index.html HTML.manifest ln*.html CLEANFILES+= $$([ -f HTML.manifest ] && ${XARGS} < HTML.manifest) \ HTML.manifest ln*.html CLEANFILES+= PLIST.${_curformat} .else _docs+= ${DOC}.${_curformat} CLEANFILES+= ${DOC}.${_curformat} CLEANFILES+= PLIST.${_curformat} .if ${_cf} == "html-split.tar" CLEANFILES+= $$([ -f HTML.manifest ] && ${XARGS} < HTML.manifest) \ HTML.manifest ln*.html .elif ${_cf} == "epub" CLEANFILES+= ${DOC}.epub mimetype CLEANDIRS+= META-INF OEBPS .elif ${_cf} == "html.tar" CLEANFILES+= ${DOC}.html .elif ${_cf} == "txt" CLEANFILES+= ${DOC}.html-text .elif ${_cf} == "dvi" CLEANFILES+= ${DOC}.aux ${DOC}.log ${DOC}.out ${DOC}.tex ${DOC}.tex-tmp .elif ${_cf} == "rtf" CLEANFILES+= ${DOC}.rtf-nopng .elif ${_cf} == "tex" CLEANFILES+= ${DOC}.aux ${DOC}.log .elif ${_cf} == "ps" CLEANFILES+= ${DOC}.aux ${DOC}.dvi ${DOC}.log ${DOC}.out ${DOC}.tex-ps \ ${DOC}.tex ${DOC}.tex-tmp ${DOC}.fo .for _curimage in ${LOCAL_IMAGES_EPS:M*share*} CLEANFILES+= ${_curimage:T} ${_curimage:H:T}/${_curimage:T} .endfor .elif ${_cf} == "pdf" CLEANFILES+= ${DOC}.aux ${DOC}.dvi ${DOC}.log ${DOC}.out ${DOC}.tex-pdf ${DOC}.tex-pdf-tmp \ ${DOC}.tex ${DOC}.fo .for _curimage in ${LOCAL_IMAGES_EPS:M*share*} CLEANFILES+= ${_curimage:T} ${_curimage:H:T}/${_curimage:T} .endfor .elif ${_cf} == "pdb" _docs+= ${.CURDIR:T}.pdb CLEANFILES+= ${.CURDIR:T}.pdb .endif .endif .if (${LOCAL_CSS_SHEET} != ${CSS_SHEET}) && \ (${_cf} == "html-split" || ${_cf} == "html-split.tar" || \ ${_cf} == "html" || ${_cf} == "html.tar" || ${_cf} == "txt") CLEANFILES+= ${LOCAL_CSS_SHEET} .endif .if !defined(WITH_INLINE_LEGALNOTICE) || empty(WITH_INLINE_LEGALNOTICE) && \ (${_cf} == "html-split" || ${_cf} == "html-split.tar" || \ ${_cf} == "html" || ${_cf} == "html.tar" || ${_cf} == "txt") .endif .endfor # _curformat in ${FORMATS} # # # Build a list of install-${format}.${compress_format} targets to be # by "make install". Also, add ${DOC}.${format}.${compress_format} to # ${_docs} and ${CLEANFILES} so they get built/cleaned by "all" and # "clean". # .if defined(INSTALL_COMPRESSED) && !empty(INSTALL_COMPRESSED) .for _curformat in ${FORMATS} _cf=${_curformat} .for _curcomp in ${INSTALL_COMPRESSED} .if ${_cf} != "html-split" && ${_cf} != "html" && ${_cf} != "epub" _curinst+= install-${_curformat}.${_curcomp} _docs+= ${DOC}.${_curformat}.${_curcomp} CLEANFILES+= ${DOC}.${_curformat}.${_curcomp} .if ${_cf} == "pdb" _docs+= ${.CURDIR:T}.${_curformat}.${_curcomp} CLEANFILES+= ${.CURDIR:T}.${_curformat}.${_curcomp} .endif .endif .endfor .endfor .endif .MAIN: all all: ${SRCS} ${_docs} .if defined(SCHEMATRONS) .for sch in ${SCHEMATRONS} schxslts+= ${sch:T}.xsl CLEANFILES+= ${sch:T}.xsl ${sch:T}.xsl: ${sch} ${XSLTPROC} --param allow-foreign "true" ${XSLSCH} ${.ALLSRC} > ${.TARGET} .endfor .endif # Parsed XML ------------------------------------------------------- ${DOC}.parsed.xml: ${SRCS} ${XMLLINT} --nonet --noent --valid --dropdtd --xinclude ${MASTERDOC} > ${.TARGET} .if defined(PROFILING) @${ECHO} "==> Profiling" ${XSLTPROC} ${PROFILING} ${XSLPROF} ${.TARGET}.tmp > ${.TARGET} .else ${SED} 's|@@URL_RELPREFIX@@|http://www.FreeBSD.org|g' < ${.TARGET} > ${DOC}.parsed.print.xml ${SED} -i '' 's|@@URL_RELPREFIX@@|../../../..|g' ${.TARGET} .endif # XHTML ------------------------------------------------------------- index.html: ${DOC}.parsed.xml ${LOCAL_IMAGES_LIB} ${LOCAL_IMAGES_PNG} \ ${HTML_SPLIT_INDEX} ${LOCAL_CSS_SHEET} ${XSLTPROC} ${XSLTPROCOPTS} ${XSLXHTMLCHUNK} ${DOC}.parsed.xml ${DOC}.html: ${DOC}.parsed.xml ${LOCAL_IMAGES_LIB} ${LOCAL_IMAGES_PNG} \ ${LOCAL_CSS_SHEET} ${XSLTPROC} ${XSLTPROCOPTS} ${XSLXHTML} ${DOC}.parsed.xml > ${.TARGET} ${DOC}.html-split.tar: HTML.manifest ${LOCAL_IMAGES_LIB} \ ${LOCAL_IMAGES_PNG} ${LOCAL_CSS_SHEET} ${TAR} cf ${.TARGET} $$(${XARGS} < HTML.manifest) \ ${LOCAL_IMAGES_LIB} ${IMAGES_PNG:N*share*} ${CSS_SHEET:T} .for _curimage in ${IMAGES_PNG:M*share*} ${TAR} rf ${.TARGET} -C ${IMAGES_EN_DIR}/${DOC}s/${.CURDIR:T} ${_curimage:S|${IMAGES_EN_DIR}/${DOC}s/${.CURDIR:T}/||} .endfor ${DOC}.html.tar: ${DOC}.html ${LOCAL_IMAGES_LIB} \ ${LOCAL_IMAGES_PNG} ${LOCAL_CSS_SHEET} ${TAR} cf ${.TARGET} ${DOC}.html \ ${LOCAL_IMAGES_LIB} ${IMAGES_PNG:N*share*} ${CSS_SHEET:T} .for _curimage in ${IMAGES_PNG:M*share*} ${TAR} rf ${.TARGET} -C ${IMAGES_EN_DIR}/${DOC}s/${.CURDIR:T} ${_curimage:S|${IMAGES_EN_DIR}/${DOC}s/${.CURDIR:T}/||} .endfor # EPUB ------------------------------------------------------------- ${DOC}.epub: ${DOC}.parsed.xml ${LOCAL_IMAGES_LIB} ${LOCAL_IMAGES_PNG} \ ${CSS_SHEET} ${XSLTPROC} ${XSLTPROCOPTS} ${XSLEPUB} ${DOC}.parsed.xml ${ECHO} "application/epub+zip" > mimetype ${CP} ${CSS_SHEET} OEBPS/ .if defined(LOCAL_IMAGES_LIB) || defined(LOCAL_IMAGES_PNG) ${CP} ${LOCAL_IMAGES_LIB} ${LOCAL_IMAGES_PNG} OEBPS/ .endif ${ZIP} ${ZIPOPTS} ${DOC}.epub mimetype ${ZIP} ${ZIPOPTS} -Dr ${DOC}.epub OEBPS META-INF # TXT -------------------------------------------------------------------- .if !target(${DOC}.txt) .if !defined(NO_PLAINTEXT) ${DOC}.txt: ${DOC}.html ${HTML2TXT} ${HTML2TXTOPTS} ${.ALLSRC} > ${.TARGET} .else ${DOC}.txt: ${TOUCH} ${.TARGET} .endif .endif # PDB -------------------------------------------------------------------- ${DOC}.pdb: ${DOC}.html ${LOCAL_IMAGES_LIB} ${LOCAL_IMAGES_PNG} ${HTML2PDB} ${HTML2PDBOPTS} ${DOC}.html ${.TARGET} ${.CURDIR:T}.pdb: ${DOC}.pdb ${LN} -f ${.ALLSRC} ${.TARGET} .if defined(INSTALL_COMPRESSED) && !empty(INSTALL_COMPRESSED) .for _curcomp in ${INSTALL_COMPRESSED} ${.CURDIR:T}.pdb.${_curcomp}: ${DOC}.pdb.${_curcomp} ${LN} -f ${.ALLSRC} ${.TARGET} .endfor .endif # PS/PDF/RTF ----------------------------------------------------------------- ${DOC}.fo: ${DOC}.xml ${LOCAL_IMAGES_LIB} ${LOCAL_IMAGES_PNG} ${DOC}.parsed.xml ${XSLTPROC} ${XSLTPROCOPTS} ${XSLFO} ${DOC}.parsed.print.xml > ${.TARGET} ${DOC}.pdf: ${DOC}.fo ${LOCAL_IMAGES_LIB} ${LOCAL_IMAGES_PNG} ${FOP} ${FOPOPTS} ${DOC}.fo ${.TARGET} ${DOC}.ps: ${DOC}.fo ${LOCAL_IMAGES_LIB} ${LOCAL_IMAGES_PNG} ${FOP} ${FOPOPTS} ${DOC}.fo ${.TARGET} ${DOC}.rtf: ${DOC}.fo ${LOCAL_IMAGES_LIB} ${LOCAL_IMAGES_PNG} ${FOP} ${FOPOPTS} ${DOC}.fo ${.TARGET} ${DOC}.tar: ${SRCS} ${LOCAL_IMAGES} ${LOCAL_CSS_SHEET} ${TAR} cf ${.TARGET} -C ${.CURDIR} ${SRCS} \ -C ${.OBJDIR} ${IMAGES} ${CSS_SHEET:T} # # Build targets for any formats we've missed that we don't handle. # .for _curformat in ${ALL_FORMATS} .if !target(${DOC}.${_curformat}) ${DOC}.${_curformat}: @${ECHO_CMD} \"${_curformat}\" is not a valid output format for this document. .endif .endfor # ------------------------------------------------------------------------ # # Validation targets # # # Lets you quickly check that the document conforms to the DTD without # having to convert it to any other formats # # # XXX: There is duplicated code below. In general, we want to see what # is actually run but when validation is executed, it is better to # silence the command invocation so that only error messages appear. # lint validate: ${SRCS} ${schxslts} @${ECHO} "==> Basic validation" @${XMLLINT} --nonet --noent --valid --dropdtd --xinclude ${MASTERDOC} > ${DOC}.parsed.xml .if defined(schxslts) @${ECHO} "==> Validating with Schematron constraints" .for sch in ${schxslts} @( out=`${XSLTPROC} ${sch} ${DOC}.parsed.xml`; \ if [ -n "$${out}" ]; then \ echo "$${out}" | ${GREP} -v '^ Validating with RELAX NG" + @${JING} -c ${DB5RNC} ${DOC}.parsed.xml .endif @${RM} -rf ${CLEANFILES} ${CLEANDIRS} ${DOC}.parsed.xml # ------------------------------------------------------------------------ # # Compress targets # # # The list of compression extensions this Makefile knows about. If you # add new compression schemes, add to this list (which is a list of # extensions, hence bz2, *not* bzip2) and extend the _PROG_COMPRESS_* # targets. # KNOWN_COMPRESS= gz bz2 zip # # You can't build suffix rules to do compression, since you can't # wildcard the source suffix. So these are defined .USE, to be tacked on # as dependencies of the compress-* targets. # _PROG_COMPRESS_gz: .USE ${GZIP} ${GZIPOPTS} < ${.ALLSRC} > ${.TARGET} _PROG_COMPRESS_bz2: .USE ${BZIP2} ${BZIP2OPTS} < ${.ALLSRC} > ${.TARGET} _PROG_COMPRESS_zip: .USE ${ZIP} ${ZIPOPTS} ${.TARGET} ${.ALLSRC} # # Build a list of targets for each compression scheme and output format. # Don't compress the html-split or html output format (because they need # to be rolled in to tar files first). # .for _curformat in ${KNOWN_FORMATS} _cf=${_curformat} .for _curcompress in ${KNOWN_COMPRESS} .if ${_cf} == "html-split" || ${_cf} == "html" ${DOC}.${_cf}.tar.${_curcompress}: ${DOC}.${_cf}.tar \ _PROG_COMPRESS_${_curcompress} .else ${DOC}.${_cf}.${_curcompress}: ${DOC}.${_cf} _PROG_COMPRESS_${_curcompress} .endif .endfor .endfor # # Build targets for any formats we've missed that we don't handle. # .for _curformat in ${ALL_FORMATS} .for _curcompress in ${KNOWN_COMPRESS} .if !target(${DOC}.${_curformat}.${_curcompress}) ${DOC}.${_curformat}.${_curcompress}: @${ECHO_CMD} \"${_curformat}.${_curcompress}\" is not a valid output format for this document. .endif .endfor .endfor # ------------------------------------------------------------------------ # # Install targets # # Build install-* targets, one per allowed value in FORMATS. Need to # build two specific targets; # # install-html-split - Handles multiple .html files being generated # from one source. Uses the HTML.manifest file # created by the stylesheets, which should list # each .html file that's been created. # # install-* - Every other format. The wildcard expands to # the other allowed formats, all of which should # generate just one file. # # "beforeinstall" and "afterinstall" are hooks in to this process. # Redefine them to do things before and after the files are installed, # respectively. populate_html_docs: .if exists(HTML.manifest) _html_docs!=${CAT} HTML.manifest .endif spellcheck-html-split: populate_html_docs .for _html_file in ${_html_docs} @echo "Spellcheck ${_html_file}" @${HTML2TXT} ${HTML2TXTOPTS} ${.CURDIR}/${_html_file} | ${ISPELL} ${ISPELLOPTS} .endfor spellcheck-html: .for _entry in ${_docs} @echo "Spellcheck ${_entry}" @${HTML2TXT} ${HTML2TXTOPTS} ${.CURDIR}/${_entry} | ${ISPELL} ${ISPELLOPTS} .endfor spellcheck-txt: .for _entry in ${_docs:M*.txt} @echo "Spellcheck ${_entry}" @ < ${.CURDIR}/${_entry} ${ISPELL} ${ISPELLOPTS} .endfor .for _curformat in ${FORMATS} .if !target(spellcheck-${_curformat}) spellcheck-${_curformat}: @echo "Spellcheck is not currently supported for the ${_curformat} format." .endif .endfor spellcheck: ${FORMATS:C/^/spellcheck-/} # # Build a list of install-format targets to be installed. These will be # dependencies for the "realinstall" target. # .if !defined(INSTALL_ONLY_COMPRESSED) || empty(INSTALL_ONLY_COMPRESSED) _curinst+= ${FORMATS:S/^/install-/g} .endif .if defined(NO_TEX) _curinst_filter+=N*dvi* N*tex* N*ps* N*pdf* .endif .if defined(NO_RTF) _curinst_filter+=N*rtf* .endif .if defined(NO_PLAINTEXT) _curinst_filter+=N*txt* .endif _cff!=${ECHO_CMD} "${_curinst_filter}" | ${SED} 's, ,:,g' .if !defined(_cff) || empty(_cff) realinstall: ${_curinst} .else .for i in ${_cff} realinstall: ${_curinst:$i} .endfor .endif .for _curformat in ${KNOWN_FORMATS} _cf=${_curformat} .if !target(install-${_cf}) .if ${_cf} == "html-split" install-${_curformat}: index.html .else install-${_curformat}: ${DOC}.${_curformat} .endif @[ -d ${DESTDIR} ] || ${MKDIR} -p ${DESTDIR} .if ${_cf} == "html-split" ${INSTALL_DOCS} $$(${XARGS} < HTML.manifest) ${DESTDIR} .else ${INSTALL_DOCS} ${.ALLSRC} ${DESTDIR} .endif .if (${_cf} == "html-split" || ${_cf} == "html") && !empty(LOCAL_CSS_SHEET) ${INSTALL_DOCS} ${LOCAL_CSS_SHEET} ${DESTDIR} .if ${_cf} == "html-split" @if [ -f ln*.html ]; then \ ${INSTALL_DOCS} ln*.html ${DESTDIR}; \ fi @if [ -f LEGALNOTICE.html ]; then \ ${INSTALL_DOCS} LEGALNOTICE.html ${DESTDIR}; \ fi @if [ -f trademarks.html ]; then \ ${INSTALL_DOCS} trademarks.html ${DESTDIR}; \ fi @if [ -f ${.OBJDIR}/${DOC}.ln ]; then \ cd ${DESTDIR}; sh ${.OBJDIR}/${DOC}.ln; \ fi .endif .for _curimage in ${IMAGES_LIB} @[ -d ${DESTDIR}/${LOCAL_IMAGES_LIB_DIR}/${_curimage:H} ] || \ ${MKDIR} -p ${DESTDIR}/${LOCAL_IMAGES_LIB_DIR}/${_curimage:H} ${INSTALL_DOCS} ${LOCAL_IMAGES_LIB_DIR}/${_curimage} \ ${DESTDIR}/${LOCAL_IMAGES_LIB_DIR}/${_curimage:H} .endfor # Install the images. First, loop over all the image names that contain a # directory separator, make the subdirectories, and install. Then loop over # the ones that don't contain a directory separator, and install them in the # top level. # Install at first images from /usr/share/images then localized ones # cause of a different origin path. .for _curimage in ${IMAGES_PNG:M*/*:M*share*} ${MKDIR} -p ${DESTDIR:H:H}/${_curimage:H:S|${IMAGES_EN_DIR}/||:S|${.CURDIR}||} ${INSTALL_DOCS} ${_curimage} ${DESTDIR:H:H}/${_curimage:H:S|${IMAGES_EN_DIR}/||:S|${.CURDIR}||} .endfor .for _curimage in ${IMAGES_PNG:M*/*:N*share*} ${MKDIR} -p ${DESTDIR}/${_curimage:H} ${INSTALL_DOCS} ${_curimage} ${DESTDIR}/${_curimage:H} .endfor .for _curimage in ${IMAGES_PNG:N*/*} ${INSTALL_DOCS} ${_curimage} ${DESTDIR}/${_curimage} .endfor .elif ${_cf} == "tex" || ${_cf} == "dvi" .for _curimage in ${IMAGES_EPS:M*/*} ${MKDIR} -p ${DESTDIR}/${_curimage:H:S|${IMAGES_EN_DIR}/||:S|${.CURDIR:T}/||} ${INSTALL_DOCS} ${_curimage} ${DESTDIR}/${_curimage:H:S|${IMAGES_EN_DIR}/||:S|${.CURDIR:T}/||} .endfor .for _curimage in ${IMAGES_EPS:N*/*} ${INSTALL_DOCS} ${_curimage} ${DESTDIR} .endfor .elif ${_cf} == "pdb" ${LN} -f ${DESTDIR}/${.ALLSRC} ${DESTDIR}/${.CURDIR:T}.${_curformat} .endif .if ${_cf} == "html-split" .for _compressext in ${KNOWN_COMPRESS} install-${_curformat}.tar.${_compressext}: ${DOC}.${_curformat}.tar.${_compressext} @[ -d ${DESTDIR} ] || ${MKDIR} -p ${DESTDIR} ${INSTALL_DOCS} ${.ALLSRC} ${DESTDIR} .endfor .else .for _compressext in ${KNOWN_COMPRESS} .if !target(install-${_curformat}.${_compressext}) install-${_curformat}.${_compressext}: ${DOC}.${_curformat}.${_compressext} @[ -d ${DESTDIR} ] || ${MKDIR} -p ${DESTDIR} ${INSTALL_DOCS} ${.ALLSRC} ${DESTDIR} .if ${_cf} == "pdb" ${LN} -f ${DESTDIR}/${.ALLSRC} \ ${DESTDIR}/${.CURDIR:T}.${_curformat}.${_compressext} .endif .endif .endfor .endif .endif .endfor # # Build install- targets for any formats we've missed that we don't handle. # .for _curformat in ${ALL_FORMATS} .if !target(install-${_curformat}) install-${_curformat}: @${ECHO_CMD} \"${_curformat}\" is not a valid output format for this document. .for _compressext in ${KNOWN_COMPRESS} install-${_curformat}.${_compressext}: @${ECHO_CMD} \"${_curformat}.${_compressext}\" is not a valid output format for this document. .endfor .endif .endfor # ------------------------------------------------------------------------ # # Package building # # # realpackage is what is called in each subdirectory when a package # target is called, or, rather, package calls realpackage in each # subdirectory as it goes. # # packagelist returns the list of targets that would be called during # package building. # realpackage: ${FORMATS:S/^/package-/} packagelist: @${ECHO_CMD} ${FORMATS:S/^/package-/} # # Build a list of package targets for each output target. Each package # target depends on the corresponding install target running. # .if defined(BZIP2_PACKAGE) PKG_SUFFIX= tbz .else PKG_SUFFIX= tgz .endif PKGDOCPFX!= realpath ${DOC_PREFIX} .for _curformat in ${KNOWN_FORMATS} __curformat=${_curformat} ${PACKAGES}/${.CURDIR:T}.${LANGCODE}.${_curformat}.${PKG_SUFFIX}: ${MKDIR} -p ${.OBJDIR}/pkg; \ (cd ${.CURDIR} && \ ${MAKE} FORMATS=${_curformat} \ DOCDIR=${.OBJDIR}/pkg \ ${PKGMAKEFLAGS} \ install); \ PKGSRCDIR=${.OBJDIR}/pkg/${.CURDIR:S/${PKGDOCPFX}\///}; \ /bin/ls -1 $$PKGSRCDIR > ${.OBJDIR}/PLIST.${_curformat}; \ ${PKG_CREATE} -v -f ${.OBJDIR}/PLIST.${_curformat} \ -p ${DESTDIR} -s $$PKGSRCDIR \ -c -"FDP ${.CURDIR:T} ${_curformat} package" \ -d -"FDP ${.CURDIR:T} ${_curformat} package" ${.TARGET} || \ (${RM} -fr ${.TARGET} PLIST.${_curformat} && false); \ ${RM} -rf ${.OBJDIR}/pkg .if !defined(_cff) || empty(_cff) package-${_curformat}: ${PACKAGES}/${.CURDIR:T}.${LANGCODE}.${_curformat}.${PKG_SUFFIX} .else .for i in ${_cff} .if !empty(__curformat:$i) package-${_curformat}: ${PACKAGES}/${.CURDIR:T}.${LANGCODE}.${_curformat}.${PKG_SUFFIX} .else package-${_curformat}: .endif .endfor .endif .endfor .if ${LOCAL_CSS_SHEET} != ${CSS_SHEET} ${LOCAL_CSS_SHEET}: ${CSS_SHEET} ${RM} -f ${.TARGET} ${CAT} ${.ALLSRC} > ${.TARGET} .if defined(CSS_SHEET_ADDITIONS) ${CAT} ${.CURDIR}/${CSS_SHEET_ADDITIONS} >> ${.TARGET} .endif .endif Index: projects/db5/share/xml/freebsd50.rnc =================================================================== --- projects/db5/share/xml/freebsd50.rnc (nonexistent) +++ projects/db5/share/xml/freebsd50.rnc (revision 42133) @@ -0,0 +1,63 @@ +default namespace db = "http://docbook.org/ns/docbook" + +# $FreeBSD$ + +# ====================================================================== + +include "/usr/local/share/xml/docbook/5.0/rng/docbook.rnc" inherit = db { + + # XXX: trademark not allowed in lineannotation in normal DocBook 5.0 + db.lineannotation = + element lineannotation { db.lineannotation.attlist, (db._text | db.trademark)* } + + # XXX: trademark not allowed in application in normal DocBook 5.0 + db.application = + element application { db.application.attlist, (db._text | db.trademark)* } + + # XXX: trademark not allowed in contrib in normal DocBook 5.0 + db.contrib = + element contrib { db.contrib.attlist, (db._text | db.trademark)* } + + # XXX: email not allowed in attribution in normal DocBook 5.0 + db.attribution = + element attribution { + db.attribution.attlist, + (db._text + | db.person + | db.personname + | db.citetitle + | db.citation + | db.email )* + } + + # FreeBSD extension: add buildtarget element to allowed inlines + db.extension.inlines = db.buildtarget + | db.revnumber +# | db.trademark + + + # FreeBSD extension: edition and releasetype profiling attributes + db.effectivity.attributes = + db.arch.attribute? + & db.audience.attribute? + & db.condition.attribute? + & db.conformance.attribute? + & db.os.attribute? + & db.revision.attribute? + & db.security.attribute? + & db.userlevel.attribute? + & db.vendor.attribute? + & db.wordsize.attribute? + & db.edition.attribute? + & db.releasetype.attribute? +} + +# FreeBSD extension: buildtarget for make targets +db.buildtarget = element buildtarget { (text | db.replaceable)* } + +# FreeBSD extension: profiling attribute for edition (online, print) +db.edition.attribute = attribute edition { text } + +# FreeBSD extension: profiling attribute for release type (release, +# current, snapshot) +db.releasetype.attribute = attribute releasetype { text } Property changes on: projects/db5/share/xml/freebsd50.rnc ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property