[Mono-list] [ROOKIE QUESTION] corlib

Stephen Bardsley sbardsley@rlwinc.com
Fri, 27 Sep 2002 17:50:56 -0400


Greetings:

I slammed together the following bash script to help me
resync mcs and mono.  It works for me, but of course YMMV

The script relies on the following assumptions:

   o  Your mono project is in one common source tree.

   o  You have already downloaded and untarred the mono
      and mcs distributions (version 0.15 for this
      version of the script; it is parameterized)

   o  You have the cvs versions already checked out.

I hope this helps.  If nothing more than showing the
process I use.  It seems to work; at least most of
the time.

Cheers,
Steve
_____________________
Stephen Bardsley
RLW Inc.
Malta, NY 





#!/bin/bash

echo
echo '------------------------------------------------------------------------'
echo 'Start Time: '`date`
echo '------------------------------------------------------------------------'
echo

# project root directory
PROJ=$HOME/Projects/Mono

# current distribution
DIST=0.15

# local install path
MONO_INST=$PROJ/install

# adjustments to the local environment
PATH=$MONO_INST/bin:$PATH
LD_LIBRARY_PATH=$MONO_INST/lib:$LD_LIBRARY_PATH
ACLOCAL_FLAGS="-I $MONO_INST/share/aclocal"

cd $PROJ

echo
echo '------------------------------------------------------------------------'
echo '  Build  mono-'$DIST
echo '------------------------------------------------------------------------'
pushd mono-$DIST
./configure --prefix=$MONO_INST
if ! make ; then
    echo
    echo $0':  mono-'$DIST' build failed, exiting...'
    echo
    exit
fi
make install
popd

echo
echo '------------------------------------------------------------------------'
echo '  Build  1st cvs mcs'
echo '------------------------------------------------------------------------'
pushd mcs
make -f makefile.gnu clean
cvs -z3 update -d
if ! make -f makefile.gnu ; then
    echo
    echo $0':  1st cvs mcs build failed, which is expected, continuing...'
    echo
    #exit
fi
cp -u class/lib/corlib.dll $MONO_INST/lib
cp -u mcs/mcs.exe $MONO_INST/bin
make -f makefile.gnu install prefix=$MONO_INST
popd

echo
echo '------------------------------------------------------------------------'
echo '  Build  cvs mono'
echo '------------------------------------------------------------------------'
pushd mono
make distclean
cvs -z3 update -d
./autogen.sh --prefix=$MONO_INST
if ! make ; then
    echo
    echo $0':  cvs mono build failed, exiting...'
    echo
    exit
fi
make install
popd

echo
echo '------------------------------------------------------------------------'
echo '  Build  2nd cvs mcs'
echo '------------------------------------------------------------------------'
pushd mcs
if ! make -f makefile.gnu ; then
    echo
    echo $0':  2nd cvs mcs build failed, which can happen, continuing...'
    echo
    #exit
fi
make -f makefile.gnu install prefix=$MONO_INST
popd

echo
echo '------------------------------------------------------------------------'
echo 'Stop Time: '`date`
echo '------------------------------------------------------------------------'
echo