.;
.;----------------------------------------------------------------------------
.;
.;	CMD-FILE:	X X X C B C
.;
.;	PURPOSE:	Template command file for Compiling, Building, and
.;			Clearing (i.e. purging) directory.
.;
.;	AUTHOR:		Jan H. Belgraver
.;			Based on convention established long ago.
.;
.;	DATE:		6-DEC-84
.;
.;	VERSION:	1.0
.;
.;	DESCRIPTION:	
.;
.;	CALLS TO:	
.;
.;	MODIFIED BY:	
.;
.;----------------------------------------------------------------------------
.;
.;

.enable	quiet					
	.SETF	DCL				
	.IF	<CLI> EQ "DCL"	.SETT	DCL	
.;	If current CLI is DCL reset to MCR	
	.IFT	DCL	SET TERMINAL/MCR	
	.ONERR	FINISH
.disable	quiet				
.;
.;	Compile program and all routines which make part of this program's 
.;	private library.
.;
.;	FOR starts the F77 compiler and 
.;	subsequently purges the .OBJ and .LST files if terminated successful.
.;	FOR exits with status 4 if F77 detects an error.
.;
	FOR	program name
.IF	<EXSTAT> NE 1	.GOTO	FINISH
	FOR	Subroutine #1
.IF	<EXSTAT> NE 1	.GOTO	FINISH
	FOR	Subroutine #2
.IF	<EXSTAT> NE 1	.GOTO	FINISH
	FOR	Subroutine #3
.IF	<EXSTAT> NE 1	.GOTO	FINISH
	FOR	Subroutine #4
.IF	<EXSTAT> NE 1	.GOTO	FINISH
	FOR	Subroutine #5
.IF	<EXSTAT> NE 1	.GOTO	FINISH
	FOR	Subroutine #6
.IF	<EXSTAT> NE 1	.GOTO	FINISH
	FOR	Subroutine #7
.IF	<EXSTAT> NE 1	.GOTO	FINISH
	FOR	Subroutine #8
.IF	<EXSTAT> NE 1	.GOTO	FINISH
	FOR	Subroutine #9
.IF	<EXSTAT> NE 1	.GOTO	FINISH
	FOR	Subroutine #10
.IF	<EXSTAT> NE 1	.GOTO	FINISH
.;
.;	Build program if all went successful
.;
.;	BLD tries to delete current .TSK and .MAP files.
.;	before starting taskbuilder.
.;	If TKB detects an error its exit status will be different to 1.
.;
	BLD	program name
.IF	<EXSTAT> NE 1	.GOTO	FINISH
.;
.FINISH:
	.enable	quiet					
	.;	If user CLI was DCL reset terminal.	
	.IFT	DCL	SET /DCL=TI:
.EXIT
