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

# gmake Makefile for ~trcgp

#
#	make everybody
#
include ${DEPTROOT}/etc/gmake.init

SafeFiles	:=	Makefile 

.PHONY:	all targets safe

targets:
	(cd env_val;	${MAKE} targets);
	(cd echo2;	${MAKE} targets);
	(cd issystem;	${MAKE} targets);
	(cd symname;	${MAKE} targets);
	(cd whence;	${MAKE} targets);
# ccincl is made at a higher level

all:	safe clean targets remotes
	(cd env_val;	${MAKE} all);
	(cd echo2;	${MAKE} all);
	(cd issystem;	${MAKE} all);
	(cd symname;	${MAKE} all);
	(cd whence;	${MAKE} all);
	(cd ccincl;	${MAKE} all);

remotes:  RemoteCopies
	(cd env_val;	${MAKE} remotes);
	(cd echo2;	${MAKE} remotes);
	(cd issystem;	${MAKE} remotes);
	(cd symname;	${MAKE} remotes);
	(cd whence;	${MAKE} remotes);
	(cd ccincl;	${MAKE} remotes);

install:  RemoteCopies
	(cd env_val;	${MAKE} install);
	(cd echo2;	${MAKE} install);
	(cd issystem;	${MAKE} install);
	(cd symname;	${MAKE} install);
	(cd whence;	${MAKE} install);

clean:
	-rm RemoteCopies ${wildcard ShdCpy*}
	(cd env_val;	${MAKE} clean);
	(cd echo2;	${MAKE} clean);
	(cd issystem;	${MAKE} clean);
	(cd symname;	${MAKE} clean);
	(cd whence;	${MAKE} clean);
	(cd ccincl;	${MAKE} clean);

RemoteCopies:	${SafeFiles}
	shadowcopy -v $?
	touch RemoteCopies

safe:	.safe.${jdate}.Z
	(cd env_val;    ${MAKE} safe);
	(cd echo2;      ${MAKE} safe);
	(cd issystem;   ${MAKE} safe);
	(cd symname;    ${MAKE} safe);
	(cd whence;     ${MAKE} safe);
	(cd ccincl;     ${MAKE} safe);

.safe.${jdate}.Z:	${SafeFiles}
	${MakeSafe}

