#!/bin/csh -f

########################################################################
#                 copyright 2001, Amoco Production Company             #
#                             All Rights Reserved                      #
#                     an affiliate of BP America Inc.                  #
########################################################################

# A shell script to create the include file "symname.h"
# 
# Has known symbolic links under ~trcgp hardwired into it.

#
# took "~trcgp/bag" out of the list since it seems to missing. - jmw - 1/11/96
#
# took "~trcgp/findif and ~trcgp/mbs" out of the list; they've been moved
# off to a new structure.			- jmw 10/23/96
#
# added an entry for ~trcgp/ilis.		- jmw 10/23/96
#
# took ateam and mutants our of the list; I think they're ancient
#						- jmw 1/28/97
#
# referenced off of ${DEPTROOT} instead of ~trcgp
#						- jmw 7/16/01
#
set outfile=symname.h
mv $outfile $outfile.old

set a
foreach i (	${DEPTROOT} \
		${DEPTROOT}/usp \
		${DEPTROOT}/chd \
		${DEPTROOT}/xaprtools \
	)
	set a=($a `ls -id $i`)
end
echo "/* this include file built by the command $0 */" > $outfile
echo "struct afile { int inode; char *name} shortlist[]={ " >> $outfile
while ( $#a )
	echo -n "		" $a[1], \"$a[2] >> $outfile
	shift a; shift a
	if( $#a ) echo \", >> $outfile
end
echo \"}\; >> $outfile
echo "#define NumFiles (sizeof(shortlist))/(sizeof(struct afile))" >> $outfile
