#!/bin/sh
#
# Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
# Use is subject to license terms.
#
#ident	"@(#)preremove	1.2	04/11/20 SMI"
#
# remove generated gcc headers before package removal
#
# output location is:
#
# $BASEDIR/usr/sfw/lib/gcc/${GCCARCH}/${GCCVER)/include
#
# where GCCARCH=i386-pc-solaris2.10 or 
# and GCCVER is the current GCC version
#

GCCVER=3.4.3

case "$ARCH" in
sparc)	GCCARCH=sparc-sun-solaris2.10
	;;
i386)	GCCARCH=i386-pc-solaris2.10
	;;
*)	echo "$ARCH is unknown"
	exit 2
	;;
esac
	
HDRTARG=$BASEDIR/usr/sfw/lib/gcc/$GCCARCH/$GCCVER/include

rm -rf $HDRTARG
exit 0
