]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-0.1.22
authorfred <fred>
Fri, 14 Mar 1997 14:51:12 +0000 (14:51 +0000)
committerfred <fred>
Fri, 14 Mar 1997 14:51:12 +0000 (14:51 +0000)
bin/cpgento.sh [new file with mode: 0644]

diff --git a/bin/cpgento.sh b/bin/cpgento.sh
new file mode 100644 (file)
index 0000000..74f7778
--- /dev/null
@@ -0,0 +1,49 @@
+#!/bin/sh
+# cpgento
+#
+
+if test $# -ne 1
+then
+       echo "Usage: "
+       echo "  cpgento LOCATION, e.g.:"; 
+       echo
+       echo "  cpgento /mnt/aix/usr/src/lily"
+               echo "  CP=rcp cpgento fred@pcnov095.win.tue.nl:music/lily"
+       exit 1
+fi
+
+MAKE=${MAKE:-make}
+CP=${CP:-cp}
+
+genlily="out/parser.hh out/parser.cc out/lexer.cc"
+echo generating $genlily ...
+$MAKE -C lily $genlily
+
+genmi2mu="out/midi-parser.hh out/midi-parser.cc out/midi-lexer.cc"
+echo generating $genmi2mu ...
+$MAKE -C mi2mu $genmi2mu
+
+lilydir=`pwd | sed "s/.*\///"`
+todir=$1/$lilydir
+echo "copying $lilydir -> $todir"
+
+cpto() {
+       name=$1
+       tostuff=$todir/$name/out
+       genstuff="$2"
+       if [ "$CP" = "cp" -a \! -d $tostuff ]
+       then
+               echo mkdir -p $tostuff
+               mkdir -p $tostuff
+       fi
+       echo $CP $genstuff $tostuff
+       (cd $name; $CP $genstuff $tostuff)
+}
+
+cpto lily "$genlily"
+cpto mi2mu "$genmi2mu"
+
+# if you cannot gen the above, you-ll probably want:
+flexlexerh=/usr/include/FlexLexer.h
+cpto lib $flexlexerh
+