|
Lines 51-57
Link Here
|
| 51 |
IMAGES_GEN_EPS=${IMAGES:M*.png:S/.png$/.eps/} |
51 |
IMAGES_GEN_EPS=${IMAGES:M*.png:S/.png$/.eps/} |
| 52 |
IMAGES_GEN_PDF=${IMAGES:M*.eps:S/.eps$/.pdf/} |
52 |
IMAGES_GEN_PDF=${IMAGES:M*.eps:S/.eps$/.pdf/} |
| 53 |
|
53 |
|
| 54 |
CLEANFILES+= ${IMAGES_GEN_PNG} ${IMAGES_GEN_EPS} ${IMAGES_GEN_PDF} |
54 |
CLEANFILES+= ${IMAGES_GEN_PNG} ${IMAGES_GEN_EPS} ${IMAGES_GEN_PDF} \ |
|
|
55 |
${IMAGES:M*.scr:S/.scr$/.png/} ${IMAGES:M*.scr:S/.scr$/.eps/} |
| 56 |
.if ${.CURDIR}!=${.OBJDIR} |
| 57 |
CLEANFILES+= ${IMAGES:M*.png} ${IMAGES:M*.eps} |
| 58 |
.endif |
| 55 |
|
59 |
|
| 56 |
IMAGES_PNG=${IMAGES:M*.png} ${IMAGES_GEN_PNG} ${IMAGES:M*.scr:S/.scr$/.png/} |
60 |
IMAGES_PNG=${IMAGES:M*.png} ${IMAGES_GEN_PNG} ${IMAGES:M*.scr:S/.scr$/.png/} |
| 57 |
IMAGES_EPS=${IMAGES:M*.eps} ${IMAGES_GEN_EPS} ${IMAGES:M*.scr:S/.scr$/.eps/} |
61 |
IMAGES_EPS=${IMAGES:M*.eps} ${IMAGES_GEN_EPS} ${IMAGES:M*.scr:S/.scr$/.eps/} |
|
Lines 71-78
Link Here
|
| 71 |
.SUFFIXES: .scr .png .eps |
75 |
.SUFFIXES: .scr .png .eps |
| 72 |
|
76 |
|
| 73 |
.scr.png: |
77 |
.scr.png: |
|
|
78 |
@mkdir -p `dirname ${.TARGET}` |
| 74 |
scr2png < ${.IMPSRC} > ${.TARGET} |
79 |
scr2png < ${.IMPSRC} > ${.TARGET} |
| 75 |
.scr.eps: |
80 |
.scr.eps: |
|
|
81 |
@mkdir -p `dirname ${.TARGET}` |
| 76 |
scr2png < ${.ALLSRC} | pngtopnm | pnmtops -noturn > ${.TARGET} |
82 |
scr2png < ${.ALLSRC} | pngtopnm | pnmtops -noturn > ${.TARGET} |
| 77 |
|
83 |
|
| 78 |
# We can't use suffix rules to generate the rules to convert EPS to PNG and |
84 |
# We can't use suffix rules to generate the rules to convert EPS to PNG and |
|
Lines 80-97
Link Here
|
| 80 |
# vice versa, leading to a loop in the dependency graph. Instead, build |
86 |
# vice versa, leading to a loop in the dependency graph. Instead, build |
| 81 |
# the targets on the fly. |
87 |
# the targets on the fly. |
| 82 |
|
88 |
|
|
|
89 |
.for _curimage in ${IMAGES:M*.png} ${IMAGES:M*.eps} |
| 90 |
.if ${.CURDIR}!=${.OBJDIR} |
| 91 |
${_curimage}: ${.CURDIR}/${_curimage} |
| 92 |
@mkdir -p `dirname ${.TARGET}` |
| 93 |
cp ${.ALLSRC} ${.TARGET} |
| 94 |
.endif |
| 95 |
.endfor |
| 96 |
|
| 83 |
.for _curimage in ${IMAGES_GEN_PNG} |
97 |
.for _curimage in ${IMAGES_GEN_PNG} |
| 84 |
${_curimage}: ${_curimage:S/.png$/.eps/} |
98 |
${_curimage}: ${_curimage:S/.png$/.eps/} |
|
|
99 |
@mkdir -p `dirname ${.TARGET}` |
| 85 |
peps -r ${EPS2PNG_RES} -p -o ${.TARGET} ${.ALLSRC} |
100 |
peps -r ${EPS2PNG_RES} -p -o ${.TARGET} ${.ALLSRC} |
| 86 |
.endfor |
101 |
.endfor |
| 87 |
|
102 |
|
| 88 |
.for _curimage in ${IMAGES_GEN_EPS} |
103 |
.for _curimage in ${IMAGES_GEN_EPS} |
| 89 |
${_curimage}: ${_curimage:S/.eps$/.png/} |
104 |
${_curimage}: ${_curimage:S/.eps$/.png/} |
|
|
105 |
@mkdir -p `dirname ${.TARGET}` |
| 90 |
pngtopnm ${.ALLSRC} | pnmtops -noturn > ${.TARGET} |
106 |
pngtopnm ${.ALLSRC} | pnmtops -noturn > ${.TARGET} |
| 91 |
.endfor |
107 |
.endfor |
| 92 |
|
108 |
|
| 93 |
.for _curimage in ${IMAGES_GEN_PDF} |
109 |
.for _curimage in ${IMAGES_GEN_PDF} |
| 94 |
${_curimage}: ${_curimage:S/.pdf$/.eps/} |
110 |
${_curimage}: ${_curimage:S/.pdf$/.eps/} |
|
|
111 |
@mkdir -p `dirname ${.TARGET}` |
| 95 |
epstopdf --outfile=${.TARGET} ${_curimage:S/.pdf$/.eps/} |
112 |
epstopdf --outfile=${.TARGET} ${_curimage:S/.pdf$/.eps/} |
| 96 |
.endfor |
113 |
.endfor |
| 97 |
|
114 |
|