diff options
author | ribet | 2007-05-03 07:53:39 +0000 |
---|---|---|
committer | ribet | 2007-05-03 07:53:39 +0000 |
commit | b95505d4faaa88c69c0bd75d7b9ae8e125aa0b42 (patch) | |
tree | 4dac7b0b93304e13b346bdaa1bc2c5750d320320 /svg_dep.sh | |
parent | 71d30241213ef44eafe93fba7134cd79a1851d50 (diff) | |
download | mtc-b95505d4faaa88c69c0bd75d7b9ae8e125aa0b42.zip mtc-b95505d4faaa88c69c0bd75d7b9ae8e125aa0b42.tar.gz mtc-b95505d4faaa88c69c0bd75d7b9ae8e125aa0b42.tar.bz2 mtc-b95505d4faaa88c69c0bd75d7b9ae8e125aa0b42.tar.xz |
SVG files are precompiled for examples.
Diffstat (limited to 'svg_dep.sh')
-rwxr-xr-x | svg_dep.sh | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/svg_dep.sh b/svg_dep.sh new file mode 100755 index 0000000..5e3ac1b --- /dev/null +++ b/svg_dep.sh @@ -0,0 +1,18 @@ +#!/bin/sh + +rm -f Makefile.svg + +for f in `cd exemples;grep '\.svg["'\''\#]' *.pl *.pm|sed 's/.*["'\'']\([A-Za-z0-9_]*\)\.svg\(\#*[A-Za-z0-9_]*\)["'\''].*/\1\2.pm/' | sed 's/\#/\//'|sort -u` ; do + echo $f + n=${f%%.pm} + s=$(echo $n | sed 's/\//.svg#/' | sed 's/^\([^#]*\)$/\1.svg/') + cat >> Makefile.svg <<EOF +exemples/AUTOGEN/$f: exemples/data/${n%%/*}.svg + cd exemples; perl -e "BEGIN {unshift @INC, '.', './data', '../src';} use MTools;new MTools (800, 600, '');minstanciate ('$s',1);" + +install_$f: exemples/AUTOGEN/$f + install -d \${DESTDIR}\${PREFIX}/share/doc/mtools-perl/examples/AUTOGEN/`dirname $n` + install \$< \${DESTDIR}\${PREFIX}/share/doc/mtools-perl/examples/AUTOGEN/`dirname $n` + +EOF +done |