.ENABLE SUBSTITUTION
.; DECUS-C Useful Library build command file for native RSX-11M.
.; By
.;      Volker C. Huck
.;      14-Oct-88
.;
; MMKCU.CMD
;
; Compile Useful Library -- RSX-11M
;
	.SETS	SYSTYP	"RSX-11M"
	.IF	<SYTYP> EQ "RSX-11M"		.GOTO SYSOK
	.IF	<SYTYP> EQ "RSX-11M-PLUS"	.GOTO SYSOK
	.IF	<SYTYP> EQ "MICRO-RSX"		.GOTO SYSOK
;
;	You may not use SYSTEM '<SYTYP>' to build DECUS-C Useful Library
;	scanner for native RSX. If you want to build DECUS-C Useful Library
;	under VAX-11 RSX, use VMKCU.COM instead.
;
.EXIT -1
;
.SYSOK:
	.SETS	MCR	""
	.IF	<CLI> EQ "MCR"	.GOTO 90
	.IF	<CLI> EQ "DCL"	.SETS MCR "MCR "
	.IF	<CLI> EQ "DCL"	.GOTO 90
;
; This command file must be run under MCR.  Since "AT" will give
; confusing restart instructions (as will be for '<CLI>'), MMKCU will
; now exit.  Type "@MMKCU" when you have changed CLI's to MCR.
;
	.EXIT -1
.90:
;
; You must override the assignments in this file if you want the following
; logical devices to be assigned to other than SY:
;
;	SR:	Source and command files must be on this device.
;	LS:	Listings go to this device.
;	OB:	Objects go to this device.
;	MP:	Maps go to this device.
;	OU:	Task images go to this device.
;
	.TRANSLATE	SR
	.IF	<EXSTRI> EQ ""	'mcr'ASN SY:=SR:
	.TRANSLATE	LS
	.IF	<EXSTRI> EQ ""	'mcr'ASN NL:=LS:
	.TRANSLATE	OB
	.IF	<EXSTRI> EQ ""	'mcr'ASN SY:=OB:
	.TRANSLATE	MP
	.IF	<EXSTRI> EQ ""	'mcr'ASN SY:=MP:
	.TRANSLATE	OU
	.IF	<EXSTRI> EQ ""	'mcr'ASN SY:=OU:
;
;Take a break.
;
	'mcr'TIM
; Compile Useful Library
;
	.IFNINS ...XCC 	INS $CC
	.IF	<EXSTAT> NE <SUCCES>	.GOTO 1000
	.IFNINS ...XAS	INS $AS
	.IF	<EXSTAT> NE <SUCCES>	.GOTO 1000
	.IFNINS ...PIP	INS $PIP
	.IF	<EXSTAT> NE <SUCCES>	.GOTO 1000
	.IFNINS ...LBR	INS $LBR
	.IF	<EXSTAT> NE <SUCCES>	.GOTO 1000
;
; Copy needed Header files to LB:[1,1]
;
	PIP	LB:[1,1]*.*/NV=SR:[5,27]*.H
;
; Compile the uselful library
;
	'mcr'XCC	AFTER  -a
	.IF	<EXSTAT> NE <SUCCES>	.GOTO 1000
	'mcr'XCC	ANY    -a
	.IF	<EXSTAT> NE <SUCCES>	.GOTO 1000
	'mcr'XCC	BLKCMP -a
	.IF	<EXSTAT> NE <SUCCES>	.GOTO 1000
	'mcr'XCC	BLKEQ  -a
	.IF	<EXSTAT> NE <SUCCES>	.GOTO 1000
	'mcr'XCC	CSCOMP -a
	.IF	<EXSTAT> NE <SUCCES>	.GOTO 1000
	'mcr'XCC	CSCOPY -a
	.IF	<EXSTAT> NE <SUCCES>	.GOTO 1000
	'mcr'XCC	CSDIFF -a
	.IF	<EXSTAT> NE <SUCCES>	.GOTO 1000
	'mcr'XCC	CSET   -a
	.IF	<EXSTAT> NE <SUCCES>	.GOTO 1000
	'mcr'XCC	CSIS   -a
	.IF	<EXSTAT> NE <SUCCES>	.GOTO 1000
	'mcr'XCC	CSJOIN -a
	.IF	<EXSTAT> NE <SUCCES>	.GOTO 1000
	'mcr'XCC	CSLESS -a
	.IF	<EXSTAT> NE <SUCCES>	.GOTO 1000
	'mcr'XCC	CSMEET -a
	.IF	<EXSTAT> NE <SUCCES>	.GOTO 1000
	'mcr'XCC	CSMEMB -a
	.IF	<EXSTAT> NE <SUCCES>	.GOTO 1000
	'mcr'XCC	CSWITH -a
	.IF	<EXSTAT> NE <SUCCES>	.GOTO 1000
	'mcr'XCC	ESC    -a
	.IF	<EXSTAT> NE <SUCCES>	.GOTO 1000
	'mcr'XCC	EVAL   -a
	.IF	<EXSTAT> NE <SUCCES>	.GOTO 1000
	'mcr'XCC	FLEX   -a
	.IF	<EXSTAT> NE <SUCCES>	.GOTO 1000
	'mcr'XCC	FMATCH -a
	.IF	<EXSTAT> NE <SUCCES>	.GOTO 1000
	'mcr'XCC	FXADD  -a
	.IF	<EXSTAT> NE <SUCCES>	.GOTO 1000
	'mcr'XCC	FXADDO -a
	.IF	<EXSTAT> NE <SUCCES>	.GOTO 1000
	'mcr'XCC	FXEJEC -a
	.IF	<EXSTAT> NE <SUCCES>	.GOTO 1000
	'mcr'XCC	FXFREE -a
	.IF	<EXSTAT> NE <SUCCES>	.GOTO 1000
	'mcr'XCC	FXINJE -a
	.IF	<EXSTAT> NE <SUCCES>	.GOTO 1000
	'mcr'XCC	FXITEM -a
	.IF	<EXSTAT> NE <SUCCES>	.GOTO 1000
	'mcr'XCC	FXNEED -a
	.IF	<EXSTAT> NE <SUCCES>	.GOTO 1000
	'mcr'XCC	FXSET  -a
	.IF	<EXSTAT> NE <SUCCES>	.GOTO 1000
	'mcr'XCC	INSTR  -a
	.IF	<EXSTAT> NE <SUCCES>	.GOTO 1000
	'mcr'XCC	IOVTOA -a
	.IF	<EXSTAT> NE <SUCCES>	.GOTO 1000
	'mcr'XCC	MATCH  -a
	.IF	<EXSTAT> NE <SUCCES>	.GOTO 1000
	'mcr'XCC	OSPAN  -a
	.IF	<EXSTAT> NE <SUCCES>	.GOTO 1000
	'mcr'XCC	PMATCH -a
	.IF	<EXSTAT> NE <SUCCES>	.GOTO 1000
	'mcr'XCC	QKSORT -a
	.IF	<EXSTAT> NE <SUCCES>	.GOTO 1000
	'mcr'XCC	REPLAC -a
	.IF	<EXSTAT> NE <SUCCES>	.GOTO 1000
	'mcr'XCC	SAVEST -a
	.IF	<EXSTAT> NE <SUCCES>	.GOTO 1000
	'mcr'XCC	SPAN   -a
	.IF	<EXSTAT> NE <SUCCES>	.GOTO 1000
	'mcr'XCC	STRFNS -a
	.IF	<EXSTAT> NE <SUCCES>	.GOTO 1000
	'mcr'XCC	TABLES -a
	.IF	<EXSTAT> NE <SUCCES>	.GOTO 1000
	'mcr'XCC	TALLOC -a
	.IF	<EXSTAT> NE <SUCCES>	.GOTO 1000
	'mcr'XCC	TRANSL -a
	.IF	<EXSTAT> NE <SUCCES>	.GOTO 1000
	'mcr'XCC	TRIM   -a
	.IF	<EXSTAT> NE <SUCCES>	.GOTO 1000
	'mcr'XCC	UPTO   -a
	.IF	<EXSTAT> NE <SUCCES>	.GOTO 1000
	'mcr'XCC	VSTRIN -a
	.IF	<EXSTAT> NE <SUCCES>	.GOTO 1000
;
; Insert modules into library LB:[1,1]CU.OLB
;
	'mcr'LBR	LB:[1,1]CU.OLB/CR=AFTER,ANY,BLKCMP,BLKEQ,CSCOMP,CSCOPY
	.IF	<EXSTAT> NE <SUCCES>	.GOTO 1000
	'mcr'LBR	LB:[1,1]CU.OLB=CSDIFF,CSET,CSIS,CSJOIN,CSLESS,CSMEET
	.IF	<EXSTAT> NE <SUCCES>	.GOTO 1000
	'mcr'LBR	LB:[1,1]CU.OLB=CSMEMB,CSWITH,ESC,EVAL,FLEX,FMATCH,FXADD
	.IF	<EXSTAT> NE <SUCCES>	.GOTO 1000
	'mcr'LBR	LB:[1,1]CU.OLB=FXADDO,FXEJEC,FXFREE,FXINJE,FXITEM,FXNEED
	.IF	<EXSTAT> NE <SUCCES>	.GOTO 1000
	'mcr'LBR	LB:[1,1]CU.OLB=FXSET,INSTR,IOVTOA,MATCH,OSPAN,PMATCH
	.IF	<EXSTAT> NE <SUCCES>	.GOTO 1000
	'mcr'LBR	LB:[1,1]CU.OLB=QKSORT,REPLAC,SAVEST,SPAN,STRFNS,TABLES
	.IF	<EXSTAT> NE <SUCCES>	.GOTO 1000
	'mcr'LBR	LB:[1,1]CU.OLB=TALLOC,TRANSL,TRIM,UPTO,VSTRIN
	.IF	<EXSTAT> NE <SUCCES>	.GOTO 1000
;
	'mcr'PIP	LB:[1,1]*.h/pu/nm
	'mcr'PIP	LB:[1,1]cu.olb/pu
	'mcr'PIP	OB:[5,27]*.OBJ;*/DE
;
	'mcr'TIM
;
; DECUS-C  Useful Library succesfully built.
;
	.EXIT <SUCCES>
.;
.;
.1000:
;
; There has been an error. Please re-read the build instructions in
; the manual.
;
.EXIT -1
