lilypond-1.3.122
[lilypond.git] / buildscripts / set-lily.sh
blob9775748d185086c2db855206ac9a83b1f3099dbc
1 #!/bin/sh
2 # set-lily.sh --- configure LilyPond sourcetree;
4 # configure Lily in $HOME/usr/src/lilypond-x.x.x,
5 # and without installing
8 PACKAGE_NAME=LilyPond
9 export PACKAGE_NAME
10 prefix=$HOME/usr
11 sources=$prefix/src
13 showln ()
15 (set -x; ln $*)
18 testmkdir ()
20 if [ ! -x $1 ]; then
21 (set -x; mkdir -p $1)
25 testvar ()
27 var=`eval echo '\$'$1`
28 if [ "`echo "$var" | grep $2`" = "" ]; then
29 # if ! expr "$var" : ".*\($2\).*" ; then
30 eval $1=$3
31 export $1
32 echo " $1=$3"
33 echo " export $1"
38 . ./stepmake/bin/package-zet.sh
39 #urg. LILYPOND_PREFIX, _SOURCEDIR, PATH, *INPUTS all broken
40 #sourcetree=`basename \`pwd\``
41 #(cd .. ; rm lilypond-devel ; showln -s $sourcetree lilypond-devel)
44 echo You should add the following to your profile script
45 echo
46 testvar LILYPONDPREFIX lily $LILYPOND_SOURCEDIR
47 testvar MFINPUTS lily .:$MFINPUTS:$LILYPOND_SOURCEDIR/mf
48 testvar TEXINPUTS lily .:$TEXINPUTS:$LILYPOND_SOURCEDIR/ps:$LILYPOND_SOURCEDIR/tex
49 testvar GS_FONTPATH lily $HOME/usr/src/lilypond/mf/out
50 testvar MAILADDRESS "@" $USER@`hostname`
51 echo
53 echo Setting up links
54 echo
55 showln -sf $LILYPOND_SOURCEDIR/lily/out/lilypond $prefix/bin/lilypond
56 showln -sf $LILYPOND_SOURCEDIR/midi2ly/out/midi2ly $prefix/bin/midi2ly
57 showln -sf $LILYPOND_SOURCEDIR/scripts/out/ly2dvi $prefix/bin/ly2dvi
58 showln -sf $LILYPOND_SOURCEDIR/scripts/out/mudela-book $prefix/bin/mudela-book
59 showln -sf $LILYPOND_SOURCEDIR/buildscripts/out/genheader $prefix/bin/genheader
60 showln -sf $LILYPOND_SOURCEDIR/scripts/out/as2text $prefix/bin/as2text
63 testmkdir $prefix/share
64 rm -rf $prefix/share/lilypond
65 showln -sf $sources/lilypond $prefix/share/lilypond
68 BUILDDIR=`pwd`
69 LOCALES="de fr it ja nl ru"
70 for i in $LOCALES; do
71 dir=$BUILDDIR/share/locale/$i/LC_MESSAGES
72 if test ! -x $dir ; then
73 mkdir -p $dir
75 rm -f $dir/lilypond.mo
76 showln -sf $BUILDDIR/po/out/$i.mo $dir/lilypond.mo
77 done
78 rm -f afm; showln -sf $BUILDDIR/mf/out afm
79 rm -f tfm; showln -sf $BUILDDIR/mf/out tfm
81 TFM_FONTS="cmr msam"
82 for i in $TFM_FONTS; do
83 dir=`kpsewhich tfm ${i}10.tfm`
84 TFM_PATH="$TFM_PATH `dirname $dir`"
85 done
87 # urg: GNU make's $(word) index starts at 1
88 i=1
89 for dir in $TFM_PATH; do
90 rm -f $BUILDDIR/tfm.$i;
91 showln -s $dir $BUILDDIR/tfm.$i
92 i=$((i + 1))
93 done
95 if [ -f ../.gdbinit.lilypond ];
96 then
97 showln -f ../.gdbinit.lilypond .gdbinit
100 if [ -f ../.dstreamrc ]
101 then
102 showln -f ../.dstreamrc .
104 echo
106 echo Starting configuration
107 echo
108 (set -x; ./configure --prefix=$prefix --enable-debugging --enable-printing --enable-checking --disable-optimise)
110 echo "Making tags in background..."
111 make TAGS > /dev/null 2>&1 &