#-------------------------------------------------------------------------
#
# Makefile--
#    Makefile for regress (the regression test)
#
# Copyright (c) 1994, Regents of the University of California
#
#
# IDENTIFICATION
#    $Header: /cvsroot/pgsql/src/test/regress/output/Attic/Makefile,v 1.3 1997/04/26 05:45:13 scrappy Exp $
#
#-------------------------------------------------------------------------

SRCDIR= ../../..
include ../../../Makefile.global

#
# ... plus test query inputs
#
# INFILES is the files the regression test uses for input.
INFILES= copy.out \
         create_function_1.out \
         create_function_2.out

all: $(INFILES)

%.out: %.source
	if [ -z "$$USER" ]; then USER=$$LOGNAME; fi; \
	if [ -z "$$USER" ]; then USER=`whoami`; fi; \
	if [ -z "$$USER" ]; then echo 'Cannot deduce $$USER.'; exit 1; fi; \
	rm -f expected.out; \
	MYTZ=`date | cut -c21`; \
	C="`pwd`"; \
	sed -e "s:_CWD_:$(PWD)/\.\.:g" \
	    -e "s:\.\./output:\.\./input:g" \
	    -e "s:_OBJWD_:$(PWD):g" \
            -e "s:_DLSUFFIX_:$(DLSUFFIX):g" \
	    -e "s;\([A-Z][a-z][a-z][^ ]* [A-Z][a-z][a-z] [0-9 ][0-9] [0-9][0-9]:[0-9][0-9]:[0-9][0-9] [0-9][0-9][0-9][0-9] \)[A-Z]\([A-Z][A-Z]\);\1$$MYTZ\2;g" \
	    -e "s;\([A-Z][a-z][a-z][^ ]* [A-Z][a-z][a-z] [0-9 ][0-9] [0-9][0-9]:[0-9][0-9]:[0-9][0-9] \)[A-Z]\([A-Z][A-Z] [0-9][0-9][0-9][0-9]\);\1$$MYTZ\2;g" \
	    -e "s:_USER_:$$USER:g" < $< | \
	sed -e "s:/output/\.\./:/input/\.\./:g"> ../expected/$@
	@echo "YOUR EXPECTED RESULTS ARE NOW IN FILE expected.out."