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 | |
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.
-rw-r--r-- | Makefile | 18 | ||||
-rwxr-xr-x | svg_dep.sh | 18 |
2 files changed, 30 insertions, 6 deletions
@@ -1,11 +1,13 @@ BASE_SUBDIR=Math Math/Bezier Tk/Zinc SVG SVG/SVG2zinc SVG/SVG2zinc/Backend MTools MTOOLS_SUBDIR=Adapters Anim GUI Comp SVG Transform Widget - +SVG_LIST=$(shell svg_dep.sh) all: clean: rm -f *~ + rm -rf examples/AUTOGEN + rm -f Makefile.svg distclean: clean fakeroot make -f debian/rules clean @@ -18,13 +20,17 @@ $(MTOOLS_SUBDIR:%=install_m_%): install -d ${DESTDIR}${PREFIX}/share/perl5/MTools/$(@:install_m_%=%) install src/MTools/$(@:install_m_%=%)/*.pm ${DESTDIR}${PREFIX}/share/perl5/MTools/$(@:install_m_%=%) -install: all $(BASE_SUBDIR:%=install_%) $(MTOOLS_SUBDIR:%=install_m_%) +build_svg: $(SVG_LIST:%=exemples/AUTOGEN/%) + +install: all $(BASE_SUBDIR:%=install_%) $(MTOOLS_SUBDIR:%=install_m_%) $(SVG_LIST:%=install_%) install src/*.pm ${DESTDIR}${PREFIX}/share/perl5/ install src/SVG/SVG2zinc/Backend/*.pm.k ${DESTDIR}${PREFIX}/share/perl5/SVG/SVG2zinc/Backend - install -d ${DESTDIR}${PREFIX}/share/doc/mtools/examples - install exemples/*.pl exemples/*.pm ${DESTDIR}${PREFIX}/share/doc/mtools/examples - install -d ${DESTDIR}${PREFIX}/share/doc/mtools/examples/data - install exemples/data/*.svg exemples/data/*.png ${DESTDIR}${PREFIX}/share/doc/mtools/examples/data + install -d ${DESTDIR}${PREFIX}/share/doc/mtools-perl/examples + install exemples/*.pl exemples/*.pm ${DESTDIR}${PREFIX}/share/doc/mtools-perl/examples + install -d ${DESTDIR}${PREFIX}/share/doc/mtools-perl/examples/data + install exemples/data/*.svg exemples/data/*.png ${DESTDIR}${PREFIX}/share/doc/mtools-perl/examples/data #emptycursor.mask #emptycursor.xbm + +include Makefile.svg 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 |