#! /bin/sh
###############################################################################
#
# File:         gcc-2.6.3.make.sh
# RCS:          $Header: $
# Description:  compile gcc
# Author:       Christian Limpach <chris@nice.ch>
# Created:      Wed Apr  5 20:19:06 1995
# Modified:     Thu Apr  6 19:24:10 1995 (Christian Limpach) chris@nice.ch
# Language:     Shell-script
# Package:      N/A
# Status:       Experimental (Do Not Distribute)
#
# (C) Copyright 1995, Christian Limpach, all rights reserved.
# This is free software, and you are welcome to redistribute it
# under certain conditions; see ftp://nice.ethz.ch/users/chris/TERMS
# for details. This software comes with ABSOLUTELY NO WARRANTY.
#
###############################################################################

./configure --target=next --with-gnu-ld --with-gnu-as --prefix=/usr/local/gnu
perl -pi~ -e 's/^(INSTALL_PROGRAM='\''\$[{(]INSTALL[})])'\''$/$1 -s'\''/; ' \
          -e 's/^(s%\@INSTALL_PROGRAM\@%\$[{(]INSTALL[})])(%g)$/$1 -s $2/' \
    	 ./config.status;
./config.status
echo === 1
make LANGUAGES=c
echo === 2
make stage1
echo === 3
make CC="stage1/xgcc -Bstage1/" CFLAGS="-g -O" LDFLAGS="-s"
echo === 4
make objc-runtime CC="stage1/xgcc -Bstage1/" CFLAGS="-g -O" LDFLAGS="-s"
echo
echo now do the following as root:
echo -n 'make install install-libobjc '
echo 'CC="stage1/xgcc -Bstage1/" CFLAGS="-g -O" LDFLAGS="-s"'
