#!/bin/sh
# Create a single source tree from the various development tools.
# Version 1.2.
# Send comments or questions to dje@cygnus.com.
#
# Assumptions:
# - ./binutils-2.6 exists
# - ./gcc-2.7.2 exists
# - ./newlib-1.7.0 exists
#
# The tree is faked, using symlinks.  The goal is to keep it simple while
# providing a working example.
#
# After running this script:
# 1) mkdir build
# 2) cd build
# 3) ../src/configure --host=[your-host] --target=[your-target] [other options]
# 4) make all info
# 5) make install install-info
#
# Building in a separate directory assumes of course that you have a version
# of `make' that understands VPATH.  GNU Make is such a critter.
#
# That's it.

mkdir src
cd src

for f in ../binutils-2.6/*
do
	ln -s $f .
done

ln -s ../newlib-1.7.0/newlib .
ln -s ../newlib-1.7.0/libgloss .
ln -s ../gcc-2.7.2 gcc

# Target library configuration has undergone lots of changes recently.
# We need the configure support from newlib-1.7.0.
for f in configure configure.in config-ml.in Makefile.in
do
	rm -f $f
	ln -s ../newlib-1.7.0/$f .
done

exit 0
