#!/bin/sh # Set up the environment . set_aliases LASTTIME=`date +%s` LASTTIME_TOT=`date +%s` OLD_PATH=$PATH INIT_DIR=`pwd` EIFFEL_SRC=$EXPORT_DIR; export EIFFEL_SRC ISE_EIFFEL=$FINAL_INSTALL_DIR; export ISE_EIFFEL INSTALL_DIR=$FINAL_INSTALL_DIR echo > $COMPILE_LOG if [ -z "$ISE_PLATFORM" ]; then remtrace Couldnt find environment variable ISE_PLATFORM CANCEL fi # Check everything's fine if [ ! -d $EXPORT_DIR ]; then remtrace Couldnt find the directory with the tgzs. CANCEL fi if [ -e ecfree.tar.gz ]; then MULTIPLE_EDITIONS="True" else MULTIPLE_EDITIONS="" fi remtrace Compile C code of the libraries remtrace \"A tout seigneur tout honneur\", let\'s start with the run-time if [ ! -e c.tar.gz ]; then remtrace 'No.tar.gz for the C directory' CANCEL fi fullrd C gunzip -c c.tar.gz | tar -xf - if [ ! -d C ]; then remtrace No C directory CANCEL fi if [ "$MULTIPLE_EDITIONS" ]; then cd C remtrace Compile a non-commercial run-time cd run-time sed -e "s/\/\*\#define\ NON_COMMERCIAL\*\/$/\#define\ NON_COMMERCIAL/g" main.c >> new_main.c move new_main.c main.c cd .. . quick_configure >> $COMPILE_LOG safe_md $EXPORT_DIR/free_rt move run-time/*.so $EXPORT_DIR/free_rt move run-time/*.a $EXPORT_DIR/free_rt if [ ! -e $EXPORT_DIR/free_rt/libwkbench.a ]; then remtrace Couldnt generate the run-time CANCEL else if [ ! -e $EXPORT_DIR/free_rt/libwkbench.so ]; then remtrace Couldnt generate the run-time CANCEL fi fi fi remtrace Compile a commercial run-time cd $EXPORT_DIR fullrd C gunzip -c c.tar.gz | tar -xf - cd C . quick_configure >> $COMPILE_LOG safe_md $EXPORT_DIR/commercial_rt cp run-time/*.so $EXPORT_DIR/commercial_rt cp run-time/*.a $EXPORT_DIR/commercial_rt if [ ! -e $EXPORT_DIR/commercial_rt/libwkbench.a ]; then remtrace Couldnt generate the run-time CANCEL else if [ ! -e $EXPORT_DIR/commercial_rt/libwkbench.so ]; then remtrace Couldnt generate the run-time CANCEL fi fi cd $EXPORT_DIR remtrace Extract the delivery if [ ! -e delivery.tar.gz ]; then remtrace 'No.tar.gz of the delivery' CANCEL else remtrace Delivery if [ -d $INSTALL_DIR ]; then fullrd $INSTALL_DIR fi safe_md $INSTALL_DIR if [ ! -d $INSTALL_DIR ]; then remtrace Cannot create $INSTALL_DIR CANCEL fi cd $INSTALL_DIR gunzip -c $EXPORT_DIR/delivery.tar.gz | tar -xf - fi cd $EXPORT_DIR #These directories should have been created by make_delivery. safe_md $INSTALL_DIR/studio/spec/unix/include safe_md $INSTALL_DIR/studio/spec/unix/bin mv $INSTALL_DIR/studio/spec/unix/*re* $INSTALL_DIR/studio/spec/unix/bin safe_md $INSTALL_DIR/studio/spec/unix/lib safe_md $INSTALL_DIR/studio/config/$ISE_PLATFORM fullrd $INSTALL_DIR/studio/spec/$ISE_PLATFORM safe_md $INSTALL_DIR/studio/spec/$ISE_PLATFORM safe_md $INSTALL_DIR/precomp/spec/$ISE_PLATFORM safe_md $INSTALL_DIR/studio/help/defaults/$ISE_PLATFORM move $INSTALL_DIR/studio/config/unix/* $INSTALL_DIR/studio/config/$ISE_PLATFORM move $INSTALL_DIR/studio/spec/unix/* $INSTALL_DIR/studio/spec/$ISE_PLATFORM move $INSTALL_DIR/precomp/spec/unix/* $INSTALL_DIR/precomp/spec/$ISE_PLATFORM move $INSTALL_DIR/studio/help/defaults/unix/* $INSTALL_DIR/studio/help/defaults/$ISE_PLATFORM fullrd $INSTALL_DIR/studio/config/unix fullrd $INSTALL_DIR/studio/spec/unix fullrd $INSTALL_DIR/precomp/spec/unix fullrd $INSTALL_DIR/studio/help/defaults/unix cp C/run-time/lib*.a $INSTALL_DIR/studio/spec/$ISE_PLATFORM/lib mac_ranlib $INSTALL_DIR/studio/spec/$ISE_PLATFORM/lib/libfinalized.a mac_ranlib $INSTALL_DIR/studio/spec/$ISE_PLATFORM/lib/libwkbench.a cp C/run-time/lib*.so $INSTALL_DIR/studio/spec/$ISE_PLATFORM/lib if [ "$MULTIPLE_EDITIONS" ]; then fullrf $EXPORT_DIR/free_rt/libebench.a fi fullrf $EXPORT_DIR/commercial_rt/libebench.a cp C/run-time/*.h $INSTALL_DIR/studio/spec/$ISE_PLATFORM/include cp C/run-time/config.sh $INSTALL_DIR/studio/spec/$ISE_PLATFORM/include remtrace "Put x2c in the new delivery" # It should already have been compiled by the configure of the run-time. cd $EXPORT_DIR/C/run-time if [ ! -f x2c ]; then echo Could not finalize a new x2c CANCEL fi move x2c $INSTALL_DIR/studio/spec/$ISE_PLATFORM/bin remtrace Recompile quick_finalize cd $EXPORT_DIR untgz_ccode quick_finalize move quick_finalize $INSTALL_DIR/studio/spec/$ISE_PLATFORM/bin remtrace "Put estudio in the new delivery" # It should already have been compiled by the configure of the run-time. cd $EXPORT_DIR/C/ipc/daemon if [ ! -f estudio ]; then echo Could not finalize a new estudio CANCEL fi move estudio $INSTALL_DIR/studio/spec/$ISE_PLATFORM/bin remtrace Then the Eiffel libraries cd $EXPORT_DIR if [ ! -e libs.tar.gz ]; then remtrace 'No.tar.gz for the library directory' CANCEL fi gunzip -c libs.tar.gz | tar -xf - if [ ! -d library ]; then remtrace No library directory CANCEL fi remtrace Then the C libraries if [ ! -e c_libs.tar.gz ]; then remtrace 'No.tar.gz for the C_library directory' CANCEL fi gunzip -c c_libs.tar.gz | tar -xf - if [ ! -d C_library ]; then remtrace No C_library directory CANCEL fi cd $EXPORT_DIR . compile_libraries cd $INSTALL_DIR . $EXPORT_DIR/compile_libraries remtrace Build move $INSTALL_DIR/build/spec/unix $INSTALL_DIR/build/spec/$ISE_PLATFORM cd $EXPORT_DIR/build untgz_ccode build gzip build move build.gz build_enterprise.gz if [ -z "$MULTIPLE_EDITIONS" ]; then gunzip -c build_enterprise.gz > $INSTALL_DIR/build/spec/$ISE_PLATFORM/bin/build fi if [ "$MULTIPLE_EDITIONS" ]; then remtrace Free Build move build.tar.gz enterprise_build.tar.gz move build_free.tar.gz build.tar.gz untgz_ccode build gzip build move build.gz build_free.gz fi remtrace Vision2_tour cd $EXPORT_DIR/vision2_tour safe_md $INSTALL_DIR/vision2_tour/spec safe_md $INSTALL_DIR/vision2_tour/spec/$ISE_PLATFORM safe_md $INSTALL_DIR/vision2_tour/spec/$ISE_PLATFORM/bin untgz_ccode vision2_tour move vision2_tour $INSTALL_DIR/vision2_tour/spec/$ISE_PLATFORM/bin remtrace Recompile CD key validator cd $EXPORT_DIR untgz_ccode setup remtrace Recompile EiffelStudio cd $EXPORT_DIR safe_md $EXPORT_DIR/ecs remtrace Enterprise edition cp ec.tar.gz ec.tar.gz.old untgz_ccode ec gzip ec move ec.gz $EXPORT_DIR/ecs/ec_enterprise.gz if [ -z "$MULTIPLE_EDITIONS" ]; then gunzip -c $EXPORT_DIR/ecs/ec_enterprise.gz > $INSTALL_DIR/studio/spec/$ISE_PLATFORM/bin/ec else remtrace University edition cp ecuni.tar.gz ecuni.tar.gz.old move ecuni.tar.gz ec.tar.gz untgz_ccode ec gzip ec move ec.gz $EXPORT_DIR/ecs/ec_university.gz remtrace Free edition cp ecfree.tar.gz ecfree.tar.gz.old move ecfree.tar.gz ec.tar.gz untgz_ccode ec gzip ec move ec.gz $EXPORT_DIR/ecs/ec_free.gz fi cd $EXPORT_DIR . compile_wizards if [ ! -z "$MULTIPLE_EDITIONS" ]; then fullrf $INSTALL_DIR/studio/spec/$ISE_PLATFORM/lib/*.a fullrf $INSTALL_DIR/studio/spec/$ISE_PLATFORM/lib/*.so fi CANCEL