1 # This file is part of Shapes.
3 # Shapes is free software: you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation, either version 3 of the License, or
8 # Shapes is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
13 # You should have received a copy of the GNU General Public License
14 # along with Shapes. If not, see <http://www.gnu.org/licenses/>.
16 # Copyright 2008 Gustaf Hendeby
18 %.pdf %.stdout: %.shape $(SHEXT_FILES)
19 test -d $(@D) || ${mkdir_p} $(@D)
20 $(SHAPES) $(SHAPESFLAGS) --in $< --out $*.pdf > $*.stdout
22 %_3.pdf %.stdout: %.shape $(SHEXT_FILES)
23 test -d $(@D) || ${mkdir_p} $(@D)
24 $(SHAPES) $(SHAPESFLAGS) -vs1.3 --in $< --out $*_3.pdf > $*.stdout
26 # Some stupid versions of convert exit with a non-zero value even though the conversion was a success...
28 -convert -antialias -density 100 -resize $(shell echo $@ | ${SED} -e 's!.*_\([^._]*\).jpg!\1!') $< $@
31 -convert -antialias -density `echo 150 \* 150 / $$(identify $< | sed -e 's!.* PDF \([^x]*\)x\([^ ]*\).*!\2!') | bc` -resize x150 $< $@
34 -convert -antialias -density `echo 50 \* 150 / $$(identify $< | sed -e 's!.* PDF \([^x]*\)x\([^ ]*\).*!\2!') | bc` -resize x50 $< $@
37 -convert -antialias -density `echo 150 \* 150 / $$(identify $< | sed -e 's!.* PDF \([^x]*\)x\([^ ]*\).*!\1!') | bc` -resize 150x $< $@
40 -convert -antialias -density `echo 50 \* 150 / $$(identify $< | sed -e 's!.* PDF \([^x]*\)x\([^ ]*\).*!\1!') | bc` -resize 50x $< $@
42 %.xml : ${partsdir}/%/index.sxml ${formatsdir}/html.xsl ${DEPDIR}/%.ssidep
43 if ${SSI} --in $< ${SSIFLAGS} > $*.Txml; \
51 ${DEPDIR}/%.ssidep : ${partsdir}/%/index.sxml Makefile
52 test -d $(@D) || ${mkdir_p} ${@D}
53 if $(SSI) --in $< $(SSIFLAGS) --head $*.xml --deps > \
54 ${DEPDIR}/$*.Tssidep; \
56 ${SED} -e 's!^.*:!nobase_dist_noinst_DATA += $< !' \
57 ${DEPDIR}/$*.Tssidep > ${DEPDIR}/$*.dist ; \
58 ${SED} -e 's!^!$@ !' ${DEPDIR}/$*.Tssidep > $@ ; \
59 mv ${DEPDIR}/$*.Tssidep $@; \
61 ${RM} ${DEPDIR}/$*.Tssidep; \
66 %.html : %.xml ${partsdir}/%/formats/html.xsl ${formatsdir}/html.xsl
67 test -d ${@D} || ${mkdir_p} ${@D} ; \
68 ( $(SAXON) $< $$( test -f ${partsdir}/$*/formats/html.xsl || \
69 echo '${srcdir}'/ )${partsdir}/$*/formats/html.xsl || exit 1 ) | \
70 ${POSTPROC_HTML} > $*.html
71 if $(SAXON) $@ $$( test -f ${toolsdir}/xhtml-deps/filter.xsl || \
72 echo '${srcdir}'/)${toolsdir}/xhtml-deps/filter.xsl > \
73 ${DEPDIR}/$*.Thtmldep ; \
75 echo "${htmldepvar} += $$( tr ' ' '\n' < ${DEPDIR}/$*.Thtmldep | sort -u | tr '\n' ' ' )" > ${DEPDIR}/$*.htmldep ; \
76 ${RM} ${DEPDIR}/$*.Thtmldep ; \
78 ${RM} ${DEPDIR}/$*.Thtmldep ; \