Make build/install /usr/obj prefix clean.
Also fix several minor bugs here, such as leftover files not being deleted after 'make clean'. PR: docs/31131 Submitted by: Cyrille Lefevre <clefevre@citeweb.net>
This commit is contained in:
parent
4957cc2b7f
commit
f92319a1b1
Notes:
svn2git
2020-12-08 03:00:23 +00:00
svn path=/head/; revision=11066
28
Makefile
28
Makefile
|
@ -1,4 +1,4 @@
|
||||||
# $FreeBSD: doc/Makefile,v 1.20 2000/09/21 20:48:16 ben Exp $
|
# $FreeBSD$
|
||||||
#
|
#
|
||||||
# The user can override the default list of languages to build and install
|
# The user can override the default list of languages to build and install
|
||||||
# with the DOC_LANG variable.
|
# with the DOC_LANG variable.
|
||||||
|
@ -17,26 +17,32 @@ SUBDIR+= zh_TW.Big5
|
||||||
|
|
||||||
DOC_PREFIX?= ${.CURDIR}
|
DOC_PREFIX?= ${.CURDIR}
|
||||||
|
|
||||||
|
SUP?= ${PREFIX}/bin/cvsup
|
||||||
|
SUPFLAGS?= -g -L 2 -P -
|
||||||
.if defined(SUPHOST)
|
.if defined(SUPHOST)
|
||||||
SUPFLAGS+= -h ${SUPHOST}
|
SUPFLAGS+= -h ${SUPHOST}
|
||||||
.endif
|
.endif
|
||||||
|
|
||||||
|
CVS?= /usr/bin/cvs
|
||||||
|
CVSFLAGS?= -q
|
||||||
|
|
||||||
update:
|
update:
|
||||||
.if defined(SUP_UPDATE)
|
.if defined(SUP_UPDATE)
|
||||||
.if !defined(DOCSUPFILE)
|
.if !defined(DOCSUPFILE)
|
||||||
@echo "Error: Please define DOCSUPFILE before doing make update."
|
@${ECHO_CMD} "Error: Please define DOCSUPFILE before doing make update."
|
||||||
@exit 1
|
@exit 1
|
||||||
.endif
|
.endif
|
||||||
@echo "--------------------------------------------------------------"
|
@${ECHODIR} "--------------------------------------------------------------"
|
||||||
@echo ">>> Running ${SUP}"
|
@${ECHODIR} ">>> Running ${SUP}"
|
||||||
@echo "--------------------------------------------------------------"
|
@${ECHODIR} "--------------------------------------------------------------"
|
||||||
@${SUP} ${SUPFLAGS} ${DOCSUPFILE}
|
@${SUP} ${SUPFLAGS} ${DOCSUPFILE}
|
||||||
.elif defined(CVS_UPDATE)
|
.elif defined(CVS_UPDATE)
|
||||||
@echo "--------------------------------------------------------------"
|
@${ECHODIR} "--------------------------------------------------------------"
|
||||||
@echo ">>> Updating ${.CURDIR} from cvs repository" ${CVSROOT}
|
@${ECHODIR} ">>> Updating ${.CURDIR} from cvs repository" ${CVSROOT}
|
||||||
@echo "--------------------------------------------------------------"
|
@${ECHODIR} "--------------------------------------------------------------"
|
||||||
cd ${.CURDIR}; cvs -q update -P -d
|
cd ${.CURDIR}; ${CVS} ${CVSFLAGS} update -P -d
|
||||||
.else
|
.else
|
||||||
@echo "Error: Please define either SUP_UPDATE or CVS_UPDATE first."
|
@${ECHO_CMD} "Error: Please define either SUP_UPDATE or CVS_UPDATE first."
|
||||||
.endif
|
.endif
|
||||||
|
|
||||||
.include "${DOC_PREFIX}/share/mk/doc.subdir.mk"
|
.include "${DOC_PREFIX}/share/mk/doc.project.mk"
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#
|
#
|
||||||
# $FreeBSD: doc/share/mk/doc.docbook.mk,v 1.50 2001/09/17 09:45:01 murray Exp $
|
# $FreeBSD$
|
||||||
#
|
#
|
||||||
# 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.
|
||||||
|
@ -118,16 +118,25 @@ LANGUAGECATALOG=${DOC_PREFIX}/${LANGCODE}/share/sgml/catalog
|
||||||
|
|
||||||
DOCBOOKCATALOG= ${PREFIX}/share/sgml/docbook/catalog
|
DOCBOOKCATALOG= ${PREFIX}/share/sgml/docbook/catalog
|
||||||
DSSSLCATALOG= ${PREFIX}/share/sgml/docbook/dsssl/modular/catalog
|
DSSSLCATALOG= ${PREFIX}/share/sgml/docbook/dsssl/modular/catalog
|
||||||
|
COLLATEINDEX= ${PREFIX}/share/sgml/docbook/dsssl/modular/bin/collateindex.pl
|
||||||
|
|
||||||
IMAGES_LIB?=
|
IMAGES_LIB?=
|
||||||
|
|
||||||
JADEOPTS= ${JADEFLAGS} ${SGMLFLAGS} -c ${LANGUAGECATALOG} -c ${FREEBSDCATALOG} -c ${DSSSLCATALOG} -c ${DOCBOOKCATALOG} -c ${JADECATALOG} ${EXTRA_CATALOGS:S/^/-c /g}
|
CATALOGS= -c ${LANGUAGECATALOG} -c ${FREEBSDCATALOG} \
|
||||||
|
-c ${DSSSLCATALOG} -c ${DOCBOOKCATALOG} \
|
||||||
|
-c ${JADECATALOG} ${EXTRA_CATALOGS:S/^/-c /g}
|
||||||
|
SGMLFLAGS+= -D ${CANONICALOBJDIR}
|
||||||
|
JADEOPTS= ${JADEFLAGS} ${SGMLFLAGS} ${CATALOGS}
|
||||||
|
|
||||||
KNOWN_FORMATS= html html.tar 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
|
||||||
|
|
||||||
CSS_SHEET?= ${DOC_PREFIX}/share/misc/docbook.css
|
CSS_SHEET?= ${DOC_PREFIX}/share/misc/docbook.css
|
||||||
|
PDFTEX_DEF?= ${DOC_PREFIX}/share/web2c/pdftex.def
|
||||||
|
|
||||||
PRINTOPTS?= -ioutput.print
|
HTMLOPTS?= -ioutput.html -d ${DSLHTML} ${HTMLFLAGS}
|
||||||
|
|
||||||
|
PRINTOPTS?= -ioutput.print -d ${DSLPRINT} ${PRINTFLAGS}
|
||||||
|
|
||||||
.if defined(BOOK_OUTPUT)
|
.if defined(BOOK_OUTPUT)
|
||||||
NICE_HEADERS=1
|
NICE_HEADERS=1
|
||||||
|
@ -155,6 +164,33 @@ PRINTOPTS+= -V minimal-section-labels
|
||||||
TEXCMDS+= \tracingstats=${TRACE}
|
TEXCMDS+= \tracingstats=${TRACE}
|
||||||
.endif
|
.endif
|
||||||
|
|
||||||
|
PERL?= /usr/bin/perl
|
||||||
|
PKG_CREATE?= /usr/sbin/pkg_create
|
||||||
|
SORT?= /usr/bin/sort
|
||||||
|
TAR?= /usr/bin/tar
|
||||||
|
TOUCH?= /usr/bin/touch
|
||||||
|
XARGS?= /usr/bin/xargs
|
||||||
|
|
||||||
|
TEX?= ${PREFIX}/bin/tex
|
||||||
|
PDFTEX?= ${PREFIX}/bin/pdftex
|
||||||
|
TIDY?= ${PREFIX}/bin/tidy
|
||||||
|
TIDYFLAGS?= -i -m -f /dev/null
|
||||||
|
HTML2TXT?= ${PREFIX}/bin/links
|
||||||
|
HTML2TXTFLAGS?= -dump
|
||||||
|
HTML2PDB?= ${PREFIX}/bin/iSiloBSD
|
||||||
|
HTML2PDBFLAGS?= -y -d0 -Idef
|
||||||
|
DVIPS?= ${PREFIX}/bin/dvips
|
||||||
|
.if defined(PAPERSIZE)
|
||||||
|
DVIPSFLAGS?= -t ${PAPERSIZE:L}
|
||||||
|
.endif
|
||||||
|
|
||||||
|
GZIP?= -9
|
||||||
|
GZIP_CMD?= gzip -qf ${GZIP}
|
||||||
|
BZIP2?= -9
|
||||||
|
BZIP2_CMD?= bzip2 -qf ${BZIP2}
|
||||||
|
ZIP?= -9
|
||||||
|
ZIP_CMD?= ${PREFIX}/bin/zip -j ${ZIP}
|
||||||
|
|
||||||
# ------------------------------------------------------------------------
|
# ------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
# Look at ${FORMATS} and work out which documents need to be generated.
|
# Look at ${FORMATS} and work out which documents need to be generated.
|
||||||
|
@ -197,60 +233,61 @@ TEXCMDS+= \tracingstats=${TRACE}
|
||||||
# and INSTALL_COMPRESSED variables are wrong.
|
# and INSTALL_COMPRESSED variables are wrong.
|
||||||
#
|
#
|
||||||
|
|
||||||
|
.if ${.OBJDIR} != ${.CURDIR}
|
||||||
|
LOCAL_CSS_SHEET= ${.OBJDIR}/${CSS_SHEET:T}
|
||||||
|
.else
|
||||||
|
LOCAL_CSS_SHEET= ${CSS_SHEET:T}
|
||||||
|
.endif
|
||||||
|
|
||||||
.for _curformat in ${FORMATS}
|
.for _curformat in ${FORMATS}
|
||||||
_cf=${_curformat}
|
_cf=${_curformat}
|
||||||
|
|
||||||
.if ${_cf} == "html-split"
|
.if ${_cf} == "html-split"
|
||||||
_docs+= index.html HTML.manifest ln*.html
|
_docs+= index.html HTML.manifest ln*.html
|
||||||
CLEANFILES+= `[ -f HTML.manifest ] && xargs < HTML.manifest` HTML.manifest ln*.html
|
CLEANFILES+= $$([ -f HTML.manifest ] && ${XARGS} < HTML.manifest) \
|
||||||
CLEANFILES+= docbook.css
|
HTML.manifest ln*.html
|
||||||
|
CLEANFILES+= PLIST.${_curformat}
|
||||||
|
|
||||||
.elif ${_cf} == "html-split.tar"
|
.else
|
||||||
_docs+= ${DOC}.html-split.tar
|
_docs+= ${DOC}.${_curformat}
|
||||||
CLEANFILES+= `[ -f HTML.manifest ] && xargs < HTML.manifest` HTML.manifest ln*.html
|
CLEANFILES+= ${DOC}.${_curformat}
|
||||||
CLEANFILES+= ${DOC}.html-split.tar
|
CLEANFILES+= PLIST.${_curformat}
|
||||||
CLEANFILES+= docbook.css
|
|
||||||
|
|
||||||
.elif ${_cf} == "html"
|
.if ${_cf} == "html-split.tar"
|
||||||
_docs+= ${DOC}.html
|
CLEANFILES+= $$([ -f HTML.manifest ] && ${XARGS} < HTML.manifest) \
|
||||||
CLEANFILES+= ${DOC}.html
|
HTML.manifest ln*.html
|
||||||
CLEANFILES+= docbook.css
|
|
||||||
|
|
||||||
.elif ${_cf} == "html.tar"
|
.elif ${_cf} == "html.tar"
|
||||||
_docs+= ${DOC}.html.tar
|
CLEANFILES+= ${DOC}.html
|
||||||
CLEANFILES+= ${DOC}.html ${DOC}.html.tar
|
|
||||||
CLEANFILES+= docbook.css
|
|
||||||
|
|
||||||
.elif ${_cf} == "txt"
|
.elif ${_cf} == "txt"
|
||||||
_docs+= ${DOC}.txt
|
CLEANFILES+= ${DOC}.html-text
|
||||||
CLEANFILES+= ${DOC}.html ${DOC}.txt ${DOC}.html-text
|
|
||||||
CLEANFILES+= docbook.css
|
|
||||||
|
|
||||||
.elif ${_cf} == "dvi"
|
.elif ${_cf} == "dvi"
|
||||||
_docs+= ${DOC}.dvi
|
CLEANFILES+= ${DOC}.aux ${DOC}.log ${DOC}.tex
|
||||||
CLEANFILES+= ${DOC}.aux ${DOC}.dvi ${DOC}.log ${DOC}.tex
|
|
||||||
|
.elif ${_cf} == "tex"
|
||||||
|
CLEANFILES+= ${DOC}.aux ${DOC}.log
|
||||||
|
|
||||||
.elif ${_cf} == "ps"
|
.elif ${_cf} == "ps"
|
||||||
_docs+= ${DOC}.ps
|
CLEANFILES+= ${DOC}.aux ${DOC}.dvi ${DOC}.log ${DOC}.tex-ps
|
||||||
CLEANFILES+= ${DOC}.aux ${DOC}.dvi ${DOC}.log ${DOC}.tex-ps ${DOC}.ps
|
|
||||||
|
|
||||||
.elif ${_cf} == "pdf"
|
.elif ${_cf} == "pdf"
|
||||||
_docs+= ${DOC}.pdf
|
CLEANFILES+= ${DOC}.aux ${DOC}.dvi ${DOC}.log ${DOC}.out ${DOC}.tex-pdf
|
||||||
CLEANFILES+= ${DOC}.aux ${DOC}.dvi ${DOC}.log ${DOC}.out ${DOC}.tex-pdf ${DOC}.pdf
|
|
||||||
|
|
||||||
.elif ${_cf} == "rtf"
|
|
||||||
_docs+= ${DOC}.rtf
|
|
||||||
CLEANFILES+= ${DOC}.rtf
|
|
||||||
|
|
||||||
.elif ${_cf} == "tar"
|
|
||||||
_docs+= ${DOC}.tar
|
|
||||||
CLEANFILES+= ${DOC}.tar
|
|
||||||
|
|
||||||
.elif ${_cf} == "pdb"
|
.elif ${_cf} == "pdb"
|
||||||
_docs+= ${DOC}.pdb ${.CURDIR:T}.pdb
|
_docs+= ${.CURDIR:T}.pdb
|
||||||
CLEANFILES+= ${DOC}.pdb ${.CURDIR:T}.pdb
|
CLEANFILES+= ${.CURDIR:T}.pdb
|
||||||
|
|
||||||
.endif
|
.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
|
||||||
|
|
||||||
.endfor
|
.endfor
|
||||||
|
|
||||||
|
|
||||||
|
@ -265,10 +302,17 @@ CLEANFILES+= ${DOC}.pdb ${.CURDIR:T}.pdb
|
||||||
.for _curformat in ${FORMATS}
|
.for _curformat in ${FORMATS}
|
||||||
_cf=${_curformat}
|
_cf=${_curformat}
|
||||||
.for _curcomp in ${INSTALL_COMPRESSED}
|
.for _curcomp in ${INSTALL_COMPRESSED}
|
||||||
|
|
||||||
.if ${_cf} != "html-split" && ${_cf} != "html"
|
.if ${_cf} != "html-split" && ${_cf} != "html"
|
||||||
_curinst+= install-${_curformat}.${_curcomp}
|
_curinst+= install-${_curformat}.${_curcomp}
|
||||||
_docs+= ${DOC}.${_curformat}.${_curcomp}
|
_docs+= ${DOC}.${_curformat}.${_curcomp}
|
||||||
CLEANFILES+= ${DOC}.${_curformat}.${_curcomp}
|
CLEANFILES+= ${DOC}.${_curformat}.${_curcomp}
|
||||||
|
|
||||||
|
.if ${_cf} == "pdb"
|
||||||
|
_docs+= ${.CURDIR:T}.${_curformat}.${_curcomp}
|
||||||
|
CLEANFILES+= ${.CURDIR:T}.${_curformat}.${_curcomp}
|
||||||
|
|
||||||
|
.endif
|
||||||
.endif
|
.endif
|
||||||
.endfor
|
.endfor
|
||||||
.endfor
|
.endfor
|
||||||
|
@ -289,53 +333,62 @@ PRINT_INDEX?= print.index
|
||||||
CLEANFILES+= ${HTML_SPLIT_INDEX} ${HTML_INDEX} ${PRINT_INDEX}
|
CLEANFILES+= ${HTML_SPLIT_INDEX} ${HTML_INDEX} ${PRINT_INDEX}
|
||||||
.endif
|
.endif
|
||||||
|
|
||||||
.for _curimage in ${IMAGES_LIB}
|
|
||||||
LOCAL_IMAGES_LIB += ${LOCAL_IMAGES_LIB_DIR}/${_curimage}
|
|
||||||
.endfor
|
|
||||||
|
|
||||||
.MAIN: all
|
.MAIN: all
|
||||||
|
|
||||||
all: ${_docs}
|
all: ${_docs}
|
||||||
|
|
||||||
index.html HTML.manifest: ${SRCS} ${LOCAL_IMAGES_LIB} ${IMAGES_PNG} ${INDEX_SGML} ${HTML_SPLIT_INDEX} docbook.css
|
index.html HTML.manifest: ${SRCS} ${LOCAL_IMAGES_LIB} ${LOCAL_IMAGES_PNG} \
|
||||||
${JADE} -V html-manifest -ioutput.html -ioutput.html.images ${JADEOPTS} -d ${DSLHTML} -t sgml ${MASTERDOC}
|
${INDEX_SGML} ${HTML_SPLIT_INDEX} ${LOCAL_CSS_SHEET}
|
||||||
|
${JADE} -V html-manifest ${HTMLOPTS} -ioutput.html.images \
|
||||||
|
${JADEOPTS} -t sgml ${MASTERDOC}
|
||||||
.if !defined(NO_TIDY)
|
.if !defined(NO_TIDY)
|
||||||
-tidy -i -m -f /dev/null ${TIDYFLAGS} `xargs < HTML.manifest`
|
-${TIDY} ${TIDYFLAGS} $$(${XARGS} < HTML.manifest)
|
||||||
.endif
|
.endif
|
||||||
|
|
||||||
${DOC}.html: ${SRCS} ${LOCAL_IMAGES_LIB} ${IMAGES_PNG} ${INDEX_SGML} ${HTML_INDEX} docbook.css
|
${DOC}.html: ${SRCS} ${LOCAL_IMAGES_LIB} ${LOCAL_IMAGES_PNG} \
|
||||||
${JADE} -ioutput.html -ioutput.html.images -V nochunks ${JADEOPTS} -d ${DSLHTML} -t sgml ${MASTERDOC} > ${.TARGET} || (rm -f ${.TARGET} && false)
|
${INDEX_SGML} ${HTML_INDEX} ${LOCAL_CSS_SHEET}
|
||||||
|
${JADE} -V nochunks ${HTMLOPTS} -ioutput.html.images \
|
||||||
|
${JADEOPTS} -t sgml ${MASTERDOC} > ${.TARGET} || \
|
||||||
|
(${RM} -f ${.TARGET} && false)
|
||||||
.if !defined(NO_TIDY)
|
.if !defined(NO_TIDY)
|
||||||
-tidy -i -m -f /dev/null ${TIDYFLAGS} ${.TARGET}
|
-${TIDY} ${TIDYFLAGS} ${.TARGET}
|
||||||
.endif
|
.endif
|
||||||
|
|
||||||
# Special target to produce HTML with no images in it.
|
# Special target to produce HTML with no images in it.
|
||||||
${DOC}.html-text: ${SRCS} ${INDEX_SGML} ${HTML_INDEX}
|
${DOC}.html-text: ${SRCS} ${INDEX_SGML} ${HTML_INDEX}
|
||||||
${JADE} -ioutput.html -V nochunks ${JADEOPTS} -d ${DSLHTML} -t sgml ${MASTERDOC} > ${.TARGET} || (rm -f ${.TARGET} && false)
|
${JADE} -V nochunks ${HTMLOPTS} \
|
||||||
|
${JADEOPTS} -t sgml ${MASTERDOC} > ${.TARGET} || \
|
||||||
|
(${RM} -f ${.TARGET} && false)
|
||||||
|
|
||||||
${DOC}.html-split.tar: HTML.manifest
|
${DOC}.html-split.tar: HTML.manifest ${LOCAL_IMAGES_LIB} \
|
||||||
tar cf ${.TARGET} `xargs < HTML.manifest`
|
${LOCAL_IMAGES_PNG} ${LOCAL_CSS_SHEET}
|
||||||
tar uf ${.TARGET} ${IMAGES_LIB}
|
${TAR} cf ${.TARGET} $$(${XARGS} < HTML.manifest) \
|
||||||
tar uf ${.TARGET} ${IMAGES_PNG}
|
${LOCAL_IMAGES_LIB} ${IMAGES_PNG} ${CSS_SHEET:T}
|
||||||
tar uf ${.TARGET} docbook.css
|
|
||||||
|
|
||||||
${DOC}.html.tar: ${DOC}.html
|
${DOC}.html.tar: ${DOC}.html ${LOCAL_IMAGES_LIB} \
|
||||||
tar cf ${.TARGET} ${DOC}.html
|
${LOCAL_IMAGES_PNG} ${LOCAL_CSS_SHEET}
|
||||||
tar uf ${.TARGET} ${LOCAL_IMAGES_LIB}
|
${TAR} cf ${.TARGET} ${DOC}.html \
|
||||||
tar uf ${.TARGET} ${IMAGES_PNG}
|
${LOCAL_IMAGES_LIB} ${IMAGES_PNG} ${CSS_SHEET:T}
|
||||||
tar uf ${.TARGET} docbook.css
|
|
||||||
|
|
||||||
${DOC}.txt: ${DOC}.html-text
|
${DOC}.txt: ${DOC}.html-text
|
||||||
links -dump ${.ALLSRC} > ${.TARGET}
|
${HTML2TXT} ${HTML2TXTFLAGS} ${.ALLSRC} > ${.TARGET}
|
||||||
|
|
||||||
${DOC}.pdb: ${DOC}.html
|
${DOC}.pdb: ${DOC}.html ${LOCAL_IMAGES_LIB} ${LOCAL_IMAGES_PNG}
|
||||||
iSiloBSD -y -d0 -Idef ${DOC}.html ${DOC}.pdb
|
${HTML2PDB} ${HTML2PDBFLAGS} ${DOC}.html ${.TARGET}
|
||||||
|
|
||||||
${.CURDIR:T}.pdb: ${DOC}.pdb
|
${.CURDIR:T}.pdb: ${DOC}.pdb
|
||||||
ln -f ${DOC}.pdb ${.CURDIR}.pdb
|
${LN} -f ${.ALLSRC} ${.TARGET}
|
||||||
|
|
||||||
${DOC}.rtf: ${SRCS}
|
.if defined(INSTALL_COMPRESSED) && !empty(INSTALL_COMPRESSED)
|
||||||
${JADE} -Vrtf-backend ${PRINTOPTS} ${JADEOPTS} -d ${DSLPRINT} -t rtf -o ${.TARGET} ${MASTERDOC}
|
.for _curcomp in ${INSTALL_COMPRESSED}
|
||||||
|
${.CURDIR:T}.pdb.${_curcomp}: ${DOC}.pdb.${_curcomp}
|
||||||
|
${LN} -f ${.ALLSRC} ${.TARGET}
|
||||||
|
.endfor
|
||||||
|
.endif
|
||||||
|
|
||||||
|
${DOC}.rtf: ${SRCS} ${LOCAL_IMAGES_EPS}
|
||||||
|
${JADE} -V rtf-backend ${PRINTOPTS} \
|
||||||
|
${JADEOPTS} -t rtf -o ${.TARGET} ${MASTERDOC}
|
||||||
|
|
||||||
#
|
#
|
||||||
# This sucks, but there's no way round it. The PS and PDF formats need
|
# This sucks, but there's no way round it. The PS and PDF formats need
|
||||||
|
@ -344,34 +397,51 @@ ${DOC}.rtf: ${SRCS}
|
||||||
# format, which will then lead on to a different .dvi file as well.
|
# format, which will then lead on to a different .dvi file as well.
|
||||||
#
|
#
|
||||||
|
|
||||||
${DOC}.tex-ps: ${SRCS} ${IMAGES_EPS} ${INDEX_SGML} ${PRINT_INDEX}
|
${DOC}.tex: ${SRCS} ${LOCAL_IMAGES_EPS} ${INDEX_SGML} ${PRINT_INDEX}
|
||||||
${JADE} -Vtex-backend ${PRINTOPTS} ${JADEOPTS} -d ${DSLPRINT} -t tex -o ${.TARGET} ${MASTERDOC}
|
${JADE} -V tex-backend ${PRINTOPTS} \
|
||||||
|
${JADEOPTS} -t tex -o ${.TARGET} ${MASTERDOC}
|
||||||
|
|
||||||
|
${DOC}.tex-ps: ${DOC}.tex
|
||||||
|
${LN} -f ${.ALLSRC} ${.TARGET}
|
||||||
|
|
||||||
${DOC}.tex-pdf: ${SRCS} ${IMAGES_PDF} ${INDEX_SGML} ${PRINT_INDEX}
|
${DOC}.tex-pdf: ${SRCS} ${IMAGES_PDF} ${INDEX_SGML} ${PRINT_INDEX}
|
||||||
cp ${DOC_PREFIX}/share/web2c/pdftex.def ${.TARGET}
|
${CP} -p ${PDFTEX_DEF} ${.TARGET}
|
||||||
${JADE} -Vtex-backend ${PRINTOPTS} -ioutput.print.pdf ${JADEOPTS} -d ${DSLPRINT} -t tex -o /dev/stdout ${MASTERDOC} >> ${.TARGET}
|
${JADE} -V tex-backend ${PRINTOPTS} -ioutput.print.pdf \
|
||||||
|
${JADEOPTS} -t tex -o /dev/stdout ${MASTERDOC} >> ${.TARGET}
|
||||||
|
|
||||||
${DOC}.dvi: ${DOC}.tex-ps
|
${DOC}.dvi: ${DOC}.tex ${LOCAL_IMAGES_EPS}
|
||||||
@echo "==> TeX pass 1/3"
|
@${ECHO} "==> TeX pass 1/3"
|
||||||
-tex "&jadetex" '${TEXCMDS} \nonstopmode\input{${.ALLSRC}}'
|
-${TEX} "&jadetex" '${TEXCMDS} \nonstopmode\input{${DOC}.tex}'
|
||||||
@echo "==> TeX pass 2/3"
|
@${ECHO} "==> TeX pass 2/3"
|
||||||
-tex "&jadetex" '${TEXCMDS} \nonstopmode\input{${.ALLSRC}}'
|
-${TEX} "&jadetex" '${TEXCMDS} \nonstopmode\input{${DOC}.tex}'
|
||||||
@echo "==> TeX pass 3/3"
|
@${ECHO} "==> TeX pass 3/3"
|
||||||
-tex "&jadetex" '${TEXCMDS} \nonstopmode\input{${.ALLSRC}}'
|
-${TEX} "&jadetex" '${TEXCMDS} \nonstopmode\input{${DOC}.tex}'
|
||||||
|
|
||||||
${DOC}.pdf: ${DOC}.tex-pdf
|
${DOC}.pdf: ${DOC}.tex-pdf ${IMAGES_PDF}
|
||||||
@echo "==> PDFTeX pass 1/3"
|
@${ECHO} "==> PDFTeX pass 1/3"
|
||||||
-pdftex "&pdfjadetex" '\nonstopmode\input{${.ALLSRC}}'
|
-${PDFTEX} "&pdfjadetex" '\nonstopmode\input{${DOC}.dvi}'
|
||||||
@echo "==> PDFTeX pass 2/3"
|
@${ECHO} "==> PDFTeX pass 2/3"
|
||||||
-pdftex "&pdfjadetex" '\nonstopmode\input{${.ALLSRC}}'
|
-${PDFTEX} "&pdfjadetex" '\nonstopmode\input{${DOC}.dvi}'
|
||||||
@echo "==> PDFTeX pass 3/3"
|
@${ECHO} "==> PDFTeX pass 3/3"
|
||||||
pdftex "&pdfjadetex" '\nonstopmode\input{${.ALLSRC}}'
|
${PDFTEX} "&pdfjadetex" '\nonstopmode\input{${DOC}.dvi}'
|
||||||
|
|
||||||
${DOC}.ps: ${DOC}.dvi
|
${DOC}.ps: ${DOC}.dvi
|
||||||
dvips -o ${.TARGET} ${.ALLSRC}
|
${DVIPS} -o ${.TARGET} ${.ALLSRC}
|
||||||
|
|
||||||
|
${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
|
||||||
|
|
||||||
${DOC}.tar: ${SRCS}
|
|
||||||
tar cf ${.TARGET} ${.ALLSRC}
|
|
||||||
|
|
||||||
# ------------------------------------------------------------------------
|
# ------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
|
@ -384,7 +454,8 @@ ${DOC}.tar: ${SRCS}
|
||||||
#
|
#
|
||||||
|
|
||||||
lint validate:
|
lint validate:
|
||||||
${NSGMLS} ${SGMLFLAGS} -s -c ${LANGUAGECATALOG} -c ${FREEBSDCATALOG} -c ${DSSSLCATALOG} -c ${DOCBOOKCATALOG} -c ${JADECATALOG} ${EXTRA_CATALOGS:S/^/-c /g} ${MASTERDOC}
|
${NSGMLS} -s ${SGMLFLAGS} ${CATALOGS} ${MASTERDOC}
|
||||||
|
|
||||||
|
|
||||||
# ------------------------------------------------------------------------
|
# ------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
|
@ -400,22 +471,25 @@ lint validate:
|
||||||
|
|
||||||
.if defined(GEN_INDEX)
|
.if defined(GEN_INDEX)
|
||||||
${INDEX_SGML}:
|
${INDEX_SGML}:
|
||||||
perl ${PREFIX}/share/sgml/docbook/dsssl/modular/bin/collateindex.pl -N -o ${.TARGET}
|
${PERL} ${COLLATEINDEX} -N -o ${.TARGET}
|
||||||
.else
|
.else
|
||||||
${INDEX_SGML}:
|
${INDEX_SGML}:
|
||||||
touch ${.TARGET}
|
${TOUCH} ${.TARGET}
|
||||||
.endif
|
.endif
|
||||||
|
|
||||||
${HTML_INDEX}:
|
${HTML_INDEX}:
|
||||||
${JADE} -V html-index -ioutput.html -ioutput.html.images -V nochunks ${JADEOPTS} -d ${DSLHTML} -t sgml ${MASTERDOC} > /dev/null
|
${JADE} -V html-index -V nochunks ${HTMLOPTS} -ioutput.html.images \
|
||||||
perl ${PREFIX}/share/sgml/docbook/dsssl/modular/bin/collateindex.pl -g -o ${INDEX_SGML} ${.TARGET}
|
${JADEOPTS} -t sgml ${MASTERDOC} > /dev/null
|
||||||
|
${PERL} ${COLLATEINDEX} -g -o ${INDEX_SGML} ${.TARGET}
|
||||||
|
|
||||||
${HTML_SPLIT_INDEX}:
|
${HTML_SPLIT_INDEX}:
|
||||||
${JADE} -V html-index -ioutput.html -ioutput.html.images ${JADEOPTS} -d ${DSLHTML} -t sgml ${MASTERDOC} > /dev/null
|
${JADE} -V html-index ${HTMLOPTS} -ioutput.html.images \
|
||||||
perl ${PREFIX}/share/sgml/docbook/dsssl/modular/bin/collateindex.pl -g -o ${INDEX_SGML} ${.TARGET}
|
${JADEOPTS} -t sgml ${MASTERDOC} > /dev/null
|
||||||
|
${PERL} ${COLLATEINDEX} -g -o ${INDEX_SGML} ${.TARGET}
|
||||||
|
|
||||||
${PRINT_INDEX}: ${HTML_INDEX}
|
${PRINT_INDEX}: ${HTML_INDEX}
|
||||||
mv ${HTML_INDEX} ${.TARGET}
|
${CP} -p ${HTML_INDEX} ${.TARGET}
|
||||||
|
|
||||||
|
|
||||||
# ------------------------------------------------------------------------
|
# ------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
|
@ -438,13 +512,13 @@ KNOWN_COMPRESS= gz bz2 zip
|
||||||
#
|
#
|
||||||
|
|
||||||
_PROG_COMPRESS_gz: .USE
|
_PROG_COMPRESS_gz: .USE
|
||||||
gzip -9 -c ${.ALLSRC} > ${.TARGET}
|
${GZIP_CMD} < ${.ALLSRC} > ${.TARGET}
|
||||||
|
|
||||||
_PROG_COMPRESS_bz2: .USE
|
_PROG_COMPRESS_bz2: .USE
|
||||||
bzip2 -9 -c ${.ALLSRC} > ${.TARGET}
|
${BZIP2_CMD} < ${.ALLSRC} > ${.TARGET}
|
||||||
|
|
||||||
_PROG_COMPRESS_zip: .USE
|
_PROG_COMPRESS_zip: .USE
|
||||||
zip -j -9 ${.TARGET} ${.ALLSRC}
|
${ZIP_CMD} ${.TARGET} ${.ALLSRC}
|
||||||
|
|
||||||
#
|
#
|
||||||
# Build a list of targets for each compression scheme and output format.
|
# Build a list of targets for each compression scheme and output format.
|
||||||
|
@ -455,13 +529,27 @@ _PROG_COMPRESS_zip: .USE
|
||||||
_cf=${_curformat}
|
_cf=${_curformat}
|
||||||
.for _curcompress in ${KNOWN_COMPRESS}
|
.for _curcompress in ${KNOWN_COMPRESS}
|
||||||
.if ${_cf} == "html-split" || ${_cf} == "html"
|
.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}
|
||||||
.endif
|
.endif
|
||||||
.endfor
|
.endfor
|
||||||
.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
|
# Install targets
|
||||||
|
@ -497,70 +585,92 @@ realinstall: ${_curinst}
|
||||||
_cf=${_curformat}
|
_cf=${_curformat}
|
||||||
.if !target(install-${_cf})
|
.if !target(install-${_cf})
|
||||||
.if ${_cf} == "html-split"
|
.if ${_cf} == "html-split"
|
||||||
install-${_cf}: index.html
|
install-${_curformat}: index.html
|
||||||
@[ -d ${DESTDIR} ] || mkdir -p ${DESTDIR}
|
.else
|
||||||
${INSTALL_DOCS} `xargs < HTML.manifest` ${DESTDIR}
|
install-${_curformat}: ${DOC}.${_curformat}
|
||||||
${INSTALL_DOCS} docbook.css ${DESTDIR}
|
.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 \
|
@if [ -f ln*.html ]; then \
|
||||||
${INSTALL_DOCS} ln*.html ${DESTDIR}; \
|
${INSTALL_DOCS} ln*.html ${DESTDIR}; \
|
||||||
fi
|
fi
|
||||||
@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
|
||||||
|
.endif
|
||||||
.for _curimage in ${IMAGES_LIB}
|
.for _curimage in ${IMAGES_LIB}
|
||||||
@[ -d ${DESTDIR}/${LOCAL_IMAGES_LIB_DIR}/${_curimage:H} ] || mkdir -p ${DESTDIR}/${LOCAL_IMAGES_LIB_DIR}/${_curimage:H}
|
@[ -d ${DESTDIR}/${LOCAL_IMAGES_LIB_DIR}/${_curimage:H} ] || \
|
||||||
${INSTALL_DOCS} ${LOCAL_IMAGES_LIB_DIR}/${_curimage} ${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
|
.endfor
|
||||||
# Install the images. First, loop over all the image names that contain a
|
# Install the images. First, loop over all the image names that contain a
|
||||||
# directory seperator, make the subdirectories, and install. Then loop over
|
# directory seperator, make the subdirectories, and install. Then loop over
|
||||||
# the ones that don't contain a directory separator, and install them in the
|
# the ones that don't contain a directory separator, and install them in the
|
||||||
# top level.
|
# top level.
|
||||||
.for _curimage in ${IMAGES_PNG:M*/*}
|
.for _curimage in ${IMAGES_PNG:M*/*}
|
||||||
mkdir -p ${DESTDIR}/${_curimage:H}
|
${MKDIR} -p ${DESTDIR}/${_curimage:H}
|
||||||
${INSTALL_DOCS} ${_curimage} ${DESTDIR}/${_curimage:H}
|
${INSTALL_DOCS} ${_curimage} ${DESTDIR}/${_curimage:H}
|
||||||
.endfor
|
.endfor
|
||||||
.for _curimage in ${IMAGES_PNG:N*/*}
|
.for _curimage in ${IMAGES_PNG:N*/*}
|
||||||
${INSTALL_DOCS} ${_curimage} ${DESTDIR}
|
${INSTALL_DOCS} ${_curimage} ${DESTDIR}
|
||||||
.endfor
|
.endfor
|
||||||
|
.elif ${_cf} == "tex" || ${_cf} == "dvi"
|
||||||
|
.for _curimage in ${IMAGES_EPS:M*/*}
|
||||||
|
${MKDIR} -p ${DESTDIR}/${_curimage:H}
|
||||||
|
${INSTALL_DOCS} ${_curimage} ${DESTDIR}/${_curimage:H}
|
||||||
|
.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}
|
.for _compressext in ${KNOWN_COMPRESS}
|
||||||
install-${_cf}.tar.${_compressext}: ${DOC}.${_cf}.tar.${_compressext}
|
install-${_curformat}.tar.${_compressext}: ${DOC}.${_curformat}.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}
|
|
||||||
${INSTALL_DOCS} docbook.css ${DESTDIR}
|
|
||||||
.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 seperator, make the subdirectories, and install. Then loop over
|
|
||||||
# the ones that don't contain a directory separator, and install them in the
|
|
||||||
# top level.
|
|
||||||
.for _curimage in ${IMAGES_PNG:M*/*}
|
|
||||||
mkdir -p ${DESTDIR}/${_curimage:H}
|
|
||||||
${INSTALL_DOCS} ${_curimage} ${DESTDIR}/${_curimage:H}
|
|
||||||
.endfor
|
|
||||||
.for _curimage in ${IMAGES_PNG:N*/*}
|
|
||||||
${INSTALL_DOCS} ${_curimage} ${DESTDIR}
|
|
||||||
.endfor
|
|
||||||
.else
|
.else
|
||||||
install-${_cf}: ${DOC}.${_cf}
|
.for _compressext in ${KNOWN_COMPRESS}
|
||||||
@[ -d ${DESTDIR} ] || mkdir -p ${DESTDIR}
|
install-${_curformat}.${_compressext}: ${DOC}.${_curformat}.${_compressext}
|
||||||
|
@[ -d ${DESTDIR} ] || ${MKDIR} -p ${DESTDIR}
|
||||||
${INSTALL_DOCS} ${.ALLSRC} ${DESTDIR}
|
${INSTALL_DOCS} ${.ALLSRC} ${DESTDIR}
|
||||||
|
.if ${_cf} == "pdb"
|
||||||
|
${LN} -f ${DESTDIR}/${.ALLSRC} \
|
||||||
|
${DESTDIR}/${.CURDIR:T}.${_curformat}.${_compressext}
|
||||||
|
.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}
|
.for _compressext in ${KNOWN_COMPRESS}
|
||||||
install-${_cf}.${_compressext}: ${DOC}.${_cf}.${_compressext}
|
install-${_curformat}.${_compressext}:
|
||||||
@[ -d ${DESTDIR} ] || mkdir -p ${DESTDIR}
|
@${ECHO_CMD} \"${_curformat}.${_compressext}\" is not a valid output format for this document.
|
||||||
${INSTALL_DOCS} ${.ALLSRC} ${DESTDIR}
|
|
||||||
.endfor
|
.endfor
|
||||||
.endif
|
.endif
|
||||||
.endif
|
|
||||||
.endfor
|
.endfor
|
||||||
|
|
||||||
|
|
||||||
# ------------------------------------------------------------------------
|
# ------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
# Package building
|
# Package building
|
||||||
|
@ -577,7 +687,7 @@ install-${_cf}.${_compressext}: ${DOC}.${_cf}.${_compressext}
|
||||||
|
|
||||||
realpackage: ${FORMATS:S/^/package-/}
|
realpackage: ${FORMATS:S/^/package-/}
|
||||||
packagelist:
|
packagelist:
|
||||||
@echo ${FORMATS:S/^/package-/}
|
@${ECHO_CMD} ${FORMATS:S/^/package-/}
|
||||||
|
|
||||||
#
|
#
|
||||||
# Build a list of package targets for each output target. Each package
|
# Build a list of package targets for each output target. Each package
|
||||||
|
@ -587,30 +697,31 @@ packagelist:
|
||||||
.for _curformat in ${KNOWN_FORMATS}
|
.for _curformat in ${KNOWN_FORMATS}
|
||||||
_cf=${_curformat}
|
_cf=${_curformat}
|
||||||
.if ${_cf} == "html-split"
|
.if ${_cf} == "html-split"
|
||||||
package-${_curformat}: index.html
|
PLIST.${_curformat}: index.html
|
||||||
@cp HTML.manifest PLIST
|
@${SORT} HTML.manifest > PLIST.${_curformat}
|
||||||
@for images_png in ${IMAGES_PNG}; do \
|
|
||||||
echo $$images_png >> PLIST; \
|
|
||||||
echo docbook.css >> PLIST; \
|
|
||||||
done
|
|
||||||
.elif ${_cf} == "html"
|
|
||||||
package-${curformat}: ${DOC}.html
|
|
||||||
@echo ${DOC}.${_curformat} > PLIST
|
|
||||||
@for images_png in ${IMAGES_PNG}; do \
|
|
||||||
echo $$images_png >> PLIST; \
|
|
||||||
echo docbook.css >> PLIST; \
|
|
||||||
done
|
|
||||||
.else
|
.else
|
||||||
package-${_curformat}: ${DOC}.${_curformat}
|
PLIST.${_curformat}: ${DOC}.${_curformat}
|
||||||
@echo ${DOC}.${_curformat} > PLIST
|
@${ECHO_CMD} ${DOC}.${_curformat} > PLIST.${_curformat}
|
||||||
@for lib_images in ${IMAGES_LIB}; do \
|
|
||||||
echo $$lib_images >> PLIST; \
|
|
||||||
done
|
|
||||||
.endif
|
.endif
|
||||||
@pkg_create -v -c -"FDP ${.CURDIR:T} ${_curformat} package" \
|
.if (${_cf} == "html-split" || ${_cf} == "html") && \
|
||||||
-d -"FDP ${.CURDIR:T} ${_curformat} package" -f PLIST \
|
(!empty(LOCAL_IMAGES_LIB) || !empty(IMAGES_PNG) || !empty(CSS_SHEET))
|
||||||
-p ${DESTDIR} -s . ${PACKAGES}/${.CURDIR:T}.${LANGCODE}.${_curformat}.tgz
|
@${ECHO_CMD} ${LOCAL_IMAGES_LIB} ${IMAGES_PNG} ${LOCAL_CSS_SHEET} | \
|
||||||
|
${XARGS} -n1 >> PLIST.${_curformat}
|
||||||
|
.elif (${_cf} == "tex" || ${_cf} == "dvi") && !empty(IMAGES_EPS)
|
||||||
|
@${ECHO_CMD} ${IMAGES_EPS} | ${XARGS} -n1 >> PLIST.${_curformat}
|
||||||
|
.elif ${_cf} == "pdb"
|
||||||
|
@${ECHO_CMD} ${.CURDIR:T}.${_curformat} >> PLIST.${_curformat}
|
||||||
|
.endif
|
||||||
|
|
||||||
|
${PACKAGES}/${.CURDIR:T}.${LANGCODE}.${_curformat}.tgz: PLIST.${_cf}
|
||||||
|
@${PKG_CREATE} -v -f ${.ALLSRC} -p ${DESTDIR} -s ${.OBJDIR} \
|
||||||
|
-c -"FDP ${.CURDIR:T} ${_curformat} package" \
|
||||||
|
-d -"FDP ${.CURDIR:T} ${_curformat} package" ${.TARGET}
|
||||||
|
|
||||||
|
package-${_curformat}: ${PACKAGES}/${.CURDIR:T}.${LANGCODE}.${_curformat}.tgz
|
||||||
.endfor
|
.endfor
|
||||||
|
|
||||||
docbook.css: ${CSS_SHEET}
|
.if ${LOCAL_CSS_SHEET} != ${CSS_SHEET}
|
||||||
cp ${CSS_SHEET} ${.CURDIR}/docbook.css
|
${LOCAL_CSS_SHEET}: ${CSS_SHEET}
|
||||||
|
${CP} -p ${.ALLSRC} ${.TARGET}
|
||||||
|
.endif
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#
|
#
|
||||||
# $FreeBSD: doc/share/mk/doc.html.mk,v 1.7 2001/03/22 22:49:01 obrien Exp $
|
# $FreeBSD$
|
||||||
#
|
#
|
||||||
# This include file <doc.html.mk> handles building and installing of
|
# This include file <doc.html.mk> handles building and installing of
|
||||||
# HTML documentation in the FreeBSD Documentation Project.
|
# HTML documentation in the FreeBSD Documentation Project.
|
||||||
|
@ -56,34 +56,63 @@ OPENJADE= yes
|
||||||
.endif
|
.endif
|
||||||
|
|
||||||
.if defined(OPENJADE)
|
.if defined(OPENJADE)
|
||||||
NSGMLS?= onsgmls
|
NSGMLS?= ${PREFIX}/bin/onsgmls
|
||||||
SGMLNORM?= osgmlnorm
|
SGMLNORM?= ${PREFIX}/bin/osgmlnorm
|
||||||
.else
|
.else
|
||||||
NSGMLS?= nsgmls
|
NSGMLS?= ${PREFIX}/bin/nsgmls
|
||||||
SGMLNORM?= sgmlnorm
|
SGMLNORM?= ${PREFIX}/bin/sgmlnorm
|
||||||
.endif
|
.endif
|
||||||
|
|
||||||
|
PKG_CREATE?= /usr/sbin/pkg_create
|
||||||
|
TAR?= /usr/bin/tar
|
||||||
|
XARGS?= /usr/bin/xargs
|
||||||
|
|
||||||
|
TIDY?= ${PREFIX}/bin/tidy
|
||||||
|
TIDYFLAGS?= -i -m -f /dev/null
|
||||||
|
HTML2TXT?= ${PREFIX}/bin/links
|
||||||
|
HTML2TXTFLAGS?= -dump
|
||||||
|
HTML2PDB?= ${PREFIX}/bin/iSiloBSD
|
||||||
|
HTML2PDBFLAGS?= -y -d0 -Idef
|
||||||
|
|
||||||
|
GZIP?= -9
|
||||||
|
GZIP_CMD?= gzip -qf ${GZIP}
|
||||||
|
BZIP2?= -9
|
||||||
|
BZIP2_CMD?= bzip2 -qf ${BZIP2}
|
||||||
|
ZIP?= -9
|
||||||
|
ZIP_CMD?= ${PREFIX}/bin/zip -j ${ZIP}
|
||||||
|
|
||||||
|
|
||||||
# ------------------------------------------------------------------------
|
# ------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
|
|
||||||
|
.if ${.OBJDIR} != ${.CURDIR}
|
||||||
|
LOCAL_CSS_SHEET= ${.OBJDIR}/${CSS_SHEET:T}
|
||||||
|
.else
|
||||||
|
LOCAL_CSS_SHEET= ${CSS_SHEET:T}
|
||||||
|
.endif
|
||||||
|
|
||||||
.for _curformat in ${FORMATS}
|
.for _curformat in ${FORMATS}
|
||||||
_cf=${_curformat}
|
_cf=${_curformat}
|
||||||
.if ${_cf} == "html"
|
|
||||||
_docs+= ${DOC}.html
|
# Create a 'bogus' doc for any format we support or not. This is so
|
||||||
CLEANFILES+= ${DOC}.html
|
|
||||||
.elif ${_cf} == "txt"
|
|
||||||
_docs+= ${DOC}.txt
|
|
||||||
CLEANFILES+= ${DOC}.html ${DOC}.txt
|
|
||||||
.elif ${_cf} == "tar"
|
|
||||||
_docs+= ${DOC}.tar
|
|
||||||
.elif ${_cf} == "pdb"
|
|
||||||
_docs+= ${DOC}.pdb ${.CURDIR:T}.pdb
|
|
||||||
+CLEANFILES+= ${DOC}.pdb ${.CURDIR:T}.pdb
|
|
||||||
.else
|
|
||||||
# Create a 'bogus' doc for any other format we don't support. This is so
|
|
||||||
# that we can fake up a target for it later on, and this target can print
|
# that we can fake up a target for it later on, and this target can print
|
||||||
# the warning message about the unsupported format.
|
# the warning message about the unsupported format.
|
||||||
_docs+= ${DOC}.${_curformat}
|
_docs+= ${DOC}.${_curformat}
|
||||||
|
CLEANFILES+= ${DOC}.${_curformat}
|
||||||
|
CLEANFILES+= PLIST.${_curformat}
|
||||||
|
|
||||||
|
.if ${_cf} == "txt"
|
||||||
|
.if ${LOCAL_CSS_SHEET} != ${CSS_SHEET}
|
||||||
|
CLEANFILES+= ${LOCAL_CSS_SHEET}
|
||||||
|
.endif
|
||||||
|
|
||||||
|
.elif ${_cf} == "txt"
|
||||||
|
CLEANFILES+= ${DOC}.html
|
||||||
|
|
||||||
|
.elif ${_cf} == "pdb"
|
||||||
|
_docs+= ${.CURDIR:T}.pdb
|
||||||
|
CLEANFILES+= ${.CURDIR:T}.pdb
|
||||||
|
|
||||||
.endif
|
.endif
|
||||||
.endfor
|
.endfor
|
||||||
|
|
||||||
|
@ -98,40 +127,51 @@ _docs+= ${DOC}.${_curformat}
|
||||||
.for _curformat in ${FORMATS}
|
.for _curformat in ${FORMATS}
|
||||||
_cf=${_curformat}
|
_cf=${_curformat}
|
||||||
.for _curcomp in ${INSTALL_COMPRESSED}
|
.for _curcomp in ${INSTALL_COMPRESSED}
|
||||||
|
|
||||||
.if ${_cf} != "html-split"
|
.if ${_cf} != "html-split"
|
||||||
_curinst+= install-${_curformat}.${_curcomp}
|
_curinst+= install-${_curformat}.${_curcomp}
|
||||||
_docs+= ${DOC}.${_curformat}.${_curcomp}
|
_docs+= ${DOC}.${_curformat}.${_curcomp}
|
||||||
CLEANFILES+= ${DOC}.${_curformat}.${_curcomp}
|
CLEANFILES+= ${DOC}.${_curformat}.${_curcomp}
|
||||||
.endif
|
|
||||||
.endfor
|
|
||||||
.endfor
|
|
||||||
.endif
|
|
||||||
|
|
||||||
.for _curimage in ${IMAGES_LIB}
|
.if ${_cf} == "pdb"
|
||||||
LOCAL_IMAGES_LIB += ${LOCAL_IMAGES_LIB_DIR}/${_curimage}
|
_docs+= ${.CURDIR:T}.${_curformat}.${_curcomp}
|
||||||
.endfor
|
CLEANFILES+= ${.CURDIR:T}.${_curformat}.${_curcomp}
|
||||||
|
|
||||||
|
.endif
|
||||||
|
.endif
|
||||||
|
.endfor
|
||||||
|
.endfor
|
||||||
|
.endif
|
||||||
|
|
||||||
.MAIN: all
|
.MAIN: all
|
||||||
|
|
||||||
all: ${_docs}
|
all: ${_docs}
|
||||||
|
|
||||||
${DOC}.html: ${SRCS} ${LOCAL_IMAGES_LIB} ${IMAGES_PNG}
|
${DOC}.html: ${SRCS} ${LOCAL_IMAGES_LIB} ${LOCAL_IMAGES_PNG} ${LOCAL_CSS_SHEET}
|
||||||
${SGMLNORM} -c ${HTMLCATALOG} ${SRCS} > ${.TARGET}
|
${SGMLNORM} -c ${HTMLCATALOG} ${SRCS:S|^|${.CURDIR}/|} > ${.TARGET}
|
||||||
.if !defined(NO_TIDY)
|
.if !defined(NO_TIDY)
|
||||||
-tidy -i -m -f /dev/null ${TIDYFLAGS} ${.TARGET}
|
-${TIDY} ${TIDYFLAGS} ${.TARGET}
|
||||||
.endif
|
.endif
|
||||||
|
|
||||||
${DOC}.txt: ${DOC}.html
|
${DOC}.txt: ${DOC}.html
|
||||||
links -dump ${.ALLSRC} > ${.TARGET}
|
${HTML2TXT} ${HTML2TXTFLAGS} ${.ALLSRC} > ${.TARGET}
|
||||||
|
|
||||||
${DOC}.pdb: ${DOC}.html
|
${DOC}.pdb: ${DOC}.html ${LOCAL_IMAGES_LIB} ${LOCAL_IMAGES_PNG}
|
||||||
iSiloBSD -y -d0 -Idef ${DOC}.html ${DOC}.pdb
|
${HTML2PDB} ${HTML2PDBFLAGS} ${DOC}.html ${.TARGET}
|
||||||
|
|
||||||
${.CURDIR:T}.pdb: ${DOC}.pdb
|
${.CURDIR:T}.pdb: ${DOC}.pdb
|
||||||
ln -f ${DOC}.pdb ${.CURDIR}.pdb
|
${LN} -f ${.ALLSRC} ${.TARGET}
|
||||||
|
|
||||||
${DOC}.tar: ${SRCS}
|
.if defined(INSTALL_COMPRESSED) && !empty(INSTALL_COMPRESSED)
|
||||||
tar cf ${.TARGET} ${.ALLSRC}
|
.for _curcomp in ${INSTALL_COMPRESSED}
|
||||||
|
${.CURDIR:T}.pdb.${_curcomp}: ${DOC}.pdb.${_curcomp}
|
||||||
|
${LN} -f ${.ALLSRC} ${.TARGET}
|
||||||
|
.endfor
|
||||||
|
.endif
|
||||||
|
|
||||||
|
${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.
|
# Build targets for any formats we've missed that we don't handle.
|
||||||
|
@ -139,10 +179,11 @@ ${DOC}.tar: ${SRCS}
|
||||||
.for _curformat in ${ALL_FORMATS}
|
.for _curformat in ${ALL_FORMATS}
|
||||||
.if !target(${DOC}.${_curformat})
|
.if !target(${DOC}.${_curformat})
|
||||||
${DOC}.${_curformat}:
|
${DOC}.${_curformat}:
|
||||||
@echo \"${_curformat}\" is not a valid output format for this document.
|
@${ECHO_CMD} \"${_curformat}\" is not a valid output format for this document.
|
||||||
.endif
|
.endif
|
||||||
.endfor
|
.endfor
|
||||||
|
|
||||||
|
|
||||||
# ------------------------------------------------------------------------
|
# ------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
# Validation targets
|
# Validation targets
|
||||||
|
@ -156,6 +197,7 @@ ${DOC}.${_curformat}:
|
||||||
lint validate:
|
lint validate:
|
||||||
${NSGMLS} -s -c ${HTMLCATALOG} ${MASTERDOC}
|
${NSGMLS} -s -c ${HTMLCATALOG} ${MASTERDOC}
|
||||||
|
|
||||||
|
|
||||||
# ------------------------------------------------------------------------
|
# ------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
# Compress targets
|
# Compress targets
|
||||||
|
@ -177,13 +219,13 @@ KNOWN_COMPRESS= gz bz2 zip
|
||||||
#
|
#
|
||||||
|
|
||||||
_PROG_COMPRESS_gz: .USE
|
_PROG_COMPRESS_gz: .USE
|
||||||
gzip -9 -c ${.ALLSRC} > ${.TARGET}
|
${GZIP_CMD} < ${.ALLSRC} > ${.TARGET}
|
||||||
|
|
||||||
_PROG_COMPRESS_bz2: .USE
|
_PROG_COMPRESS_bz2: .USE
|
||||||
bzip2 -9 -c ${.ALLSRC} > ${.TARGET}
|
${BZIP2_CMD} < ${.ALLSRC} > ${.TARGET}
|
||||||
|
|
||||||
_PROG_COMPRESS_zip: .USE
|
_PROG_COMPRESS_zip: .USE
|
||||||
zip -j -9 ${.TARGET} ${.ALLSRC}
|
${ZIP_CMD} ${.TARGET} ${.ALLSRC}
|
||||||
|
|
||||||
#
|
#
|
||||||
# Build a list of targets for each compression scheme and output format.
|
# Build a list of targets for each compression scheme and output format.
|
||||||
|
@ -203,7 +245,7 @@ ${DOC}.${_cf}.${_curcompress}: ${DOC}.${_cf} _PROG_COMPRESS_${_curcompress}
|
||||||
.for _curcompress in ${KNOWN_COMPRESS}
|
.for _curcompress in ${KNOWN_COMPRESS}
|
||||||
.if !target(${DOC}.${_curformat}.${_curcompress})
|
.if !target(${DOC}.${_curformat}.${_curcompress})
|
||||||
${DOC}.${_curformat}.${_curcompress}:
|
${DOC}.${_curformat}.${_curcompress}:
|
||||||
@echo \"${_curformat}.${_curcompress}\" is not a valid output format for this document.
|
@${ECHO_CMD} \"${_curformat}.${_curcompress}\" is not a valid output format for this document.
|
||||||
.endif
|
.endif
|
||||||
.endfor
|
.endfor
|
||||||
.endfor
|
.endfor
|
||||||
|
@ -233,29 +275,36 @@ realinstall: ${_curinst}
|
||||||
.for _curformat in ${KNOWN_FORMATS}
|
.for _curformat in ${KNOWN_FORMATS}
|
||||||
_cf=${_curformat}
|
_cf=${_curformat}
|
||||||
.if !target(install-${_cf})
|
.if !target(install-${_cf})
|
||||||
install-${_cf}: ${DOC}.${_cf}
|
install-${_curformat}: ${DOC}.${_curformat}
|
||||||
@[ -d ${DESTDIR} ] || mkdir -p ${DESTDIR}
|
@[ -d ${DESTDIR} ] || ${MKDIR} -p ${DESTDIR}
|
||||||
${INSTALL_DOCS} ${.ALLSRC} ${DESTDIR}
|
${INSTALL_DOCS} ${.ALLSRC} ${DESTDIR}
|
||||||
|
.if !empty(CSS_SHEET)
|
||||||
${INSTALL_DOCS} ${CSS_SHEET} ${DESTDIR}
|
${INSTALL_DOCS} ${CSS_SHEET} ${DESTDIR}
|
||||||
|
.endif
|
||||||
.for _curimage in ${IMAGES_LIB}
|
.for _curimage in ${IMAGES_LIB}
|
||||||
@[ -d ${DESTDIR}/${LOCAL_IMAGES_LIB_DIR}/${_curimage:H} ] || mkdir -p ${DESTDIR}/${LOCAL_IMAGES_LIB_DIR}/${_curimage:H}
|
@[ -d ${DESTDIR}/${LOCAL_IMAGES_LIB_DIR}/${_curimage:H} ] || \
|
||||||
${INSTALL_DOCS} ${LOCAL_IMAGES_LIB_DIR}/${_curimage} ${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
|
.endfor
|
||||||
# Install the images. First, loop over all the image names that contain a
|
# Install the images. First, loop over all the image names that contain a
|
||||||
# directory seperator, make the subdirectories, and install. Then loop over
|
# directory seperator, make the subdirectories, and install. Then loop over
|
||||||
# the ones that don't contain a directory separator, and install them in the
|
# the ones that don't contain a directory separator, and install them in the
|
||||||
# top level.
|
# top level.
|
||||||
.for _curimage in ${IMAGES_PNG:M*/*}
|
.for _curimage in ${IMAGES_PNG:M*/*}
|
||||||
mkdir -p ${DESTDIR}/${_curimage:H}
|
${MKDIR} -p ${DESTDIR}/${_curimage:H}
|
||||||
${INSTALL_DOCS} ${_curimage} ${DESTDIR}/${_curimage:H}
|
${INSTALL_DOCS} ${.CURDIR}/${_curimage} ${DESTDIR}/${_curimage:H}
|
||||||
.endfor
|
.endfor
|
||||||
.for _curimage in ${IMAGES_PNG:N*/*}
|
.for _curimage in ${IMAGES_PNG:N*/*}
|
||||||
${INSTALL_DOCS} ${_curimage} ${DESTDIR}
|
${INSTALL_DOCS} ${.CURDIR}/${_curimage} ${DESTDIR}
|
||||||
.endfor
|
.endfor
|
||||||
|
.if ${_cf} == "pdb"
|
||||||
|
${LN} -f ${DESTDIR}/${.ALLSRC} ${DESTDIR}/${.CURDIR:T}.${_curformat}
|
||||||
|
.endif
|
||||||
|
|
||||||
.for _compressext in ${KNOWN_COMPRESS}
|
.for _compressext in ${KNOWN_COMPRESS}
|
||||||
install-${_cf}.${_compressext}: ${DOC}.${_cf}.${_compressext}
|
install-${_cf}.${_compressext}: ${DOC}.${_cf}.${_compressext}
|
||||||
@[ -d ${DESTDIR} ] || mkdir -p ${DESTDIR}
|
@[ -d ${DESTDIR} ] || ${MKDIR} -p ${DESTDIR}
|
||||||
${INSTALL_DOCS} ${.ALLSRC} ${DESTDIR}
|
${INSTALL_DOCS} ${.ALLSRC} ${DESTDIR}
|
||||||
.endfor
|
.endfor
|
||||||
.endif
|
.endif
|
||||||
|
@ -268,15 +317,16 @@ install-${_cf}.${_compressext}: ${DOC}.${_cf}.${_compressext}
|
||||||
.for _curformat in ${ALL_FORMATS}
|
.for _curformat in ${ALL_FORMATS}
|
||||||
.if !target(install-${_curformat})
|
.if !target(install-${_curformat})
|
||||||
install-${_curformat}:
|
install-${_curformat}:
|
||||||
@echo \"${_curformat}\" is not a valid output format for this document.
|
@${ECHO_CMD} \"${_curformat}\" is not a valid output format for this document.
|
||||||
|
|
||||||
.for _compressext in ${KNOWN_COMPRESS}
|
.for _compressext in ${KNOWN_COMPRESS}
|
||||||
install-${_curformat}.${_compressext}:
|
install-${_curformat}.${_compressext}:
|
||||||
@echo \"${_curformat}.${_compressext}\" is not a valid output format for this document.
|
@${ECHO_CMD} \"${_curformat}.${_compressext}\" is not a valid output format for this document.
|
||||||
.endfor
|
.endfor
|
||||||
.endif
|
.endif
|
||||||
.endfor
|
.endfor
|
||||||
|
|
||||||
|
|
||||||
# ------------------------------------------------------------------------
|
# ------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
# Package building
|
# Package building
|
||||||
|
@ -293,7 +343,7 @@ install-${_curformat}.${_compressext}:
|
||||||
|
|
||||||
realpackage: ${FORMATS:S/^/package-/}
|
realpackage: ${FORMATS:S/^/package-/}
|
||||||
packagelist:
|
packagelist:
|
||||||
@echo ${FORMATS:S/^/package-/}
|
@${ECHO_CMD} ${FORMATS:S/^/package-/}
|
||||||
|
|
||||||
#
|
#
|
||||||
# Build a list of package targets for each output target. Each package
|
# Build a list of package targets for each output target. Each package
|
||||||
|
@ -302,9 +352,36 @@ packagelist:
|
||||||
|
|
||||||
.for _curformat in ${KNOWN_FORMATS}
|
.for _curformat in ${KNOWN_FORMATS}
|
||||||
_cf=${_curformat}
|
_cf=${_curformat}
|
||||||
package-${_curformat}: install-${_curformat}
|
PLIST.${_curformat}: ${DOC}.${_curformat}
|
||||||
@echo ${DOC}.${_curformat} > PLIST
|
@${ECHO_CMD} ${DOC}.${_curformat} > PLIST.${_curformat}
|
||||||
@pkg_create -v -c -"FDP ${.CURDIR:T} ${_curformat} package" \
|
.if ${_cf} == "html" && \
|
||||||
-d -"FDP ${.CURDIR:T} ${_curformat} package" -f PLIST \
|
(!empty(LOCAL_IMAGES_LIB) || !empty(IMAGES_PNG) || !empty(CSS_SHEET))
|
||||||
-p ${DESTDIR} ${PACKAGES}/${.CURDIR:T}.${LANGCODE}.${_curformat}.tgz
|
@${ECHO_CMD} ${LOCAL_IMAGES_LIB} ${IMAGES_PNG} ${CSS_SHEET} | \
|
||||||
|
${XARGS} -n1 >> PLIST.${_curformat}
|
||||||
|
.elif ${_cf} == "pdb"
|
||||||
|
@${ECHO_CMD} ${.CURDIR:T}.${_curformat} >> PLIST.${_curformat}
|
||||||
|
.endif
|
||||||
|
|
||||||
|
${PACKAGES}/${.CURDIR:T}.${LANGCODE}.${_curformat}.tgz: PLIST.${_curformat}
|
||||||
|
@${PKG_CREATE} -v -f PLIST.${_curformat} -p ${DESTDIR} -s ${.OBJDIR} \
|
||||||
|
-c -"FDP ${.CURDIR:T} ${_curformat} package" \
|
||||||
|
-d -"FDP ${.CURDIR:T} ${_curformat} package" ${.TARGET}
|
||||||
|
|
||||||
|
package-${_curformat}: ${PACKAGES}/${.CURDIR:T}.${LANGCODE}.${_curformat}.tgz
|
||||||
.endfor
|
.endfor
|
||||||
|
|
||||||
|
#
|
||||||
|
# Build install- targets for any formats we've missed that we don't handle.
|
||||||
|
#
|
||||||
|
|
||||||
|
.for _curformat in ${ALL_FORMATS}
|
||||||
|
.if !target(package-${_curformat})
|
||||||
|
package-${_curformat}:
|
||||||
|
@${ECHO_CMD} \"${_curformat}\" is not a valid output format for this document.
|
||||||
|
.endif
|
||||||
|
.endfor
|
||||||
|
|
||||||
|
.if ${LOCAL_CSS_SHEET} != ${CSS_SHEET}
|
||||||
|
${LOCAL_CSS_SHEET}: ${CSS_SHEET}
|
||||||
|
${CP} -p ${.ALLSRC} ${.TARGET}
|
||||||
|
.endif
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#
|
#
|
||||||
# $FreeBSD: doc/share/mk/doc.images.mk,v 1.10 2001/07/13 12:09:59 nik Exp $
|
# $FreeBSD$
|
||||||
#
|
#
|
||||||
# This include file <doc.images.mk> handles image processing.
|
# This include file <doc.images.mk> handles image processing.
|
||||||
#
|
#
|
||||||
|
@ -47,14 +47,42 @@
|
||||||
# to PDF, and hopefully get better quality.
|
# to PDF, and hopefully get better quality.
|
||||||
#
|
#
|
||||||
|
|
||||||
IMAGES_GEN_PNG=${IMAGES:M*.eps:S/.eps$/.png/}
|
_IMAGES_PNG= ${IMAGES:M*.png}
|
||||||
IMAGES_GEN_EPS=${IMAGES:M*.png:S/.png$/.eps/}
|
_IMAGES_EPS= ${IMAGES:M*.eps}
|
||||||
IMAGES_GEN_PDF=${IMAGES:M*.eps:S/.eps$/.pdf/}
|
_IMAGES_SCR= ${IMAGES:M*.scr}
|
||||||
|
|
||||||
|
IMAGES_GEN_PNG= ${_IMAGES_EPS:S/.eps$/.png/}
|
||||||
|
IMAGES_GEN_EPS= ${_IMAGES_PNG:S/.png$/.eps/}
|
||||||
|
IMAGES_GEN_PDF= ${_IMAGES_EPS:S/.eps$/.pdf/}
|
||||||
|
IMAGES_SCR_PNG= ${_IMAGES_SCR:S/.scr$/.png/}
|
||||||
|
IMAGES_SCR_EPS= ${_IMAGES_SCR:S/.scr$/.eps/}
|
||||||
|
|
||||||
CLEANFILES+= ${IMAGES_GEN_PNG} ${IMAGES_GEN_EPS} ${IMAGES_GEN_PDF}
|
CLEANFILES+= ${IMAGES_GEN_PNG} ${IMAGES_GEN_EPS} ${IMAGES_GEN_PDF}
|
||||||
|
CLEANFILES+= ${IMAGES_SCR_PNG} ${IMAGES_SCR_EPS}
|
||||||
|
|
||||||
IMAGES_PNG=${IMAGES:M*.png} ${IMAGES_GEN_PNG} ${IMAGES:M*.scr:S/.scr$/.png/}
|
IMAGES_PNG= ${_IMAGES_PNG} ${IMAGES_GEN_PNG} ${IMAGES_SCR_PNG}
|
||||||
IMAGES_EPS=${IMAGES:M*.eps} ${IMAGES_GEN_EPS} ${IMAGES:M*.scr:S/.scr$/.eps/}
|
IMAGES_EPS= ${_IMAGES_EPS} ${IMAGES_GEN_EPS} ${IMAGES_SCR_EPS}
|
||||||
|
|
||||||
|
.if ${.OBJDIR} != ${.CURDIR}
|
||||||
|
LOCAL_IMAGES= ${IMAGES:S|^|${.OBJDIR}/|}
|
||||||
|
CLEANFILES+= ${LOCAL_IMAGES}
|
||||||
|
|
||||||
|
.if !empty(_IMAGES_PNG)
|
||||||
|
LOCAL_IMAGES_PNG= ${_IMAGES_PNG:S|^|${.OBJDIR}/|}
|
||||||
|
.endif
|
||||||
|
|
||||||
|
.if !empty(_IMAGES_EPS)
|
||||||
|
LOCAL_IMAGES_EPS= ${_IMAGES_EPS:S|^|${.OBJDIR}/|}
|
||||||
|
.endif
|
||||||
|
|
||||||
|
.else
|
||||||
|
LOCAL_IMAGES= ${IMAGES}
|
||||||
|
LOCAL_IMAGES_PNG= ${_IMAGES_PNG}
|
||||||
|
LOCAL_IMAGES_EPS= ${_IMAGES_EPS}
|
||||||
|
.endif
|
||||||
|
|
||||||
|
LOCAL_IMAGES_PNG+= ${IMAGES_GEN_PNG} ${IMAGES_SCR_PNG}
|
||||||
|
LOCAL_IMAGES_EPS+= ${IMAGES_GEN_EPS} ${IMAGES_SCR_EPS}
|
||||||
|
|
||||||
# The default resolution eps2png (82) assumes a 640x480 monitor, and is too
|
# The default resolution eps2png (82) assumes a 640x480 monitor, and is too
|
||||||
# low for the typical monitor in use today. The resolution of 100 looks
|
# low for the typical monitor in use today. The resolution of 100 looks
|
||||||
|
@ -67,13 +95,22 @@ EPS2PNG_RES?= 100
|
||||||
# then we can use them directly, and don't need to list them.
|
# then we can use them directly, and don't need to list them.
|
||||||
IMAGES_PDF=${IMAGES_GEN_PDF}
|
IMAGES_PDF=${IMAGES_GEN_PDF}
|
||||||
|
|
||||||
|
SCR2PNG?= ${PREFIX}/bin/scr2png
|
||||||
|
EPS2PNG?= ${PREFIX}/bin/peps
|
||||||
|
EPS2PNGFLAGS?= -p -r ${EPS2PNG_RES}
|
||||||
|
PNGTOPNM?= ${PREFIX}/bin/pngtopnm
|
||||||
|
PNMTOPS?= ${PREFIX}/bin/pnmtops
|
||||||
|
PNMTOPSFLAGS?= -noturn
|
||||||
|
EPSTOPDF?= ${PREFIX}/bin/epstopdf
|
||||||
|
|
||||||
# Use suffix rules to convert .scr files to .png files
|
# Use suffix rules to convert .scr files to .png files
|
||||||
.SUFFIXES: .scr .png .eps
|
.SUFFIXES: .scr .png .eps
|
||||||
|
|
||||||
.scr.png:
|
.scr.png:
|
||||||
scr2png < ${.IMPSRC} > ${.TARGET}
|
${SCR2PNG} < ${.IMPSRC} > ${.TARGET}
|
||||||
.scr.eps:
|
.scr.eps:
|
||||||
scr2png < ${.ALLSRC} | pngtopnm | pnmtops -noturn > ${.TARGET}
|
${SCR2PNG} < ${.ALLSRC} | ${PNGTOPNM} | \
|
||||||
|
${PNMTOPS} ${PNMTOPSFLAGS} > ${.TARGET}
|
||||||
|
|
||||||
# We can't use suffix rules to generate the rules to convert EPS to PNG and
|
# We can't use suffix rules to generate the rules to convert EPS to PNG and
|
||||||
# PNG to EPS. This is because a .png file can depend on a .eps file, and
|
# PNG to EPS. This is because a .png file can depend on a .eps file, and
|
||||||
|
@ -82,19 +119,26 @@ IMAGES_PDF=${IMAGES_GEN_PDF}
|
||||||
|
|
||||||
.for _curimage in ${IMAGES_GEN_PNG}
|
.for _curimage in ${IMAGES_GEN_PNG}
|
||||||
${_curimage}: ${_curimage:S/.png$/.eps/}
|
${_curimage}: ${_curimage:S/.png$/.eps/}
|
||||||
peps -r ${EPS2PNG_RES} -p -o ${.TARGET} ${.ALLSRC}
|
${EPS2PNG} ${EPS2PNGFLAGS} -o ${.TARGET} ${.ALLSRC}
|
||||||
.endfor
|
.endfor
|
||||||
|
|
||||||
.for _curimage in ${IMAGES_GEN_EPS}
|
.for _curimage in ${IMAGES_GEN_EPS}
|
||||||
${_curimage}: ${_curimage:S/.eps$/.png/}
|
${_curimage}: ${_curimage:S/.eps$/.png/}
|
||||||
pngtopnm ${.ALLSRC} | pnmtops -noturn > ${.TARGET}
|
${PNGTOPNM} ${.ALLSRC} | ${PNMTOPS} ${PNMTOPSFLAGS} > ${.TARGET}
|
||||||
.endfor
|
.endfor
|
||||||
|
|
||||||
.for _curimage in ${IMAGES_GEN_PDF}
|
.for _curimage in ${IMAGES_GEN_PDF}
|
||||||
${_curimage}: ${_curimage:S/.pdf$/.eps/}
|
${_curimage}: ${_curimage:S/.pdf$/.eps/}
|
||||||
epstopdf --outfile=${.TARGET} ${_curimage:S/.pdf$/.eps/}
|
${EPSTOPDF} --outfile=${.TARGET} ${.CURDIR}/${_curimage:S/.pdf$/.eps/}
|
||||||
.endfor
|
.endfor
|
||||||
|
|
||||||
|
.if ${.OBJDIR} != ${.CURDIR}
|
||||||
|
.for _curimage in ${IMAGES}
|
||||||
|
${.OBJDIR}/${_curimage}: ${_curimage}
|
||||||
|
${CP} -p ${.ALLSRC} ${.TARGET}
|
||||||
|
.endfor
|
||||||
|
.endif
|
||||||
|
|
||||||
#
|
#
|
||||||
# Using library images
|
# Using library images
|
||||||
# --------------------
|
# --------------------
|
||||||
|
@ -111,6 +155,9 @@ ${_curimage}: ${_curimage:S/.pdf$/.eps/}
|
||||||
# as necessary.
|
# as necessary.
|
||||||
#
|
#
|
||||||
|
|
||||||
|
IMAGES_LIB?=
|
||||||
|
LOCAL_IMAGES_LIB ?=
|
||||||
|
|
||||||
#
|
#
|
||||||
# The name of the directory that contains all the library images for this
|
# The name of the directory that contains all the library images for this
|
||||||
# language and encoding
|
# language and encoding
|
||||||
|
@ -126,16 +173,21 @@ IMAGES_LIB_DIR?= ${.CURDIR}/../../share/images
|
||||||
#
|
#
|
||||||
LOCAL_IMAGES_LIB_DIR?= imagelib
|
LOCAL_IMAGES_LIB_DIR?= imagelib
|
||||||
|
|
||||||
CP?= /bin/cp
|
|
||||||
MKDIR?= /bin/mkdir
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Create a target for each image used from the library. This target just
|
# Create a target for each image used from the library. This target just
|
||||||
# ensures that each image required is copied from its location in
|
# ensures that each image required is copied from its location in
|
||||||
# ${IMAGES_LIB_DIR} to the same place in ${LOCAL_IMAGES_LIB_DIR}.
|
# ${IMAGES_LIB_DIR} to the same place in ${LOCAL_IMAGES_LIB_DIR}.
|
||||||
#
|
#
|
||||||
|
|
||||||
.for _curimage in ${IMAGES_LIB}
|
.for _curimage in ${IMAGES_LIB}
|
||||||
|
LOCAL_IMAGES_LIB += ${LOCAL_IMAGES_LIB_DIR}/${_curimage}
|
||||||
${LOCAL_IMAGES_LIB_DIR}/${_curimage}: ${IMAGES_LIB_DIR}/${_curimage}
|
${LOCAL_IMAGES_LIB_DIR}/${_curimage}: ${IMAGES_LIB_DIR}/${_curimage}
|
||||||
@[ -d ${LOCAL_IMAGES_LIB_DIR}/${_curimage:H} ] || ${MKDIR} -p ${LOCAL_IMAGES_LIB_DIR}/${_curimage:H}
|
@[ -d ${LOCAL_IMAGES_LIB_DIR}/${_curimage:H} ] || \
|
||||||
${INSTALL} -C -c ${IMAGES_LIB_DIR}/${_curimage} ${LOCAL_IMAGES_LIB_DIR}/${_curimage}
|
${MKDIR} ${LOCAL_IMAGES_LIB_DIR}/${_curimage:H}
|
||||||
|
${CP} -p ${IMAGES_LIB_DIR}/${_curimage} \
|
||||||
|
${LOCAL_IMAGES_LIB_DIR}/${_curimage}
|
||||||
.endfor
|
.endfor
|
||||||
|
|
||||||
|
.if !empty(IMAGES_LIB)
|
||||||
|
CLEANFILES+= ${IMAGES_LIB:S|^|${LOCAL_IMAGES_LIB_DIR}/|}
|
||||||
|
.endif
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#
|
#
|
||||||
# $FreeBSD: doc/share/mk/doc.install.mk,v 1.3 1999/09/09 17:11:28 wosch Exp $
|
# $FreeBSD$
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
# This include file <doc.install.mk> provides variables defining the default
|
# This include file <doc.install.mk> provides variables defining the default
|
||||||
|
@ -80,7 +80,7 @@ DOCDIR?= /usr/share/doc
|
||||||
.if exists(${DOC_PREFIX}/packages)
|
.if exists(${DOC_PREFIX}/packages)
|
||||||
PACKAGES?= ${DOC_PREFIX}/packages
|
PACKAGES?= ${DOC_PREFIX}/packages
|
||||||
.else
|
.else
|
||||||
PACKAGES?= ${.CURDIR}
|
PACKAGES?= ${.OBJDIR}
|
||||||
.endif
|
.endif
|
||||||
|
|
||||||
# hack to set DOCOWN and DOCGRP to those of the user installing, if that
|
# hack to set DOCOWN and DOCGRP to those of the user installing, if that
|
||||||
|
@ -99,7 +99,25 @@ DOCGRP:= ${GROUPNAME}
|
||||||
.endif
|
.endif
|
||||||
.endif
|
.endif
|
||||||
|
|
||||||
|
COPY?= -C
|
||||||
|
|
||||||
# installation "script"
|
# installation "script"
|
||||||
INSTALL_DOCS?= \
|
INSTALL_DOCS?= \
|
||||||
${INSTALL} -C ${INSTALL_FLAGS} -o ${DOCOWN} -g ${DOCGRP} -m ${DOCMODE}
|
${INSTALL} ${COPY} ${INSTALL_FLAGS} -o ${DOCOWN} -g ${DOCGRP} -m ${DOCMODE}
|
||||||
|
|
||||||
|
# ------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# Work out the language and encoding used for this document.
|
||||||
|
#
|
||||||
|
# Liberal default of maximum of 5 directories below to find it.
|
||||||
|
#
|
||||||
|
|
||||||
|
.if !defined(LANGCODE)
|
||||||
|
LANGCODE:= ${.CURDIR}
|
||||||
|
.for _ in 1 2 3 4 5 6 7 8 9 10
|
||||||
|
.if !(${LANGCODE:H:T} == "doc")
|
||||||
|
LANGCODE:= ${LANGCODE:H}
|
||||||
|
.endif
|
||||||
|
.endfor
|
||||||
|
LANGCODE:= ${LANGCODE:T}
|
||||||
|
.endif
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#
|
#
|
||||||
# $FreeBSD: doc/share/mk/doc.project.mk,v 1.8 2001/03/13 09:54:34 nik Exp $
|
# $FreeBSD$
|
||||||
#
|
#
|
||||||
# This include file <doc.project.mk> is the FreeBSD Documentation Project
|
# This include file <doc.project.mk> is the FreeBSD Documentation Project
|
||||||
# co-ordination make file.
|
# co-ordination make file.
|
||||||
|
@ -68,10 +68,19 @@ LOCALBASE?= /usr/local
|
||||||
PREFIX?= ${LOCALBASE}
|
PREFIX?= ${LOCALBASE}
|
||||||
PRI_LANG?= en_US.ISO8859-1
|
PRI_LANG?= en_US.ISO8859-1
|
||||||
|
|
||||||
|
CP?= /bin/cp
|
||||||
|
LN?= /bin/ln
|
||||||
|
MKDIR?= /bin/mkdir -p
|
||||||
|
RM?= /bin/rm
|
||||||
|
MV?= /bin/mv
|
||||||
|
|
||||||
# Image processing (contains code used by the doc.<format>.mk files, so must
|
# Image processing (contains code used by the doc.<format>.mk files, so must
|
||||||
# be listed first).
|
# be listed first).
|
||||||
.include "doc.images.mk"
|
.include "doc.images.mk"
|
||||||
|
|
||||||
|
# Ownership information.
|
||||||
|
.include "doc.install.mk"
|
||||||
|
|
||||||
# Format-specific configuration
|
# Format-specific configuration
|
||||||
.if defined(DOC)
|
.if defined(DOC)
|
||||||
.if ${DOCFORMAT} == "docbook"
|
.if ${DOCFORMAT} == "docbook"
|
||||||
|
@ -82,7 +91,5 @@ PRI_LANG?= en_US.ISO8859-1
|
||||||
.endif
|
.endif
|
||||||
.endif
|
.endif
|
||||||
|
|
||||||
# Subdirectory glue and ownership information.
|
# Subdirectory glue.
|
||||||
.include "doc.subdir.mk"
|
.include "doc.subdir.mk"
|
||||||
.include "doc.install.mk"
|
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# Taken from:
|
# Taken from:
|
||||||
# Id: bsd.subdir.mk,v 1.27 1999/03/21 06:43:40 bde
|
# Id: bsd.subdir.mk,v 1.27 1999/03/21 06:43:40 bde
|
||||||
#
|
#
|
||||||
# $FreeBSD: doc/share/mk/doc.subdir.mk,v 1.5 2000/10/29 02:39:10 nik Exp $
|
# $FreeBSD$
|
||||||
#
|
#
|
||||||
# This include file <doc.subdir.mk> contains the default targets
|
# This include file <doc.subdir.mk> contains the default targets
|
||||||
# for building subdirectories in the FreeBSD Documentation Project.
|
# for building subdirectories in the FreeBSD Documentation Project.
|
||||||
|
@ -51,24 +51,6 @@
|
||||||
.include "${.CURDIR}/../Makefile.inc"
|
.include "${.CURDIR}/../Makefile.inc"
|
||||||
.endif
|
.endif
|
||||||
|
|
||||||
# ------------------------------------------------------------------------
|
|
||||||
#
|
|
||||||
# Work out the language and encoding used for this document.
|
|
||||||
#
|
|
||||||
# Liberal default of maximum of 5 directories below to find it.
|
|
||||||
#
|
|
||||||
|
|
||||||
.if !defined(LANGCODE)
|
|
||||||
LANGCODE:= ${.CURDIR}
|
|
||||||
.for _ in 1 2 3 4 5 6 7 8 9 10
|
|
||||||
.if !(${LANGCODE:H:T} == "doc")
|
|
||||||
LANGCODE:= ${LANGCODE:H}
|
|
||||||
.endif
|
|
||||||
.endfor
|
|
||||||
LANGCODE:= ${LANGCODE:T}
|
|
||||||
.endif
|
|
||||||
|
|
||||||
|
|
||||||
.if !target(install)
|
.if !target(install)
|
||||||
install: afterinstall symlinks
|
install: afterinstall symlinks
|
||||||
afterinstall: realinstall
|
afterinstall: realinstall
|
||||||
|
@ -79,7 +61,8 @@ package: realpackage symlinks
|
||||||
realpackage: _SUBDIRUSE
|
realpackage: _SUBDIRUSE
|
||||||
|
|
||||||
.if !defined(IGNORE_COMPAT_SYMLINK) && defined(COMPAT_SYMLINK)
|
.if !defined(IGNORE_COMPAT_SYMLINK) && defined(COMPAT_SYMLINK)
|
||||||
SYMLINKS+= ${DOCDIR} ${.CURDIR:T:ja_JP.eucJP=ja} ${COMPAT_SYMLINK:ja=ja_JP.eucJP}
|
SYMLINKS+= ${DOCDIR} ${.CURDIR:T:ja_JP.eucJP=ja} \
|
||||||
|
${COMPAT_SYMLINK:ja=ja_JP.eucJP}
|
||||||
.endif
|
.endif
|
||||||
|
|
||||||
.if defined(PRI_LANG) && defined(ROOT_SYMLINKS) && !empty(ROOT_SYMLINKS)
|
.if defined(PRI_LANG) && defined(ROOT_SYMLINKS) && !empty(ROOT_SYMLINKS)
|
||||||
|
@ -93,11 +76,11 @@ SYMLINKS+= ${DOCDIR} ${LANGCODE:ja_JP.eucJP=ja}/${.CURDIR:T}/${_tmp} ${_tmp}
|
||||||
.if !target(symlinks)
|
.if !target(symlinks)
|
||||||
symlinks:
|
symlinks:
|
||||||
.if defined(SYMLINKS) && !empty(SYMLINKS)
|
.if defined(SYMLINKS) && !empty(SYMLINKS)
|
||||||
@set `echo ${SYMLINKS}`; \
|
@set $$(${ECHO_CMD} ${SYMLINKS}); \
|
||||||
while : ; do \
|
while : ; do \
|
||||||
case $$# in \
|
case $$# in \
|
||||||
0) break;; \
|
0) break;; \
|
||||||
[12]) echo "warn: empty SYMLINKS: $$1 $$2"; break;; \
|
[12]) ${ECHO_CMD} "warn: empty SYMLINKS: $$1 $$2"; break;; \
|
||||||
esac; \
|
esac; \
|
||||||
d=$$1; shift; \
|
d=$$1; shift; \
|
||||||
l=$$1; shift; \
|
l=$$1; shift; \
|
||||||
|
@ -106,8 +89,8 @@ symlinks:
|
||||||
${ECHO} "$${d}/$${l} doesn't exist, not linking"; \
|
${ECHO} "$${d}/$${l} doesn't exist, not linking"; \
|
||||||
else \
|
else \
|
||||||
${ECHO} $${d}/$${t} -\> $${d}/$${l}; \
|
${ECHO} $${d}/$${t} -\> $${d}/$${l}; \
|
||||||
(cd $${d} && rm -rf $${t}); \
|
(cd $${d} && ${RM} -rf $${t}); \
|
||||||
(cd $${d} && ln -s $${l} $${t}); \
|
(cd $${d} && ${LN} -s $${l} $${t}); \
|
||||||
fi; \
|
fi; \
|
||||||
done
|
done
|
||||||
.endif
|
.endif
|
||||||
|
@ -121,9 +104,10 @@ ${__target}:
|
||||||
|
|
||||||
_SUBDIRUSE: .USE
|
_SUBDIRUSE: .USE
|
||||||
.for entry in ${SUBDIR}
|
.for entry in ${SUBDIR}
|
||||||
@${ECHO} "===> ${DIRPRFX}${entry}"
|
@${ECHODIR} "===> ${DIRPRFX}${entry}"
|
||||||
@(cd ${.CURDIR}/${entry} && \
|
@cd ${.CURDIR}/${entry} && \
|
||||||
${MAKE} ${.TARGET:S/realpackage/package/:S/realinstall/install/} DIRPRFX=${DIRPRFX}${entry}/ )
|
${MAKE} ${.TARGET:S/realpackage/package/:S/realinstall/install/} \
|
||||||
|
DIRPRFX=${DIRPRFX}${entry}/
|
||||||
.endfor
|
.endfor
|
||||||
|
|
||||||
.if !defined(NOINCLUDEMK)
|
.if !defined(NOINCLUDEMK)
|
||||||
|
@ -136,8 +120,7 @@ _SUBDIRUSE: .USE
|
||||||
.MAIN: all
|
.MAIN: all
|
||||||
|
|
||||||
${SUBDIR}::
|
${SUBDIR}::
|
||||||
cd ${.CURDIR}/${.TARGET}
|
@cd ${.CURDIR}/${.TARGET} && ${MAKE} all
|
||||||
${MAKE} all
|
|
||||||
|
|
||||||
.for __target in all cleandir lint objlink install
|
.for __target in all cleandir lint objlink install
|
||||||
.if !target(${__target})
|
.if !target(${__target})
|
||||||
|
@ -147,10 +130,10 @@ ${__target}: _SUBDIRUSE
|
||||||
|
|
||||||
.if !target(obj)
|
.if !target(obj)
|
||||||
obj: _SUBDIRUSE
|
obj: _SUBDIRUSE
|
||||||
@if ! test -d ${CANONICALOBJDIR}/; then \
|
@if ! [ -d ${CANONICALOBJDIR}/ ]; then \
|
||||||
mkdir -p ${CANONICALOBJDIR}; \
|
${MKDIR} -p ${CANONICALOBJDIR}; \
|
||||||
if ! test -d ${CANONICALOBJDIR}/; then \
|
if ! [ -d ${CANONICALOBJDIR}/ ]; then \
|
||||||
${ECHO} "Unable to create ${CANONICALOBJDIR}."; \
|
${ECHO_CMD} "Unable to create ${CANONICALOBJDIR}."; \
|
||||||
exit 1; \
|
exit 1; \
|
||||||
fi; \
|
fi; \
|
||||||
${ECHO} "${CANONICALOBJDIR} created ${.CURDIR}"; \
|
${ECHO} "${CANONICALOBJDIR} created ${.CURDIR}"; \
|
||||||
|
@ -159,40 +142,67 @@ obj: _SUBDIRUSE
|
||||||
|
|
||||||
.if !target(objlink)
|
.if !target(objlink)
|
||||||
objlink: _SUBDIRUSE
|
objlink: _SUBDIRUSE
|
||||||
@if test -d ${CANONICALOBJDIR}/; then \
|
@if [ -d ${CANONICALOBJDIR}/ ]; then \
|
||||||
rm -f ${.CURDIR}/obj; \
|
${RM} -f ${.CURDIR}/obj; \
|
||||||
ln -s ${CANONICALOBJDIR} ${.CURDIR}/obj; \
|
${LN} -s ${CANONICALOBJDIR} ${.CURDIR}/obj; \
|
||||||
else \
|
else \
|
||||||
echo "No ${CANONICALOBJDIR} to link to - do a make obj."; \
|
${ECHO_CMD} "No ${CANONICALOBJDIR} to link to - do a make obj."; \
|
||||||
fi
|
fi
|
||||||
.endif
|
.endif
|
||||||
|
|
||||||
.if !target(whereobj)
|
.if !target(whereobj)
|
||||||
whereobj:
|
whereobj:
|
||||||
@echo ${.OBJDIR}
|
@${ECHO_CMD} ${.OBJDIR}
|
||||||
.endif
|
.endif
|
||||||
|
|
||||||
cleanobj:
|
cleanobj:
|
||||||
@if [ -d ${CANONICALOBJDIR}/ ]; then \
|
@if [ -d ${CANONICALOBJDIR}/ ]; then \
|
||||||
rm -rf ${CANONICALOBJDIR}; \
|
${RM} -rf ${CANONICALOBJDIR}; \
|
||||||
else \
|
else \
|
||||||
cd ${.CURDIR} && ${MAKE} clean cleandepend; \
|
cd ${.CURDIR} && ${MAKE} clean cleandepend; \
|
||||||
fi
|
fi
|
||||||
@if [ -h ${.CURDIR}/obj ]; then rm -f ${.CURDIR}/obj; fi
|
@if [ -h ${.CURDIR}/obj ]; then ${RM} -f ${.CURDIR}/obj; fi
|
||||||
|
|
||||||
.if !target(clean)
|
.if !target(clean)
|
||||||
clean: _SUBDIRUSE
|
clean: _SUBDIRUSE
|
||||||
.if defined(CLEANFILES) && !empty(CLEANFILES)
|
.if defined(CLEANFILES) && !empty(CLEANFILES)
|
||||||
rm -f ${CLEANFILES}
|
${RM} -f ${CLEANFILES}
|
||||||
.endif
|
.endif
|
||||||
.if defined(CLEANDIRS) && !empty(CLEANDIRS)
|
.if defined(CLEANDIRS) && !empty(CLEANDIRS)
|
||||||
rm -rf ${CLEANDIRS}
|
${RM} -rf ${CLEANDIRS}
|
||||||
.endif
|
.endif
|
||||||
.if defined(IMAGES_LIB) && !empty(LOCAL_IMAGES_LIB_DIR)
|
.if defined(IMAGES_LIB) && !empty(LOCAL_IMAGES_LIB_DIR)
|
||||||
rm -rf ${LOCAL_IMAGES_LIB_DIR}
|
${RM} -rf ${LOCAL_IMAGES_LIB_DIR}
|
||||||
.endif
|
.endif
|
||||||
.endif
|
.endif
|
||||||
|
|
||||||
cleandir: cleanobj _SUBDIRUSE
|
cleandir: cleanobj _SUBDIRUSE
|
||||||
|
|
||||||
.endif # end of NOINCLUDEMK section
|
.endif # end of NOINCLUDEMK section
|
||||||
|
|
||||||
|
#
|
||||||
|
# Create /usr/obj image subdirs when ${IMAGES} contains subdir/image.xxx
|
||||||
|
#
|
||||||
|
|
||||||
|
_imagesubdir=
|
||||||
|
.for _imagedir in ${IMAGES:H}
|
||||||
|
.if ${_imagesubdir:M${_imagedir}} == ""
|
||||||
|
_imagesubdir+= ${_imagedir}
|
||||||
|
.endif
|
||||||
|
.endfor
|
||||||
|
|
||||||
|
.if ${_imagesubdir} != ""
|
||||||
|
_IMAGESUBDIR: .USE
|
||||||
|
.for dir in ${_imagesubdir}
|
||||||
|
@if ! [ -d ${CANONICALOBJDIR}/${dir}/ ]; then \
|
||||||
|
${MKDIR} -p ${CANONICALOBJDIR}/${dir}; \
|
||||||
|
if ! [ -d ${CANONICALOBJDIR}/${dir}/ ]; then \
|
||||||
|
${ECHO_CMD} "Unable to create ${CANONICALOBJDIR}/${dir}/."; \
|
||||||
|
exit 1; \
|
||||||
|
fi; \
|
||||||
|
${ECHO} "${CANONICALOBJDIR}/${dir}/ created for ${.CURDIR}"; \
|
||||||
|
fi
|
||||||
|
.endfor
|
||||||
|
|
||||||
|
obj: _IMAGESUBDIR
|
||||||
|
.endif
|
||||||
|
|
Loading…
Reference in New Issue