#!/bin/csh
# usage:
#	DIFF		# diffs cwd with /shasha.b/roman/src/xmsheet/develop
#			# only for extensions .c .C .h .y 
#			# only mention differing files, no diff detail output
#	DIFF dir	# diffs cwd with dir
#			
#	DIFF dir xxx	# same as above, but with explicit diff detail output
#			# for each file that differs
#			# xxx is any string, actual string is irrelevant
#

if ( "$1" == "" ) then
	echo no directory.
	set dir = "/shasha.b/roman/src/xmsheet/develop"
else
	set dir = "$1"
endif

echo Diffing with \"$dir\"

foreach i ( *[cChy] Makefile )
	diff $i $dir/$i > /dev/null
	if ( $status == 1 ) then
		echo  $i ------- $dir/$i
		if ("$2" != "") diff $i $dir/$i
	endif
end

exit 0

