Make the TIDYFLAGS/TIDYOPTS usage homologous to the rest of the make
variables in the doc infrastructure. Fixes several small bugs. PR: docs/31703 Submitted by: Akio Morita <amorita@FreeBSD.org>
This commit is contained in:
parent
32918c67aa
commit
4ffcb3417b
Notes:
svn2git
2020-12-08 03:00:23 +00:00
svn path=/head/; revision=11134
4 changed files with 32 additions and 23 deletions
|
@ -174,14 +174,14 @@ XARGS?= /usr/bin/xargs
|
||||||
TEX?= ${PREFIX}/bin/tex
|
TEX?= ${PREFIX}/bin/tex
|
||||||
PDFTEX?= ${PREFIX}/bin/pdftex
|
PDFTEX?= ${PREFIX}/bin/pdftex
|
||||||
TIDY?= ${PREFIX}/bin/tidy
|
TIDY?= ${PREFIX}/bin/tidy
|
||||||
TIDYFLAGS?= -i -m -f /dev/null
|
TIDYOPTS?= -i -m -f /dev/null ${TYDYFLAGS}
|
||||||
HTML2TXT?= ${PREFIX}/bin/links
|
HTML2TXT?= ${PREFIX}/bin/links
|
||||||
HTML2TXTFLAGS?= -dump
|
HTML2TXTOPTS?= -dump ${HTML2TXTFLAGS}
|
||||||
HTML2PDB?= ${PREFIX}/bin/iSiloBSD
|
HTML2PDB?= ${PREFIX}/bin/iSiloBSD
|
||||||
HTML2PDBFLAGS?= -y -d0 -Idef
|
HTML2PDBOPTS?= -y -d0 -Idef ${HTML2PDBFLAGS}
|
||||||
DVIPS?= ${PREFIX}/bin/dvips
|
DVIPS?= ${PREFIX}/bin/dvips
|
||||||
.if defined(PAPERSIZE)
|
.if defined(PAPERSIZE)
|
||||||
DVIPSFLAGS?= -t ${PAPERSIZE:L}
|
DVIPSOPTS?= -t ${PAPERSIZE:L} ${DVIPSFLAGS}
|
||||||
.endif
|
.endif
|
||||||
|
|
||||||
GZIP?= -9
|
GZIP?= -9
|
||||||
|
@ -342,7 +342,7 @@ index.html HTML.manifest: ${SRCS} ${LOCAL_IMAGES_LIB} ${LOCAL_IMAGES_PNG} \
|
||||||
${JADE} -V html-manifest ${HTMLOPTS} -ioutput.html.images \
|
${JADE} -V html-manifest ${HTMLOPTS} -ioutput.html.images \
|
||||||
${JADEOPTS} -t sgml ${MASTERDOC}
|
${JADEOPTS} -t sgml ${MASTERDOC}
|
||||||
.if !defined(NO_TIDY)
|
.if !defined(NO_TIDY)
|
||||||
-${TIDY} ${TIDYFLAGS} $$(${XARGS} < HTML.manifest)
|
-${TIDY} ${TIDYOPTS} $$(${XARGS} < HTML.manifest)
|
||||||
.endif
|
.endif
|
||||||
|
|
||||||
${DOC}.html: ${SRCS} ${LOCAL_IMAGES_LIB} ${LOCAL_IMAGES_PNG} \
|
${DOC}.html: ${SRCS} ${LOCAL_IMAGES_LIB} ${LOCAL_IMAGES_PNG} \
|
||||||
|
@ -351,7 +351,7 @@ ${DOC}.html: ${SRCS} ${LOCAL_IMAGES_LIB} ${LOCAL_IMAGES_PNG} \
|
||||||
${JADEOPTS} -t sgml ${MASTERDOC} > ${.TARGET} || \
|
${JADEOPTS} -t sgml ${MASTERDOC} > ${.TARGET} || \
|
||||||
(${RM} -f ${.TARGET} && false)
|
(${RM} -f ${.TARGET} && false)
|
||||||
.if !defined(NO_TIDY)
|
.if !defined(NO_TIDY)
|
||||||
-${TIDY} ${TIDYFLAGS} ${.TARGET}
|
-${TIDY} ${TIDYOPTS} ${.TARGET}
|
||||||
.endif
|
.endif
|
||||||
|
|
||||||
# Special target to produce HTML with no images in it.
|
# Special target to produce HTML with no images in it.
|
||||||
|
@ -371,10 +371,10 @@ ${DOC}.html.tar: ${DOC}.html ${LOCAL_IMAGES_LIB} \
|
||||||
${LOCAL_IMAGES_LIB} ${IMAGES_PNG} ${CSS_SHEET:T}
|
${LOCAL_IMAGES_LIB} ${IMAGES_PNG} ${CSS_SHEET:T}
|
||||||
|
|
||||||
${DOC}.txt: ${DOC}.html-text
|
${DOC}.txt: ${DOC}.html-text
|
||||||
${HTML2TXT} ${HTML2TXTFLAGS} ${.ALLSRC} > ${.TARGET}
|
${HTML2TXT} ${HTML2TXTOPTS} ${.ALLSRC} > ${.TARGET}
|
||||||
|
|
||||||
${DOC}.pdb: ${DOC}.html ${LOCAL_IMAGES_LIB} ${LOCAL_IMAGES_PNG}
|
${DOC}.pdb: ${DOC}.html ${LOCAL_IMAGES_LIB} ${LOCAL_IMAGES_PNG}
|
||||||
${HTML2PDB} ${HTML2PDBFLAGS} ${DOC}.html ${.TARGET}
|
${HTML2PDB} ${HTML2PDBOPTS} ${DOC}.html ${.TARGET}
|
||||||
|
|
||||||
${.CURDIR:T}.pdb: ${DOC}.pdb
|
${.CURDIR:T}.pdb: ${DOC}.pdb
|
||||||
${LN} -f ${.ALLSRC} ${.TARGET}
|
${LN} -f ${.ALLSRC} ${.TARGET}
|
||||||
|
@ -426,7 +426,7 @@ ${DOC}.pdf: ${DOC}.tex-pdf ${IMAGES_PDF}
|
||||||
${PDFTEX} "&pdfjadetex" '\nonstopmode\input{${DOC}.tex-pdf}'
|
${PDFTEX} "&pdfjadetex" '\nonstopmode\input{${DOC}.tex-pdf}'
|
||||||
|
|
||||||
${DOC}.ps: ${DOC}.dvi
|
${DOC}.ps: ${DOC}.dvi
|
||||||
${DVIPS} -o ${.TARGET} ${.ALLSRC}
|
${DVIPS} ${DVIPSOPTS} -o ${.TARGET} ${.ALLSRC}
|
||||||
|
|
||||||
${DOC}.tar: ${SRCS} ${LOCAL_IMAGES} ${LOCAL_CSS_SHEET}
|
${DOC}.tar: ${SRCS} ${LOCAL_IMAGES} ${LOCAL_CSS_SHEET}
|
||||||
${TAR} cf ${.TARGET} -C ${.CURDIR} ${SRCS} \
|
${TAR} cf ${.TARGET} -C ${.CURDIR} ${SRCS} \
|
||||||
|
|
|
@ -68,11 +68,11 @@ TAR?= /usr/bin/tar
|
||||||
XARGS?= /usr/bin/xargs
|
XARGS?= /usr/bin/xargs
|
||||||
|
|
||||||
TIDY?= ${PREFIX}/bin/tidy
|
TIDY?= ${PREFIX}/bin/tidy
|
||||||
TIDYFLAGS?= -i -m -f /dev/null
|
TIDYOPTS?= -i -m -f /dev/null ${TIDYFLAGS}
|
||||||
HTML2TXT?= ${PREFIX}/bin/links
|
HTML2TXT?= ${PREFIX}/bin/links
|
||||||
HTML2TXTFLAGS?= -dump
|
HTML2TXTOPTS?= -dump ${HTML2TXTFLAGS}
|
||||||
HTML2PDB?= ${PREFIX}/bin/iSiloBSD
|
HTML2PDB?= ${PREFIX}/bin/iSiloBSD
|
||||||
HTML2PDBFLAGS?= -y -d0 -Idef
|
HTML2PDBOPTS?= -y -d0 -Idef ${HTML2PDBFLAGS}
|
||||||
|
|
||||||
GZIP?= -9
|
GZIP?= -9
|
||||||
GZIP_CMD?= gzip -qf ${GZIP}
|
GZIP_CMD?= gzip -qf ${GZIP}
|
||||||
|
@ -150,14 +150,14 @@ all: ${_docs}
|
||||||
${DOC}.html: ${SRCS} ${LOCAL_IMAGES_LIB} ${LOCAL_IMAGES_PNG} ${LOCAL_CSS_SHEET}
|
${DOC}.html: ${SRCS} ${LOCAL_IMAGES_LIB} ${LOCAL_IMAGES_PNG} ${LOCAL_CSS_SHEET}
|
||||||
${SGMLNORM} -c ${HTMLCATALOG} ${SRCS:S|^|${.CURDIR}/|} > ${.TARGET}
|
${SGMLNORM} -c ${HTMLCATALOG} ${SRCS:S|^|${.CURDIR}/|} > ${.TARGET}
|
||||||
.if !defined(NO_TIDY)
|
.if !defined(NO_TIDY)
|
||||||
-${TIDY} ${TIDYFLAGS} ${.TARGET}
|
-${TIDY} ${TIDYOPTS} ${.TARGET}
|
||||||
.endif
|
.endif
|
||||||
|
|
||||||
${DOC}.txt: ${DOC}.html
|
${DOC}.txt: ${DOC}.html
|
||||||
${HTML2TXT} ${HTML2TXTFLAGS} ${.ALLSRC} > ${.TARGET}
|
${HTML2TXT} ${HTML2TXTOPTS} ${.ALLSRC} > ${.TARGET}
|
||||||
|
|
||||||
${DOC}.pdb: ${DOC}.html ${LOCAL_IMAGES_LIB} ${LOCAL_IMAGES_PNG}
|
${DOC}.pdb: ${DOC}.html ${LOCAL_IMAGES_LIB} ${LOCAL_IMAGES_PNG}
|
||||||
${HTML2PDB} ${HTML2PDBFLAGS} ${DOC}.html ${.TARGET}
|
${HTML2PDB} ${HTML2PDBOPTS} ${DOC}.html ${.TARGET}
|
||||||
|
|
||||||
${.CURDIR:T}.pdb: ${DOC}.pdb
|
${.CURDIR:T}.pdb: ${DOC}.pdb
|
||||||
${LN} -f ${.ALLSRC} ${.TARGET}
|
${LN} -f ${.ALLSRC} ${.TARGET}
|
||||||
|
|
|
@ -96,21 +96,25 @@ EPS2PNG_RES?= 100
|
||||||
IMAGES_PDF=${IMAGES_GEN_PDF}
|
IMAGES_PDF=${IMAGES_GEN_PDF}
|
||||||
|
|
||||||
SCR2PNG?= ${PREFIX}/bin/scr2png
|
SCR2PNG?= ${PREFIX}/bin/scr2png
|
||||||
|
SCR2PNGOPTS?= ${SCR2PNGFLAGS}
|
||||||
EPS2PNG?= ${PREFIX}/bin/peps
|
EPS2PNG?= ${PREFIX}/bin/peps
|
||||||
EPS2PNGFLAGS?= -p -r ${EPS2PNG_RES}
|
EPS2PNGOPTS?= -p -r ${EPS2PNG_RES} ${EPS2PNGFLAGS}
|
||||||
PNGTOPNM?= ${PREFIX}/bin/pngtopnm
|
PNGTOPNM?= ${PREFIX}/bin/pngtopnm
|
||||||
|
PNGTOPNMOPTS?= ${PNGTOPNMFLAGS}
|
||||||
PNMTOPS?= ${PREFIX}/bin/pnmtops
|
PNMTOPS?= ${PREFIX}/bin/pnmtops
|
||||||
PNMTOPSFLAGS?= -noturn
|
PNMTOPSOPTS?= -noturn ${PNMTOPSFLAGS}
|
||||||
EPSTOPDF?= ${PREFIX}/bin/epstopdf
|
EPSTOPDF?= ${PREFIX}/bin/epstopdf
|
||||||
|
EPSTOPDFOPTS?= ${EPSTOPDFFLAGS}
|
||||||
|
|
||||||
# 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} ${SCR2PNGOPTS} < ${.IMPSRC} > ${.TARGET}
|
||||||
.scr.eps:
|
.scr.eps:
|
||||||
${SCR2PNG} < ${.ALLSRC} | ${PNGTOPNM} | \
|
${SCR2PNG} ${SCR2PNGOPTS} < ${.ALLSRC} | \
|
||||||
${PNMTOPS} ${PNMTOPSFLAGS} > ${.TARGET}
|
${PNGTOPNM} ${PNGTOPNMOPTS} | \
|
||||||
|
${PNMTOPS} ${PNMTOPSOPTS} > ${.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
|
||||||
|
@ -119,17 +123,19 @@ EPSTOPDF?= ${PREFIX}/bin/epstopdf
|
||||||
|
|
||||||
.for _curimage in ${IMAGES_GEN_PNG}
|
.for _curimage in ${IMAGES_GEN_PNG}
|
||||||
${_curimage}: ${_curimage:S/.png$/.eps/}
|
${_curimage}: ${_curimage:S/.png$/.eps/}
|
||||||
${EPS2PNG} ${EPS2PNGFLAGS} -o ${.TARGET} ${.ALLSRC}
|
${EPS2PNG} ${EPS2PNGOPTS} -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} ${PNMTOPSFLAGS} > ${.TARGET}
|
${PNGTOPNM} ${PNGTOPNMOPTS} ${.ALLSRC} | \
|
||||||
|
${PNMTOPS} ${PNMTOPSOPTS} > ${.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} ${.CURDIR}/${_curimage:S/.pdf$/.eps/}
|
${EPSTOPDF} ${EPSTOPDFOPTS} --outfile=${.TARGET} \
|
||||||
|
${.CURDIR}/${_curimage:S/.pdf$/.eps/}
|
||||||
.endfor
|
.endfor
|
||||||
|
|
||||||
.if ${.OBJDIR} != ${.CURDIR}
|
.if ${.OBJDIR} != ${.CURDIR}
|
||||||
|
|
|
@ -47,9 +47,12 @@
|
||||||
# Remove the object directory, if any.
|
# Remove the object directory, if any.
|
||||||
#
|
#
|
||||||
|
|
||||||
|
.if !target(__initialized__)
|
||||||
|
__initialized__:
|
||||||
.if exists(${.CURDIR}/../Makefile.inc)
|
.if exists(${.CURDIR}/../Makefile.inc)
|
||||||
.include "${.CURDIR}/../Makefile.inc"
|
.include "${.CURDIR}/../Makefile.inc"
|
||||||
.endif
|
.endif
|
||||||
|
.endif
|
||||||
|
|
||||||
.if !target(install)
|
.if !target(install)
|
||||||
install: afterinstall symlinks
|
install: afterinstall symlinks
|
||||||
|
|
Loading…
Reference in a new issue