.ENABLE SUBSTITUTION
.; DECUS-C DECnet Extension build command file for native RSX-11M.
.; By
.;      Volker C. Huck
.;      11-Nov-88
.;
; MBLDNET.CMD
;
; Build DECnet Extensions -- 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 DECnet 
;	extensions for native RSX. If you want to build DECUS-C NETlibrary
;	under VAX-11 RSX, use VBLDNET.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>'), MBLDNET will
; now exit.  Type "@MBLDNET" 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:
;
.IFNINS	...MAC	'mcr'INS $MAC/TASK=...MAC
.IFNINS ...MAC	.GOTO 1000
.IFNINS	...PIP	'mcr'INS $PIP/TASK=...PIP
.IFNINS ...PIP	.GOTO 1000
.IFNINS	...LBR	'mcr'INS $LBR/TASK=...LBR
.IFNINS ...LBR	.GOTO 1000
;
; Move the DECnet include file for C programs to LB:[1,1]
;
'mcr'PIP LB;[1,1]STDNET.h/NV=SR:[5,10]STDNET.H
'mcr'PIP LB;[1,1]STDNET.H/PU/NM
;
; Building the Library CN.OLB
;
'mcr'TIM
'mcr'MAC OB:[5,10]ABTNT,LS:[5,10]ABTNT/-sp=LB:[1,1]netlib/ml,SR:[5,10]ABTNT
.IF <EXSTAT> NE <SUCCES> .GOTO 1000
'mcr'MAC OB:[5,10]ABTWNT,LS:[5,10]ABTWNT/-sp=LB:[1,1]netlib/ml,SR:[5,10]ABTWNT
.IF <EXSTAT> NE <SUCCES> .GOTO 1000
'mcr'MAC OB:[5,10]ACCNT,LS:[5,10]ACCNT/-sp=LB:[1,1]netlib/ml,SR:[5,10]ACCNT
.IF <EXSTAT> NE <SUCCES> .GOTO 1000
'mcr'MAC OB:[5,10]ACCWNT,LS:[5,10]ACCWNT/-sp=LB:[1,1]netlib/ml,SR:[5,10]ACCWNT
.IF <EXSTAT> NE <SUCCES> .GOTO 1000
'mcr'MAC OB:[5,10]CLSNT,LS:[5,10]CLSNT/-sp=LB:[1,1]netlib/ml,SR:[5,10]CLSNT
.IF <EXSTAT> NE <SUCCES> .GOTO 1000
'mcr'MAC OB:[5,10]CLSWNT,LS:[5,10]CLSWNT/-sp=LB:[1,1]netlib/ml,SR:[5,10]CLSWNT
.IF <EXSTAT> NE <SUCCES> .GOTO 1000
'mcr'MAC OB:[5,10]CONNT,LS:[5,10]CONNT/-sp=LB:[1,1]netlib/ml,SR:[5,10]CONNT
.IF <EXSTAT> NE <SUCCES> .GOTO 1000
'mcr'MAC OB:[5,10]CONWNT,LS:[5,10]CONWNT/-sp=LB:[1,1]netlib/ml,SR:[5,10]CONWNT
.IF <EXSTAT> NE <SUCCES> .GOTO 1000
'mcr'MAC OB:[5,10]DSCNT,LS:[5,10]DSCNT/-sp=LB:[1,1]netlib/ml,SR:[5,10]DSCNT
.IF <EXSTAT> NE <SUCCES> .GOTO 1000
'mcr'MAC OB:[5,10]DSCWNT,LS:[5,10]DSCWNT/-sp=LB:[1,1]netlib/ml,SR:[5,10]DSCWNT
.IF <EXSTAT> NE <SUCCES> .GOTO 1000
'mcr'MAC OB:[5,10]GLNNT,LS:[5,10]GLNNT/-sp=LB:[1,1]netlib/ml,SR:[5,10]GLNNT
.IF <EXSTAT> NE <SUCCES> .GOTO 1000
'mcr'MAC OB:[5,10]GLNWNT,LS:[5,10]GLNWNT/-sp=LB:[1,1]netlib/ml,SR:[5,10]GLNWNT
.IF <EXSTAT> NE <SUCCES> .GOTO 1000
'mcr'MAC OB:[5,10]GNDNT,LS:[5,10]GNDNT/-sp=LB:[1,1]netlib/ml,SR:[5,10]GNDNT
.IF <EXSTAT> NE <SUCCES> .GOTO 1000
'mcr'MAC OB:[5,10]GNDWNT,LS:[5,10]GNDWNT/-sp=LB:[1,1]netlib/ml,SR:[5,10]GNDWNT
.IF <EXSTAT> NE <SUCCES> .GOTO 1000
'mcr'MAC OB:[5,10]OPNNT,LS:[5,10]OPNNT/-sp=LB:[1,1]netlib/ml,SR:[5,10]OPNNT
.IF <EXSTAT> NE <SUCCES> .GOTO 1000
'mcr'MAC OB:[5,10]OPNWNT,LS:[5,10]OPNWNT/-sp=LB:[1,1]netlib/ml,SR:[5,10]OPNWNT
.IF <EXSTAT> NE <SUCCES> .GOTO 1000
'mcr'MAC OB:[5,10]RECNT,LS:[5,10]RECNT/-sp=LB:[1,1]netlib/ml,SR:[5,10]RECNT
.IF <EXSTAT> NE <SUCCES> .GOTO 1000
'mcr'MAC OB:[5,10]RECWNT,LS:[5,10]RECWNT/-sp=LB:[1,1]netlib/ml,SR:[5,10]RECWNT
.IF <EXSTAT> NE <SUCCES> .GOTO 1000
'mcr'MAC OB:[5,10]REJNT,LS:[5,10]REJNT/-sp=LB:[1,1]netlib/ml,SR:[5,10]REJNT
.IF <EXSTAT> NE <SUCCES> .GOTO 1000
'mcr'MAC OB:[5,10]REJWNT,LS:[5,10]REJWNT/-sp=LB:[1,1]netlib/ml,SR:[5,10]REJWNT
.IF <EXSTAT> NE <SUCCES> .GOTO 1000
'mcr'MAC OB:[5,10]SNDNT,LS:[5,10]SNDNT/-sp=LB:[1,1]netlib/ml,SR:[5,10]SNDNT
.IF <EXSTAT> NE <SUCCES> .GOTO 1000
'mcr'MAC OB:[5,10]SNDWNT,LS:[5,10]SNDWNT/-sp=LB:[1,1]netlib/ml,SR:[5,10]SNDWNT
.IF <EXSTAT> NE <SUCCES> .GOTO 1000
'mcr'MAC OB:[5,10]SPANT,LS:[5,10]SPANT/-sp=LB:[1,1]netlib/ml,SR:[5,10]SPANT
.IF <EXSTAT> NE <SUCCES> .GOTO 1000
'mcr'MAC OB:[5,10]SPAWNT,LS:[5,10]SPAWNT/-sp=LB:[1,1]netlib/ml,SR:[5,10]SPAWNT
.IF <EXSTAT> NE <SUCCES> .GOTO 1000
'mcr'MAC OB:[5,10]XMINT,LS:[5,10]XMINT/-sp=LB:[1,1]netlib/ml,SR:[5,10]XMINT
.IF <EXSTAT> NE <SUCCES> .GOTO 1000
'mcr'MAC OB:[5,10]XMIWNT,LS:[5,10]XMIWNT/-sp=LB:[1,1]netlib/ml,SR:[5,10]XMIWNT
.IF <EXSTAT> NE <SUCCES> .GOTO 1000
;
'mcr'pip netclib.ob=*nt.obj
.IF <EXSTAT> NE <SUCCES> .GOTO 1000
'mcr'lbr LB:[1,1]CN/cr=netclib.ob
.IF <EXSTAT> NE <SUCCES> .GOTO 1000
'mcr'PIP OB:[5,10]*.obj;*/de,*.ob;*
'mcr'PIP LB:[1,1]CN.OLB/PU
;
'mcr'TIM
; DECnet library built successfully.
;
; Now build the DECnet Linbrary documentation
;
.IFNINS ...GTR 'MCR'INS [5,26]GETRNO/TASK=...GTR/CKP=YES
.IFNINS ...GTR .GOTO 1000
.IFNINS ...GTK 'MCR'INS [5,26]GETKWK/TASK=...GTK/CKP=YES
.IFNINS ...GTK .GOTO 1000
.IFNINS ...KWK 'MCR'INS [5,26]KWIK/TASK=...KWK/CKP=YES
.IFNINS ...KWK .GOTO 1000
.IFNINS ...IDX 'MCR'INS [5,26]RNOIDX/TASK=...IDX/CKP=YES
.IFNINS ...IDX .GOTO 1000
;
'mcr'TIM
'mcr'gtr -m -h SR:[5,10]CNHDR.RNO >CN.GTR SR:[5,10]*.mac 
.IF <EXSTAT> NE <SUCCES> .GOTO 1000
'mcr'GTK >CN.GTK SR:[5,10]*.mac 
.IF <EXSTAT> NE <SUCCES> .GOTO 1000
'mcr'kwk -T 10 -W 64 <CN.GTK >CN.KWK
.IF <EXSTAT> NE <SUCCES> .GOTO 1000
'mcr'IDX <CN.KWK >CN.IDX
.IF <EXSTAT> NE <SUCCES> .GOTO 1000
'mcr'PIP OU:[5,3]CN.RNO/NV=CN.GTR,CN.IDX
.IF <EXSTAT> NE <SUCCES> .GOTO 1000
'mcr'PIP CN.GTK;*/DE/NM,CN.KWK;*,CN.IDX;*,CN.GTR;*
'mcr'PIP OU:[5,3]CN.RNO/PU
;
.IFINS ...rno 'mcr'RNO OU:[5,3]CN=OU:[5,3]CN
;
'mcr'TIM
;
; DECnet Library build succesfully completed
;
.EXIT <SUCCES>
.1000:
;
; There has been an error. Please re-read the build instructions in
; the manual.
;
.EXIT -1
