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, 2014 Gustaf Hendeby, Henrik Tidefelt
18 CONVERT_FLAGS = -antialias -flatten -background white
20 %.pdf %.stdout: %.shape $(SHEXT_FILES)
21 test -d $(@D) || ${mkdir_p} $(@D)
22 $(SHAPES) $(SHAPESFLAGS) --in $< --out $*.pdf > $*.stdout0
23 mv $*.stdout0 $*.stdout
25 %_3.pdf %.stdout: %.shape $(SHEXT_FILES)
26 test -d $(@D) || ${mkdir_p} $(@D)
27 $(SHAPES) $(SHAPESFLAGS) -vs1.3 --in $< --out $*_3.pdf > $*.stdout0
28 mv $*.stdout0 $*.stdout
30 %.stdout: %.blank $(SHEXT_FILES)
31 test -d $(@D) || ${mkdir_p} $(@D)
32 $(SHAPES) $(SHAPESFLAGS) --in $< > $*.stdout0
35 # Some stupid versions of convert exit with a non-zero value even though the conversion was a success...
37 -convert $(CONVERT_FLAGS) -density 100 -resize $(shell echo $@ | ${SED} -e 's!.*_\([^._]*\).jpg!\1!') $< $@
40 -convert $(CONVERT_FLAGS) -density `echo 150 \* 150 / $$(identify $< | sed -e 's!.* [a-zA-Z0-9]\{1,\} \([^x]*\)x\([^ ]*\).*!\2!') | bc` -resize x150 $< $@
43 -convert $(CONVERT_FLAGS) -density `echo 50 \* 150 / $$(identify $< | sed -e 's!.* [a-zA-Z0-9]\{1,\} \([^x]*\)x\([^ ]*\).*!\2!') | bc` -resize x50 $< $@
46 -convert $(CONVERT_FLAGS) -density `echo 150 \* 150 / $$(identify $< | sed -e 's!.* [a-zA-Z0-9]\{1,\} \([^x]*\)x\([^ ]*\).*!\1!') | bc` -resize 150x $< $@
49 -convert $(CONVERT_FLAGS) -density `echo 50 \* 150 / $$(identify $< | sed -e 's!.* [a-zA-Z0-9]\{1,\} \([^x]*\)x\([^ ]*\).*!\1!') | bc` -resize 50x $< $@
51 %.xml : ${partsdir}/%/index.sxml ${formatsdir}/html.xsl ${DEPDIR}/%.ssidep
52 if ${SSI} --in $< ${SSIFLAGS} > $*.Txml; \
60 ${DEPDIR}/%.ssidep : ${partsdir}/%/index.sxml Makefile
61 test -d $(@D) || ${mkdir_p} ${@D}
62 if $(SSI) --in $< $(SSIFLAGS) --head $*.xml --deps > \
63 ${DEPDIR}/$*.Tssidep; \
65 ${SED} -e 's!^.*:!nobase_dist_noinst_DATA += $< !' \
66 ${DEPDIR}/$*.Tssidep > ${DEPDIR}/$*.dist ; \
67 ${SED} -e 's!^!$@ !' ${DEPDIR}/$*.Tssidep > $@ ; \
68 mv ${DEPDIR}/$*.Tssidep $@; \
70 ${RM} ${DEPDIR}/$*.Tssidep; \
75 %.html : %.xml ${partsdir}/%/formats/html.xsl ${formatsdir}/html.xsl
76 test -d ${@D} || ${mkdir_p} ${@D} ; \
77 ( $(SAXON) $< $$( test -f ${partsdir}/$*/formats/html.xsl || \
78 echo '${srcdir}'/ )${partsdir}/$*/formats/html.xsl || exit 1 ) | \
79 ${POSTPROC_HTML} > $*.html
80 if $(SAXON) $@ $$( test -f ${toolsdir}/xhtml-deps/filter.xsl || \
81 echo '${srcdir}'/)${toolsdir}/xhtml-deps/filter.xsl > \
82 ${DEPDIR}/$*.Thtmldep ; \
84 echo "${htmldepvar} += $$( tr ' ' '\n' < ${DEPDIR}/$*.Thtmldep | sort -u | tr '\n' ' ' )" > ${DEPDIR}/$*.htmldep ; \
85 ${RM} ${DEPDIR}/$*.Thtmldep ; \
87 ${RM} ${DEPDIR}/$*.Thtmldep ; \