#!/bin/sh
#
# This script sets things up for Reinhard Jessich's cross_mingw build
# script and then runs it.
#
CROSS_MINGW=../jessich/cross_mingw.sh.gz
BINUTILS_VER=2.11.2
BINUTILS=../binutils/binutils-${BINUTILS_VER}.tar.bz2
COMPILER_NAMEVER=gcc-2.95.3
COMPILER=../gcc/${COMPILER_NAMEVER}.tar.gz
W32API=../mingw/w32api-1.0.1-20010726-src.tar.gz
RUNTIME=../mingw/mingw-runtime-1.0.1-20010726-src.tar.gz
# Set up the directory structure
/bin/rm -rf build
mkdir build build/dist build/tars
PREFIX=`/bin/pwd`/build/dist
export PATH=$PATH:$PREFIX/bin
# Copy the source files over
gzip -dc < $CROSS_MINGW > build/cross_mingw.sh
cp $BINUTILS build/tars
cp $COMPILER build/tars
cp $W32API build/tars
cp $RUNTIME build/tars
# Run the script
#PREFIX_CROSS_INSTALL=`pwd`/build/dist
PREFIX_CROSS_INSTALL=/usr/local/cross-tools
export PREFIX_CROSS_INSTALL
(cd build; sh cross_mingw.sh)
