#! /bin/bash
#
# IBM Omni driver
# Copyright (c) International Business Machines Corp., 2000
#
# This library is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published
# by the Free Software Foundation; either version 2.1 of the License, or
# (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See
# the GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with this library; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#

# Load in the list of drivers to build
if test -z "${DEVICES}"; then
	source ../devicesXML.list
	DEVICES=${DEVICELIST}
fi

echo "Making sure that CopyOmniDeviceBIs is built"
make CopyOmniDeviceBIs

# Build break?
if test $? != 0; then
	echo "Error: Build break!"

	exit
fi

# Loop through the drivers
for i in ${DEVICES}; do
	DIR="`echo ${i} | sed -e 's/~//g' -e 's/_/ /g'`"

	if test "${DIR}" = "test"; then
		continue
	fi

        # Copy the instances and blitters for that driver here
	echo ./CopyOmniDeviceBIs "${DIR}"
	./CopyOmniDeviceBIs "${DIR}"
done
