.ENABLE SUBSTITUTION
.; LEX Library build command file for native RSX-11M.
.; By
.;      Volker C. Huck
.;      13-Oct-88
.;
; MLEXL.CMD
;
; Compile LEX 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 lexical
;	scanner for native RSX. If you want to build DECUS-C LEX
;	Library under VAX-11 RSX, use VLEXL.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>'), MLEXL will
; now exit.  Type "@MLEX" 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 LEX 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
.;
	'mcr'pip     	LB:[1,1]LEX.H=sr:LEX.H
	'mcr'pip     	LB:[1,1]LEX.H/WO:R
.;
	'mcr'xcc	sr:COMMEN.C -a 
	.IF	<EXSTAT> NE <SUCCES>	.GOTO 1000
	'mcr'xcc	sr:CONCAT.C -a 
	.IF	<EXSTAT> NE <SUCCES>	.GOTO 1000
	'mcr'xcc	sr:COPY.C -a 
	.IF	<EXSTAT> NE <SUCCES>	.GOTO 1000
	'mcr'xcc	sr:CPYSTR.C -a 
	.IF	<EXSTAT> NE <SUCCES>	.GOTO 1000
	'mcr'xcc	sr:DOPRNT.C -a 
	.IF	<EXSTAT> NE <SUCCES>	.GOTO 1000
	'mcr'xcc	sr:ERROR.C -a 
	.IF	<EXSTAT> NE <SUCCES>	.GOTO 1000
	'mcr'xcc	sr:GETTOK.C -a 
	.IF	<EXSTAT> NE <SUCCES>	.GOTO 1000
	'mcr'xcc	sr:INTEG.C -a 
	.IF	<EXSTAT> NE <SUCCES>	.GOTO 1000
	'mcr'xcc	sr:LEXCHA.C -a 
	.IF	<EXSTAT> NE <SUCCES>	.GOTO 1000
	'mcr'xcc	sr:LEXECH.C -a 
	.IF	<EXSTAT> NE <SUCCES>	.GOTO 1000
	'mcr'xcc	sr:LEXERR.C -a 
	.IF	<EXSTAT> NE <SUCCES>	.GOTO 1000
	'mcr'xcc	sr:LEXGET.C -a 
	.IF	<EXSTAT> NE <SUCCES>	.GOTO 1000
	'mcr'xcc	sr:LEXLEN.C -a 
	.IF	<EXSTAT> NE <SUCCES>	.GOTO 1000
	'mcr'xcc	sr:LEXPEE.C -a 
	.IF	<EXSTAT> NE <SUCCES>	.GOTO 1000
	'mcr'xcc	sr:LEXSWI.C -a 
	.IF	<EXSTAT> NE <SUCCES>	.GOTO 1000
	'mcr'xcc	sr:LLSAVE.C -a 
	.IF	<EXSTAT> NE <SUCCES>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1,1]LEXLIB.OLB=YYLEX.OBJ
	.IF	<EXSTAT> NE <SUCCES>	.GOTO 1000
	'mcr'pip	LB:[1,1]LEXLIB.OLB/pr/wo:r
	'mcr'pip	COMMEN.OBJ;/de
	'mcr'pip	CONCAT.OBJ;/de
	'mcr'pip	COPY.OBJ;/de
	'mcr'pip	CPYSTR.OBJ;/de
	'mcr'pip	DOPRNT.OBJ;/de
	'mcr'pip	ERROR.OBJ;/de
	'mcr'pip	GETTOK.OBJ;/de
	'mcr'pip	INTEG.OBJ;/de
	'mcr'pip	LEXCHA.OBJ;/de
	'mcr'pip	LEXECH.OBJ;/de
	'mcr'pip	LEXERR.OBJ;/de
	'mcr'pip	LEXGET.OBJ;/de
	'mcr'pip	LEXLEN.OBJ;/de
	'mcr'pip	LEXPEE.OBJ;/de
	'mcr'pip	LEXSWI.OBJ;/de
	'mcr'pip	LLSAVE.OBJ;/de
	'mcr'pip	LMOVB.OBJ;/de
	'mcr'pip	LMOVI.OBJ;/de
	'mcr'pip	MAPCH.OBJ;/de
	'mcr'pip	STREQ.OBJ;/de
	'mcr'pip	TOKEN.OBJ;/de
	'mcr'pip	YYLEX.OBJ;/de
;
'mcr'TIM
; LEX Library built successfully.
;
;
.EXIT <SUCCES>
.1000:
;
; There has been an error. Please re-read the build instructions in
; the manual.
;
.EXIT -1
