lilypond-0.1.14
[lilypond.git] / bin / cpgento.sh
blob74f77787db2c3a6854075f1f95a327512bb34593
1 #!/bin/sh
2 # cpgento
5 if test $# -ne 1
6 then
7 echo "Usage: "
8 echo " cpgento LOCATION, e.g.:";
9 echo
10 echo " cpgento /mnt/aix/usr/src/lily"
11 echo " CP=rcp cpgento fred@pcnov095.win.tue.nl:music/lily"
12 exit 1
15 MAKE=${MAKE:-make}
16 CP=${CP:-cp}
18 genlily="out/parser.hh out/parser.cc out/lexer.cc"
19 echo generating $genlily ...
20 $MAKE -C lily $genlily
22 genmi2mu="out/midi-parser.hh out/midi-parser.cc out/midi-lexer.cc"
23 echo generating $genmi2mu ...
24 $MAKE -C mi2mu $genmi2mu
26 lilydir=`pwd | sed "s/.*\///"`
27 todir=$1/$lilydir
28 echo "copying $lilydir -> $todir"
30 cpto() {
31 name=$1
32 tostuff=$todir/$name/out
33 genstuff="$2"
34 if [ "$CP" = "cp" -a \! -d $tostuff ]
35 then
36 echo mkdir -p $tostuff
37 mkdir -p $tostuff
39 echo $CP $genstuff $tostuff
40 (cd $name; $CP $genstuff $tostuff)
43 cpto lily "$genlily"
44 cpto mi2mu "$genmi2mu"
46 # if you cannot gen the above, you-ll probably want:
47 flexlexerh=/usr/include/FlexLexer.h
48 cpto lib $flexlexerh