.ENABLE SUBSTITUTION
.; DECUS-C Documentation build command file for native RSX-11M.
.; By
.;      Volker C. Huck
.;      13-Oct-88
.;
;
; MGTDOC.CMD
;
; Build Library RUNOFF on RSX-11M, run as an indirect command file
; NOTE: this command file does not build CC.DOC, AS.DOC or CBUGS.DOC
;
.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 documentation
;	kit for native RSX. If you want to build DECUS-C documentation under
;	VAX-11 RSX, use VGTDOC.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>'), MGTDOC will
; now exit.  Type "@MGTDOC" 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 ...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
;
;Take a break.
;
'mcr'TIM
;
; Extract info from library MACRO sources.
;
'mcr'GTR    -O [5,3]CLIB.RNO   -M -H [5,3]CLIBHD.RNO [5,15]*.MAC [5,16]*.MAC
.IF <EXSTAT> NE <SUCCES> .GOTO 1000
'mcr'GTR -W -O [5,3]WIZARD.RNO -M -H [5,3]CLIBHD.RNO [5,15]*.MAC [5,16]*.MAC
.IF <EXSTAT> NE <SUCCES> .GOTO 1000
'mcr'GTR    -O [5,3]TOOLS.RNO  -C -H [5,3]TOOLHD.RNO [5,26]*.C [5,12]LEX.C
.IF <EXSTAT> NE <SUCCES> .GOTO 1000
;
; Build kwik indexes
;
'mcr'GTK    >[5,3]CLIB.TMP      [5,15]*.MAC [5,16]*.MAC
.IF <EXSTAT> NE <SUCCES> .GOTO 1000
'mcr'GTK -W >[5,3]WIZARD.TMP    [5,15]*.MAC [5,16]*.MAC
.IF <EXSTAT> NE <SUCCES> .GOTO 1000
'mcr'GTK    >[5,3]TOOLS.TMP  -C [5,26]*.C   [5,12]LEX.C
.IF <EXSTAT> NE <SUCCES> .GOTO 1000
;
'mcr'KWK -T 10 -W 64 <CLIB.TMP   >CLIBIX.TMP
.IF <EXSTAT> NE <SUCCES> .GOTO 1000
'mcr'PIP CLIB.TMP;*/DE
'mcr'KWK -T 10 -W 64 <WIZARD.TMP >WIZIX.TMP
.IF <EXSTAT> NE <SUCCES> .GOTO 1000
'mcr'PIP WIZARD.TMP;*/DE
'mcr'KWK -T 10 -W 64 <TOOLS.TMP  >TOOLIX.TMP
.IF <EXSTAT> NE <SUCCES> .GOTO 1000
'mcr'PIP TOOLS.TMP;*/DE
;
; Mark funny bytes in the index.
;
'mcr'IDX <CLIBIX.TMP >CLIBIX.FIX
.IF <EXSTAT> NE <SUCCES> .GOTO 1000
'mcr'PIP CLIBIX.TMP;*/DE
'mcr'IDX <WIZIX.TMP >WIZIX.FIX
.IF <EXSTAT> NE <SUCCES> .GOTO 1000
'mcr'PIP WIZIX.TMP;*/DE
'mcr'IDX <TOOLIX.TMP >TOOLIX.FIX
.IF <EXSTAT> NE <SUCCES> .GOTO 1000
'mcr'PIP TOOLIX.TMP;*/DE
;
; Form RUNOFF source files, appending index
;
'mcr'PIP WIZARD.RNO/NV/ME=WIZARD.RNO,IXHEAD.RNO,WIZIX.FIX
.IF <EXSTAT> NE <SUCCES> .GOTO 1000
'mcr'PIP CLIB.RNO/NV/ME=CLIB.RNO,IXHEAD.RNO,CLIBIX.FIX
.IF <EXSTAT> NE <SUCCES> .GOTO 1000
'mcr'PIP TOOLS.RNO/NV/ME=TOOLS.RNO,IXTOOL.RNO,TOOLIX.FIX
.IF <EXSTAT> NE <SUCCES> .GOTO 1000
'mcr'PIP WIZARD.RNO/PU,CLIB.RNO,TOOLS.RNO
.IF <EXSTAT> NE <SUCCES> .GOTO 1000
'mcr'PIP WIZARD.DOC;*/DE/NM,CLIB.DOC;*,TOOLS.DOC;*
'mcr'PIP WIZFIX.FIX;*/DE
'mcr'PIP CLIBIX.FIX;*/DE
'mcr'PIP TOOLIX.FIX;*/DE
;
; Process with RUNOFF
;
.IFNINS ...RNO INS $RNO/TASK=...RNO
.IFINS ...RNO .GOTO RUNOFF
;
; Couldn''t find RUNOFF Task, you can also process RUNOFF Files on VMS.
; To do so, copy CLIB.RNO, WIZARD.RNO and TOOLS.RNO to VMS and type in:
;		RUNOFF /NOUNDERLINE /OUT=CLIB.DOC    CLIB
;		RUNOFF /NOUNDERLINE /OUT=WIZARD.DOC  WIZARD
;		RUNOFF /NOUNDERLINE /OUT=TOOLS.DOC   TOOLS
;
.GOTO EXIT
.RUNOFF:
RNO CLIB/UL:L/-SP=CLIB
.IF <EXSTAT> NE <SUCCES> .GOTO 1000
RNO WIZARD/UL:L/-SP=WIZARD
.IF <EXSTAT> NE <SUCCES> .GOTO 1000
RNO TOOLS/UL:L/-SP=TOOLS
.IF <EXSTAT> NE <SUCCES> .GOTO 1000
;
.EXIT:
; Building of Documentation succesfully completed.
;
.EXIT
.;
.1000:
;
; There has been an error. Please reread building instructions.
;
.EXIT -1
