From ee62dcb0a6e3080f124b795ef7121b35c77c9276 Mon Sep 17 00:00:00 2001 From: Vincent Richard Date: Sun, 3 Feb 2013 14:44:52 +0100 Subject: [PATCH] Fixed script for MacOS X. --- doc/book/images/Makefile | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/doc/book/images/Makefile b/doc/book/images/Makefile index c9a534e8..95d54863 100644 --- a/doc/book/images/Makefile +++ b/doc/book/images/Makefile @@ -1,14 +1,16 @@ -# 'inkscape' is needed for converting from SVG to PNG +# Either Inkscape or ImageMagick is needed for converting from SVG to PNG. +# Please note that Inkscape gives better results, though. + +SHELL=bash # fix for 'echo -n' on MacOS X build-makefile: @echo "# Auto-generated file" > Makefile2 @echo ".SUFFIXES: .png .svg" >> Makefile2 @echo -n "foo: " >> Makefile2 - @for f in *.svg ; do (echo -n " $$f" | sed 's/svg/png/g') >> Makefile2 ; done + @for f in *.svg ; do (echo -n `basename "$$f" .svg`'.png ') >> Makefile2 ; done @echo >> Makefile2 @echo " @echo -n" >> Makefile2 @echo ".svg.png:" >> Makefile2 @echo ' echo Converting $$<' >> Makefile2 - @echo ' inkscape -b "#ffffff" -w 1000 -e $$@ $$<' >> Makefile2 + @echo ' ( inkscape -b "#ffffff" -w 1000 -e $$@ $$< || convert -background none -density 300 -resize 1000x $$< $$@ )' >> Makefile2 @make -f Makefile2 -