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

#
#	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:
	test -d ${DEPTROOT}/xaprtools/bin/${TArchBinDir} || mkdir -p ${DEPTROOT}/xaprtools/bin/${TArchBinDir}
	(cd xalert;	${MAKE} targets);
#	(cd xaprwd;	${MAKE} targets);
#	(cd xaprwud;	${MAKE} targets);
	(cd xaprdpychk;	${MAKE} targets);
	(cd xbtnpress;	${MAKE} targets);
	(cd xpanel;	${MAKE} targets);
	(cd xbuttonpanel;	${MAKE} targets);
	(cd xcat;	${MAKE} targets);
	(cd xqt;	${MAKE} targets);
	(cd xshowras;	${MAKE} targets);

all:	safe RemoteCopies
	(cd xalert;	${MAKE} all);
###	(cd xaprwd;     ${MAKE} all);
###	(cd xaprwud;    ${MAKE} all);
	(cd xaprdpychk; ${MAKE} all);
	(cd xbtnpress;	${MAKE} all);
	(cd xpanel;	${MAKE} all);
	(cd xbuttonpanel;	${MAKE} all);
	(cd xcat;	${MAKE} all);
	(cd xqt;	${MAKE} all);
	(cd xshowras;   ${MAKE} all);

remotes:	RemoteCopies
	(cd xalert;	${MAKE} remotes);
###	(cd xaprwd;     ${MAKE} remotes);
###	(cd xaprwud;    ${MAKE} remotes);
	(cd xaprdpychk; ${MAKE} remotes);
	(cd xbtnpress;	${MAKE} remotes);
	(cd xpanel;	${MAKE} remotes);
	(cd xbuttonpanel;	${MAKE} remotes);
	(cd xcat;	${MAKE} remotes);
	(cd xqt;	${MAKE} remotes);
	(cd xshowras;	${MAKE} remotes);

install:	RemoteCopies
	(cd xalert;	${MAKE} install);
###	(cd xaprwd;     ${MAKE} install);
###	(cd xaprwud;    ${MAKE} install);
	(cd xaprdpychk; ${MAKE} install);
	(cd xbtnpress;	${MAKE} install);
	(cd xpanel;	${MAKE} install);
	(cd xbuttonpanel;	${MAKE} install);
	(cd xcat;	${MAKE} install);
	(cd xqt;	${MAKE} install);
	(cd xshowras;	${MAKE} install);

clean:
	(cd xalert;	${MAKE} clean);
###	(cd xaprwd;     ${MAKE} clean);
###	(cd xaprwud;    ${MAKE} clean);
	(cd xaprdpychk; ${MAKE} clean);
	(cd xbtnpress;	${MAKE} clean);
	(cd xpanel;	${MAKE} clean);
	(cd xbuttonpanel;	${MAKE} clean);
	(cd xcat;	${MAKE} clean);
	(cd xqt;	${MAKE} clean);
	(cd xshowras;	${MAKE} clean);
	-rm RemoteCopies ${wildcard ShdCpy*}

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

safe:	.safe.${jdate}.Z
	(cd xalert;     ${MAKE} safe);
	(cd xaprdpychk; ${MAKE} safe);
	(cd xbtnpress;  ${MAKE} safe);
	(cd xpanel;     ${MAKE} safe);
	(cd xbuttonpanel;       ${MAKE} safe);
	(cd xcat;       ${MAKE} safe);
	(cd xqt;        ${MAKE} safe);
	(cd xshowras;   ${MAKE} safe);

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

