Allow the use of graphic files from en_US.ISO8859-1/ directory for
localized docs. For example in the Handbook Makefile, an image entry will be similar to: IMAGES = ../../../en_US.ISO8859-1/books/handbook/install/userconfig.scr the image will be built in that directory and then installed in the right localized place at installation time. Some versions of ghostscript (7.04) have problems with the use of relative path when the arguments are passed by peps; a fix was added. Reviewed and discussed with: murray
This commit is contained in:
parent
def4734c40
commit
a89acfe274
Notes:
svn2git
2020-12-08 03:00:23 +00:00
svn path=/head/; revision=14600
2 changed files with 13 additions and 6 deletions
share/mk
|
@ -686,17 +686,19 @@ install-${_curformat}: ${DOC}.${_curformat}
|
|||
# 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.
|
||||
# en_US.ISO8859-1 is replaced with the LANGCODE to allow installation of
|
||||
# images built in en_US.ISO8859-1/ directory
|
||||
.for _curimage in ${IMAGES_PNG:M*/*}
|
||||
${MKDIR} -p ${DESTDIR}/${_curimage:H}
|
||||
${INSTALL_DOCS} ${_curimage} ${DESTDIR}/${_curimage:H}
|
||||
${MKDIR} -p ${DESTDIR}/${_curimage:H:S|${CURDIR}||:S|en_US.ISO8859-1|${LANGCODE}|}
|
||||
${INSTALL_DOCS} ${_curimage} ${DESTDIR}/${_curimage:H:S|${CURDIR}||:S|en_US.ISO8859-1|${LANGCODE}|}
|
||||
.endfor
|
||||
.for _curimage in ${IMAGES_PNG:N*/*}
|
||||
${INSTALL_DOCS} ${_curimage} ${DESTDIR}
|
||||
.endfor
|
||||
.elif ${_cf} == "tex" || ${_cf} == "dvi"
|
||||
.for _curimage in ${IMAGES_EPS:M*/*}
|
||||
${MKDIR} -p ${DESTDIR}/${_curimage:H}
|
||||
${INSTALL_DOCS} ${_curimage} ${DESTDIR}/${_curimage:H}
|
||||
${MKDIR} -p ${DESTDIR}/${_curimage:H:S|${CURDIR}||:S|en_US.ISO8859-1|${LANGCODE}|}
|
||||
${INSTALL_DOCS} ${_curimage} ${DESTDIR}/${_curimage:H:S|${CURDIR}||:S|en_US.ISO8859-1|${LANGCODE}|}
|
||||
.endfor
|
||||
.for _curimage in ${IMAGES_EPS:N*/*}
|
||||
${INSTALL_DOCS} ${_curimage} ${DESTDIR}
|
||||
|
|
|
@ -114,6 +114,7 @@ EPSTOPDF?= ${PREFIX}/bin/epstopdf
|
|||
EPSTOPDFOPTS?= ${EPSTOPDFFLAGS}
|
||||
PS2EPS?= ${PREFIX}/bin/ps2epsi
|
||||
PIC2PS?= ${GROFF} -p -S -Wall -mtty-char -man
|
||||
REALPATH?= /bin/realpath
|
||||
|
||||
# Use suffix rules to convert .scr files to .png files
|
||||
.SUFFIXES: .scr .pic .png .eps
|
||||
|
@ -125,8 +126,12 @@ PIC2PS?= ${GROFF} -p -S -Wall -mtty-char -man
|
|||
${PNGTOPNM} ${PNGTOPNMOPTS} | \
|
||||
${PNMTOPS} ${PNMTOPSOPTS} > ${.TARGET}
|
||||
|
||||
# Some versions of ghostscript (7.04) have problems with the use of
|
||||
# relative path when the arguments are passed by peps; realpath will
|
||||
# correct the problem.
|
||||
.pic.png: ${.TARGET:S/.png$/.eps/}
|
||||
${EPS2PNG} ${EPS2PNGOPTS} -o ${.TARGET} ${.ALLSRC}
|
||||
${EPS2PNG} ${EPS2PNGOPTS} -o ${.TARGET} \
|
||||
`${REALPATH} ${.TARGET:S/.png$/.eps/}`
|
||||
|
||||
.pic.eps:
|
||||
${PIC2PS} ${.ALLSRC} > ${.TARGET:S/.eps$/.ps/}
|
||||
|
@ -139,7 +144,7 @@ PIC2PS?= ${GROFF} -p -S -Wall -mtty-char -man
|
|||
|
||||
.for _curimage in ${IMAGES_GEN_PNG}
|
||||
${_curimage}: ${_curimage:S/.png$/.eps/}
|
||||
${EPS2PNG} ${EPS2PNGOPTS} -o ${.TARGET} ${.ALLSRC}
|
||||
${EPS2PNG} ${EPS2PNGOPTS} -o ${.TARGET} `${REALPATH} ${.ALLSRC}`
|
||||
.endfor
|
||||
|
||||
.for _curimage in ${IMAGES_GEN_EPS}
|
||||
|
|
Loading…
Reference in a new issue