.; BUILD FILE FOR COMMAND LANGUAGE PROCESSOR CLONE
.; LAST EDIT:	14-NOV-81
.;
	.ENABLE SUBSTITUTION
	.ENABLE GLOBAL
	.ENABLE QUIET
.;
	ASN SY:=DD:
	.SETS	CL1UIC	"[301,63]"
	.SETS	VALUIC	"[301,63]"
	.SETF	ALL
	.SETN	ERROR 0.
	.SETS $CMD0	P1
	.IF $CMD0 EQ "ALL"	.SETT ALL
	.IFT ALL	.SETS	$CMD0 "@DD:CLONESRC"
	.SETS $PRMPT "NAME OF MODULE TO BUILD"
.;
.NEXT:	@INDGCL
	.IF <STRLEN> EQ 0 .GOTO TKB
.;
	.SETS NAME $CMD
	.DISABLE QUIET
	; MODULE: 'NAME'
	.ENABLE QUIET
	PIP DD:'NAME'.OBJ;*/DE/NM
	.IF NAME EQ "RSXSUB" .GOTO RSX
	.IF NAME EQ "CL1VAL" .GOTO VAL
	MAC DD:'NAME'=DD:CL1MAC,'NAME'
	.IF <EXSTAT> NE 1 .INC ERROR
	.GOTO NEXT
.;
.RSX:	MAC DD:RSXSUB=LB:[1,1]EXEMC/ML,[11,10]RSXMC,DD:'CL1UIC'RSXSUB
	.IF <EXSTAT> NE 1 .INC ERROR
	.GOTO NEXT
.;
.VAL:	MAC DD:CL1VAL=DD:CL1MAC,'VALUIC'VALMFD,'CL1UIC'CL1VAL
	.IF <EXSTAT> NE 1 .INC ERROR
	.GOTO NEXT
.;
.;
.TKB:	.IF ERROR EQ 0 .GOTO TKB1
	.DISABLE QUIET
	;
	; ASSEMBLY ERROR(S) DETECTED, TASK CLONE NOT REBUILT
	;
	.GOTO DONE
;
.TKB1:	.DISABLE QUIET
	; BUILDING TASK: CLONE
	.IFACT CLONE	; WARNING CLONE IS ACTIVE
	.ENABLE QUIET
	.IFACT CLONE .GOTO TKB2
	.IFINS CLONE REM CLONE
	PIP DD:CLONE.TSK;*/DE/NM,CLONE.CRF;*,CLONE.MAP;*
	.IFF ALL .GOTO TKB2
	.IFINS ...CL1 REM ...CL1
	PIP DD:CL1.TSK;*/DE/NM,CL1.CRF;*,CL1.MAP;*
	.IFACT CL1... ABO CL1...
	.IFINS CL1... REM CL1...
	PIP DD:CL1IN.TSK;*/DE/NM,CL1IN.CRF;*,CL1IN.MAP;*
.;
.TKB2:	TKB @DD:CLONETKB
	.IF <EXSTAT> NE 1 .INC ERROR
	.IFF ALL .GOTO INS
	TKB @DD:CL1TKB
	.IF <EXSTAT> NE 1 .INC ERROR
	TKB @DD:CL1INTKB
	.IF <EXSTAT> NE 1 .INC ERROR
;
.INS:	.IF ERROR GT 0	.GOTO DONE
	.IFNINS CLONE	INS DD:CLONE
	.IFNINS	...CL1	INS DD:CL1
	.IFNINS	CL1...	INS DD:CL1IN
.;
.DONE:	.DISABLE QUIET
	;
	; END OF CLONE BUILD
	.IF ERROR GT 0	; 'ERROR' ERROR(S) DETECTED.
	;
