#!/bin/sh arg=none case `uname` in Linux) if [ -f /proc/cpuinfo ] ; then ncpus=`grep -c '^processor[[:space:]]*:' /proc/cpuinfo` fi ;; SunOS) ncpus=`/usr/sbin/psrinfo | wc -l` ;; IRIX*) ncpus=`hinv | awk '/^[0-9]+ [0-9]+ MHZ/ {print $1}'` ;; esac if [ -z "$ncpus" ]; then ncpus=1; fi if [ "$ncpus" -eq "0" ]; then ncpus=1; fi if make --version 2>/dev/null | grep GNU >/dev/null 2>&1; then make_args="-j $ncpus" else make_args= fi if [ $# -gt 0 ]; then arg=$1 if [ "$arg" != cecil -a "$arg" != "-cecil" -a "$arg" != "-library" -a "$arg" != "-silent" ]; then echo "Usage: finish_freezing [ -cecil | -library | -silent ]" exit 1 fi fi if [ "$arg" != "-library" ]; then echo "Preparing C compilation ..." $ISE_EIFFEL/studio/spec/$ISE_PLATFORM/bin/quick_finalize . o else echo "Generating C libraries ..." fi if [ ! -f config.sh ]; then cp $ISE_EIFFEL/studio/spec/$ISE_PLATFORM/include/config.sh . fi sh Makefile.SH if [ "$arg" = cecil -o "$arg" = "-cecil" ] ; then echo Generating CECIL library ... make $make_args cecil && echo "C compilation completed" else make $make_args && echo "C compilation completed" fi