######################################################################### 
#									# 
#   File: scorpion/src/xref/tests/Makefile 
#				 					# 
#   Copyright (C) 1991 Dean Throop
#									# 
#   The Scorpion System is free software in the public domain; you can  # 
#   redistribute it and/or modify it as you wish. We ask that you 	# 
#   retain credits referencing the University of Arizona and that you	# 
#   identify any changes you make.					# 
#									# 
#   Report problems to scorpion-project@cs.arizona.edu			# 
#   Direct all inquiries to:	The Scorpion Project			# 
#				Department of Computer Science		# 
#				Gould-Simpson Building			# 
#				University of Arizona			# 
#				Tucson, AZ 85721			# 
#				U.S.A.					# 
#									# 
#   Revision Log:							# 
#	$Log:$ 
#									# 
#   Edit Log:								# 
#									# 
######################################################################### 

BINDIR=
MACHINE=sparc
MAKE=make
RM=rm
Checkout:
	-if (test "$(MACHINE)" = "vax") then \
		$(MAKE) 'BINDIR=$(BINDIR)' Checkout.VAX; \
	else \
		$(MAKE) 'BINDIR=$(BINDIR)' Checkout.Other; \
	fi

Checkout.VAX:
	$(RM) -f xreftest.out2 xreftest2.out2
	$(BINDIR)/xref -c xreftest.out2 ../xref/xref.xref
	@echo xref Installation Check
	$(BINDIR)/xref hello.xref  xreftest.out2 > xreftest2.out2
	sh -c 'cmp -s xreftest2vax.out1 xreftest2.out2 && (echo "Files xreftest2vax.out1 and xreftest2.out2 agree"; echo "xref Passed Installation Check") || (echo "Files xreftest2vax.out1 xreftest2.out2 disagree"; echo "*** xref Failed Installation Check"; exit 1)'
	@echo ""
	@echo xref_xref Installation Check
	$(BINDIR)/xref_xref xreftestvax.out1 > xref_xreftest.out2
	sh -c 'cmp -s xref_xreftestvax.out1 xref_xreftest.out2 && (echo "files xref_xreftestvax.out1 and xref_xreftest.out2 agree"; echo "xref_xref Passed Installation Check") || (echo "xref_xreftestvax.out1 and xref_xreftest.out2 disagree"; echo "*** xref_xref Failed Installation Check")'

Checkout.Other:
	$(RM) -f xreftest.out2 xreftest2.out2
	$(BINDIR)/xref -c xreftest.out2 ../xref/xref.xref
	@echo xref Installation Check
	$(BINDIR)/xref hello.xref  xreftest.out2 > xreftest2.out2
	sh -c 'cmp -s xreftest2sun.out1 xreftest2.out2 && (echo "Files xreftest2sun.out1 and xreftest2.out2 agree"; echo "xref Passed Installation Check") || (echo "Files xreftest2sun.out1 and xreftest2.out2 disagree"; echo echo "*** xref Failed Installation Check")'
	@echo ""
	@echo xref_xref Installation Check
	$(BINDIR)/xref_xref xreftestsun.out1 > xref_xreftest.out2
	sh -c 'cmp -s xref_xreftestsun.out1 xref_xreftest.out2 && (echo "files xref_xreftestsun.out1 and xref_xreftest.out2 agree"; echo "xref_xref Passed Installation Check") || (echo "files xref_xreftestsun.out1 and xref_xreftext.out2 disagree"; echo "*** xref_xref Failed Installation Check")'
