- Simplify ${DOC}.pdf and ${DOC}.dvi targets.
- Disable use of localized version of HTML2TXT and TeX build temporarily. With hat on: re and doceng
This commit is contained in:
parent
89a832c5d0
commit
3beb32783c
Notes:
svn2git
2020-12-08 03:00:23 +00:00
svn path=/head/; revision=27497
1 changed files with 7 additions and 45 deletions
|
@ -11,20 +11,12 @@ CJKTEXSTY_PDFTEX_FLAGS?= -c -e ${SP_ENCODING} -f song
|
|||
|
||||
# Don't use "?=" in the following two lines.
|
||||
# They have been pre-defined in "doc.project.mk".
|
||||
HTML2TXT= ${PREFIX}/bin/html2text
|
||||
HTML2TXTOPTS= -nobs -style pretty
|
||||
# XXX: broken as of RELEASE_6_1_0
|
||||
#HTML2TXT= ${PREFIX}/bin/html2text
|
||||
#HTML2TXTOPTS= -nobs -style pretty
|
||||
|
||||
.for _curformat in ${FORMATS}
|
||||
_cf=${_curformat}
|
||||
.if ${_cf} == "pdf"
|
||||
# Temporary auxiliary files generated for teTeX & CJK
|
||||
CLEANFILES+= ${DOC}.tex-pdf-cjk
|
||||
.elif ${_cf} == "dvi" || ${_cf} == "ps"
|
||||
# Temporary auxiliary files generated for teTeX & CJK
|
||||
# PostScript file comes from corresponding DVI file.
|
||||
CLEANFILES+= ${DOC}.tex-cjk
|
||||
.endif
|
||||
.endfor
|
||||
# XXX: broken as of RELEASE_6_1_0
|
||||
NO_TEX= yes
|
||||
|
||||
# In "doc/share/mk/doc.project.mk", "doc.images.mk" and "doc.common.mk"
|
||||
# is included before "doc.local.mk". Thus, we can use variables defined
|
||||
|
@ -37,38 +29,8 @@ CLEANFILES+= ${DOC}.tex-cjk
|
|||
# But no problems about using their variables in other places.
|
||||
# Then, PMake expands variables just when they are ACTUALLY USED.
|
||||
|
||||
|
||||
# Generate Chinese PDF
|
||||
.if !target(${DOC}.pdf)
|
||||
${DOC}.pdf: ${DOC}.tex-pdf ${IMAGES_PDF}
|
||||
.for _curimage in ${IMAGES_PDF:M*share*}
|
||||
${CP} -p ${_curimage} ${.CURDIR:H:H}/${_curimage:H:S|${IMAGES_EN_DIR}/||:S|${.CURDIR}||}
|
||||
.endfor
|
||||
${CJKTEXSTY} ${CJKTEXSTY_PDFTEX_FLAGS} < ${DOC}.tex-pdf > ${DOC}.tex-pdf-cjk
|
||||
|
||||
-${PDFJADETEX_CMD} '${TEX_CMDSEQ} \nonstopmode\input{${DOC}.tex-pdf-cjk}'
|
||||
@${ECHO} "==> PDFTeX passed 1/3"
|
||||
-${PDFJADETEX_CMD} '${TEX_CMDSEQ} \nonstopmode\input{${DOC}.tex-pdf-cjk}'
|
||||
@${ECHO} "==> PDFTeX passed 2/3"
|
||||
-${PDFJADETEX_CMD} '${TEX_CMDSEQ} \nonstopmode\input{${DOC}.tex-pdf-cjk}'
|
||||
@${ECHO} "==> PDFTeX passed 3/3"
|
||||
.endif
|
||||
|
||||
# Generate Chinese DVI, preparing for Chinese PostScript.
|
||||
.if !target(${DOC}.dvi)
|
||||
${DOC}.dvi: ${DOC}.tex ${LOCAL_IMAGES_EPS}
|
||||
.for _curimage in ${LOCAL_IMAGES_EPS:M*share*}
|
||||
${CP} -p ${_curimage} ${.CURDIR:H:H}/${_curimage:H:S|${IMAGES_EN_DIR}/||:S|${.CURDIR}||}
|
||||
.endfor
|
||||
${CJKTEXSTY} ${CJKTEXSTY_TEX_FLAGS} < ${DOC}.tex > ${DOC}.tex-cjk
|
||||
|
||||
-${JADETEX_CMD} '${TEX_CMDSEQ} \nonstopmode\input{${DOC}.tex-cjk}'
|
||||
@${ECHO} "==> JadeTeX passed 1/3"
|
||||
-${JADETEX_CMD} '${TEX_CMDSEQ} \nonstopmode\input{${DOC}.tex-cjk}'
|
||||
@${ECHO} "==> JadeTeX passed 2/3"
|
||||
-${JADETEX_CMD} '${TEX_CMDSEQ} \nonstopmode\input{${DOC}.tex-cjk}'
|
||||
@${ECHO} "==> JadeTeX passed 3/3"
|
||||
.endif
|
||||
PDFJADETEX_PREPROCESS= ${CJKTEXSTY} ${CJKTEXSTY_PDFTEX_FLAGS}
|
||||
JADETEX_PREPROCESS= ${CJKTEXSTY} ${CJKTEXSTY_PDFTEX_FLAGS}
|
||||
|
||||
# For Chinese-specific switch "output.for.print".
|
||||
print.index: ${SRCS} ${LOCAL_IMAGES_TXT}
|
||||
|
|
Loading…
Reference in a new issue