#!/bin/ksh
#$Id: rebuild,v 1.2 2003/09/23 09:48:39 RogerSeguin Exp $

topdir=`dirname $0`
topdir=`(cd $topdir && pwd)`

installDir=/opt
export CFLAGS='-mcpu=pentium4 -march=pentium4 -Wall'
export CXXFLAGS="$CFLAGS"
export PKG_CONFIG_PATH=$installDir/lib/pkgconfig:/usr/lib/pkgconfig

RebuildComponent() {
#	./autogen.sh	--prefix=$installDir
#	status=$?
#	[ $status -eq 0 ] || exit $status

	./configure	--prefix=$installDir
	status=$?
	[ $status -eq 0 ] || exit $status
	
	make clean
	
	make
	status=$?
	[ $status -eq 0 ] || exit $status
	
	make check
	status=$?
	[ $status -eq 0 ] || exit $status
	
	sudo make install
	status=$?
	[ $status -eq 0 ] || exit $status
	
	make clean
	status=$?
	[ $status -eq 0 ] || exit $status
}

cd $topdir
RebuildComponent

exit $?

#$Log: rebuild,v $
#Revision 1.2  2003/09/23 09:48:39  RogerSeguin
#Slight fix
#
#Revision 1.1  2003/09/22 02:24:57  RogerSeguin
#Initial revision
#
