#!/bin/sh # Build Eiffel Studio # Changelog # - 20.4.2006 Update for the move of the 'C' and 'Eiffel' directory # from Src/bench to Src/ # Requirements: # - Checkout of the EiffelStudio trunk pointed to by EIFFEL_SVN ROOT_DIR=`pwd` BUILD_DIR="$ROOT_DIR/build" BUILD_TARGET="bench" if [ ! -d "$EIFFEL_SVN/Src" ] then echo "You must have EIFFEL_SVN setup to the trunk directory." exit 1 fi if [ ! -d "$ISE_EIFFEL" ] then echo "You must have ISE_EIFFEL point to a 57 version of Eiffel." exit 1 fi if [ "x$ISE_PLATFORM" = "x" ] then echo "You must have ISE_PLATFORM specify you current platform." exit 1 fi if [ ! -x `which ec` ] then echo "'ec' must be in you path." exit 1 fi if ! ec -version | grep -q 'version 5.7' then echo "Your eiffel compiler must be version 5.7" echo "Yours reports:" ec -version exit 1 fi if [ -x "$BUILD_DIR" ] then echo -n "Build directory exists, do you want to remove it first? [y/n] " read yesno if [ "$yesno" = "y" ] then rm -rf "$BUILD_DIR" else echo "Building aborted." exit 1 fi fi # ---------------------------------------------------------------------- # We set up a correct directory structure by using links. echo -n "Setting up directory structure ... " mkdir "$BUILD_DIR" cd "$BUILD_DIR" export EIFFEL_SRC=`pwd` for dir in $EIFFEL_SVN/Src/* do ln -s $dir done ln -s $EIFFEL_SVN/Delivery echo "done." # ---------------------------------------------------------------------- # We have to setup all dependencies echo -n "Unpacking GOBO ... " cd $EIFFEL_SRC/library tar xzf $EIFFEL_SVN/free_add_ons/gobo/gobo_34_unix.tgz echo "done." # ---------------------------------------------------------------------- # Building the run-time echo -n "Building run-time system ... " echo -n "Run-time compilation" > $ROOT_DIR/run_time_compile.log cd $EIFFEL_SRC/C if [ -f Makefile ] then make clobber >> $ROOT_DIR/run_time_compile.log if [ $? != 0 ] then echo "Error cleaning up the run-time system." echo "Check run_time_compile.log" exit 1 fi fi ./quick_configure >> $ROOT_DIR/run_time_compile.log 2>&1 echo "done." if [ $? != 0 ] then echo "Error compiling the run-time system." echo "Check run_time_compile.log" exit 1 fi # ---------------------------------------------------------------------- # Building all C libraries echo "Building C libraries:" echo -n "Event ... " cd $EIFFEL_SRC/library/event/Clib finish_freezing -library > $ROOT_DIR/compile_event_lib.log 2>&1 echo "done." echo -n "Net ... " cd $EIFFEL_SRC/library/net/Clib finish_freezing -library > $ROOT_DIR/compile_net_lib.log 2>&1 echo "done." echo -n "Vision2 ... " cd $EIFFEL_SRC/library/vision2/Clib finish_freezing -library > $ROOT_DIR/compile_vision2_lib.log 2>&1 echo "done." echo -n "Vision2 Implementation ... " cd $EIFFEL_SRC/library/vision2/implementation/gtk/Clib finish_freezing -library > $ROOT_DIR/compile_vision2_impl_lib.log 2>&1 echo "done." # ---------------------------------------------------------------------- # Compiling 'ec' and 'estudio' echo -n "Configuring Ace files ... " cd $BUILD_DIR cp "$EIFFEL_SRC/Eiffel/Ace/ec.acex" . echo "done." echo -n "Compiling the IDE ... " cd $BUILD_DIR rm -rf EIFGENs *.epr ec -stop -config ec.acex -target $BUILD_TARGET -finalize > $ROOT_DIR/compile_ide.log 2>&1 echo "done." if [ $? != 0 ]; then echo "Error compiling the IDE." echo "Check compile_ide.log" exit 1 fi echo -n "Freezing the IDE ... " cd $BUILD_DIR/EIFGENs/$BUILD_TARGET/F_code finish_freezing > $ROOT_DIR/freeze_ide.log 2>&1 mv ec $ROOT_DIR echo "done." if [ ! -f "$ROOT_DIR/ec" ]; then echo "Error freezing the IDE." echo "Check freeze_ide.log" exit 1 fi echo "There should now be an 'ec' binary in you current directory."