#
# $Header: /home2/aoki/postgres/src/regress/RCS/Makefile.global,v 1.6 1993/03/12 19:45:07 aoki Exp $
#
CFLAGS+= -I${.CURDIR}/../../backend

#
# Insure when calling shell scripts that we set the search path
# to find the commands from this build.
#
SHCMD= PATH=${BINDIR}:$$PATH sh

.if ${PORTNAME} == "ultrix4"
CFLAGS+= -G 0 -DNOFIXADE
.endif

.SUFFIXES: .source .pq .sh

.source.pq:
	rm -f $*.pq; \
	if [ "${.CURDIR}" = ".." ]; then \
		C="`pwd`/"; \
	else \
		C=""; \
	fi; \
	sed -e "s:_CWD_:$$C${.CURDIR}:g" \
	    -e "s/_USER_/$$USER/g" < ${.CURDIR}/$*.source > $*.pq

.source.sh:
	rm -f $*.sh; \
	if [ "${.CURDIR}" = ".." ]; then \
		C="`pwd`/"; \
	else \
		C=""; \
	fi; \
	sed -e "s:_CWD_:$$C${.CURDIR}:g" \
	    -e "s/_USER_/$$USER/g" < ${.CURDIR}/$*.source > $*.sh
