#!/bin/csh -f
#
# |-----------------------------------------------------------|
# | Copyright (c) 1991, 1990 MIPS Computer Systems, Inc.      |
# | All Rights Reserved                                       |
# |-----------------------------------------------------------|
# |          Restricted Rights Legend                         |
# | Use, duplication, or disclosure by the Government is      |
# | subject to restrictions as set forth in                   |
# | subparagraph (c)(1)(ii) of the Rights in Technical        |
# | Data and Computer Software Clause of DFARS 252.227-7013.  |
# |         MIPS Computer Systems, Inc.                       |
# |         950 DeGuigne Avenue                               |
# |         Sunnyvale, California 94088-3650, USA             |
# |-----------------------------------------------------------|
#
# $Header: gen_exclude,v 1.5.2.1 92/06/24 14:14:48 marker Exp $
./find_ext $1
./find_ext $2
set base1=$1:t
set base2=$2:t
rm -f log.$base1:r
foreach i (`./find_candidate $1 $2`)
	ar x $1 $i
	nm -B $i > nm.$base1:r
	rm -f $i
	ar x $2 $i
	nm -B $i > nm.$base2:r
	rm -f $i
	cmp nm.$base1:r nm.$base2:r > /dev/null
	if ($status == 0 && "$i" != "__cerror.o" ) then
		echo "-exclude $i"
		echo "-exclude $i" >> log.$base1:r
	else
		echo "include $i" >> log.$base1:r
	endif
	rm -f nm.$base1:r nm.$base2:r
end
exit 0
