Really unbreak creation of PDF documents which use "shared" PNG images:
The previous fix only worked in some cases, so back it out and add a more clean fix. This fix also makes "make clean" work as expected again for the shared PNG images. The real problem is the assumption in doc.images.mk that the ${IMAGES_PDF} variable only need to contain images converted to PDF format and not images which are already in PNG format. We need to list the PNG images in ${IMAGES_PDF} since they might be in a shared image directory, and if we don't list them in ${IMAGES_PDF} they will not be copied to the working directory and will therefor not be found during build. Prompted by: phantom
This commit is contained in:
parent
83ed0cc555
commit
c0dc63ac06
Notes:
svn2git
2020-12-08 03:00:23 +00:00
svn path=/head/; revision=20524
2 changed files with 4 additions and 5 deletions
share/mk
|
@ -576,7 +576,7 @@ ${DOC}.dvi: ${DOC}.tex ${LOCAL_IMAGES_EPS}
|
|||
|
||||
.if !target(${DOC}.pdf)
|
||||
${DOC}.pdf: ${DOC}.tex-pdf ${IMAGES_PDF}
|
||||
.for _curimage in ${IMAGES_PDF:M*share*} ${IMAGES_PNG:M*share*}
|
||||
.for _curimage in ${IMAGES_PDF:M*share*}
|
||||
${CP} -p ${_curimage} ${.CURDIR:H:H}/${_curimage:H:S|${IMAGES_EN_DIR}/||:S|${.CURDIR}||}
|
||||
.endfor
|
||||
@${ECHO} "==> PDFTeX pass 1/3"
|
||||
|
|
|
@ -124,10 +124,9 @@ LOCAL_IMAGES_TXT+= ${IMAGES_SCR_TXT}
|
|||
# a 640x480 monitor.
|
||||
EPS2PNG_RES?= 100
|
||||
|
||||
# We only need to list ${IMAGES_GEN_PDF} here. If all the source files are
|
||||
# EPS then they'll be in this variable; if any of the source files are PNG
|
||||
# then we can use them directly, and don't need to list them.
|
||||
IMAGES_PDF=${IMAGES_GEN_PDF}
|
||||
# We need to list ${_IMAGES_PNG} here since the images might be in a
|
||||
# shared image directory.
|
||||
IMAGES_PDF= ${IMAGES_GEN_PDF} ${_IMAGES_PNG}
|
||||
|
||||
SCR2PNG?= ${PREFIX}/bin/scr2png
|
||||
SCR2PNGOPTS?= ${SCR2PNGFLAGS}
|
||||
|
|
Loading…
Reference in a new issue