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


# gmake Makefile for ~usp/src
# 89/4/24	Bill Done

#
#	make everybody
#
#	Make the libraries first - the commands may need them.
#
include ${DEPTROOT}/usp/etc/gmake.init

SafeFiles	:=	Makefile

.PHONY:	all targets remotes safe

targets:
	(cd pol2;	${MAKE} targets);
	(cd pol3;	${MAKE} targets);
	(cd upolf;	${MAKE} targets);

all:	safe remotes
	(cd pol2;	${MAKE} all);
	(cd pol3;	${MAKE} all);
	(cd upolf;	${MAKE} all);

remotes:	RemoteCopies
	(cd pol2;	${MAKE} remotes);
	(cd pol3;	${MAKE} remotes);
	(cd upolf;	${MAKE} remotes);

install:	RemoteCopies
	(cd pol2;	${MAKE} install);
	(cd pol3;	${MAKE} install);
	(cd upolf;	${MAKE} install);

clean:  
	(cd pol2;	${MAKE} clean);
	(cd pol3;	${MAKE} clean);
	(cd upolf;	${MAKE} clean);
	-rm RemoteCopies RemoteMakes ${wildcard ShdCpy*}

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

safe:	.safe.${jdate}.Z
	(cd pol2;	${MAKE} safe);
	(cd pol3;	${MAKE} safe);
	(cd upolf;	${MAKE} safe);

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

