[Mono-list] mono/mcs bootstrap script
Stephen Bardsley
sbardsley@rlwinc.com
Tue, 10 Sep 2002 08:08:40 -0400
Greetings:
I don't know if this is of any value to anyone but me.
Below I offer the following shell script for Linux, which I use
to bootstrap the cvs sources. It seems to work pretty good,
and I don't have to remember all the steps in the process.
Enjoy!
Regards,
Steve
_____________________
Stephen Bardsley
RLW Inc.
Malta, NY
#!/bin/sh
##########################################################################
#
# This script is a quick hack to facilitate the sometimes
# hair raising process of bootstrapping mono and mcs from
# cvs sources.
#
# There is no promise this will work for you or forever.
# So YMMV, otherwise enjoy!
#
# "Steve Bardsley" <sbardsley@rlwinc.com>
#
##########################################################################
#
# Environment:
#
# The following variables set up the build environment.
# You will need to adjust at least the PROJ variable
# to suit your needs.
#
# You should have the necessary support packages already
# installed in the $MONO_INST path. See the Mono
# website or details, a good place to start is:
#
# http://www.go-mono.com/download.html
#
# project root directory
# Modify this to match your local mono project directory.
# All source packages should reside in this directory.
#
PROJ=$HOME/Projects/Mono
# current distribution
# This should match the current source distribution
# (e.g. mono-0.15 and mcs-0.15)
#
DIST=0.15
# local install path
# This is where everything gets installed
#
MONO_INST=$PROJ/install
# adjustments to the local environment
# Stuff needed to build Mono
# You probably don't need to modify this.
#
PATH=$MONO_INST/bin:$PATH
LD_LIBRARY_PATH=$MONO_INST/lib:$LD_LIBRARY_PATH
ACLOCAL_FLAGS="-I $MONO_INST/share/aclocal"
echo
echo '------------------------------------------------------------------------'
echo 'Start Time: '`date`
echo '------------------------------------------------------------------------'
echo
cd $PROJ
echo
echo '------------------------------------------------------------------------'
echo ' Build mono-'$DIST
echo '------------------------------------------------------------------------'
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 '------------------------------------------------------------------------'
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
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 '------------------------------------------------------------------------'
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 '------------------------------------------------------------------------'
echo
pushd mcs
if ! make -f makefile.gnu ; then
echo
echo $0': 2nd cvs mcs build failed, which can happen, continuing...'
echo
fi
make -f makefile.gnu install prefix=$MONO_INST
popd
echo
echo '------------------------------------------------------------------------'
echo 'Stop Time: '`date`
echo '------------------------------------------------------------------------'
echo