	.ENABLE SUBSTITUTION
;
; Documentation Extractor command file
;
; This command file will assemble, task build and (if run from a priviledged
; UIC) install the Documentation Extractor into your system.
;
; First, check to make sure the necessary files are present.
;
	.SETN N1 0
	.SETS FILE "'<UIC>'DOCEXT.MAC"
	.GOSUB CHKFIL
	.SETS FILE "'<UIC>'PROCES.MAC"
	.GOSUB CHKFIL
	.SETS FILE "'<UIC>'ERROR.MAC"
	.GOSUB CHKFIL
	.SETS FILE "'<UIC>'DATA.MAC"
	.GOSUB CHKFIL
	.SETS FILE "'<UIC>'DOCASM.CMD"
	.GOSUB CHKFIL
	.SETS FILE "'<UIC>'DOCBLD.CMD"
	.GOSUB CHKFIL
	.SETS FILE "'<UIC>'XRFBLD.CMD"
	.GOSUB CHKFIL
	.SETS FILE "'<UIC>'XRFBLD.ODL"
	.GOSUB CHKFIL
	.SETS FILE "'<UIC>'XRF.OLB"
	.GOSUB CHKFIL
	.SETS FILE "[1,1]SYSLIB.OLB"
	.GOSUB CHKFIL
	.SETS FILE "[1,1]VMLIB.OLB"
	.GOSUB CHKFIL
	.IF N1 EQ 0 .GOTO 20
;
; You will need to get these files from the distribution tape before this
; command file can successfully run.
;
/
.20:
; Next, assemble the Document Extractor MACRO-11 source modules.
;
	.IFNINS MAC RUN $MAC/CMD="MAC @DOCASM"
	.IFINS  MAC MAC @DOCASM
;
; Then, task build both the Document Extractor and its companion task XRF
; (the cross-reference utility).
;
	.IFNINS TKB RUN $TKB/CMD="TKB @DOCBLD"
	.IFINS  TKB TKB @DOCBLD
	.IFNINS TKB RUN $TKB/CMD="TKB @XRFBLD"
	.IFINS  TKB TKB @XRFBLD
	.IFT <PRIVIL> .GOTO 30
;
; You are not currently a priviledged user.  You will therefore have to
; install the Document Extractor and the cross-reference utility with
; the following two commands:
	.SETS S1 "; "
	.GOTO 40
.30:
;
; Since you are a priviledged user, this command file will install the
; Document Extractor and cross-reference utility for you.  You should,
; however, move both the DOC.TSK and XRF.TSK task images to the '<SYSUIC>'
; UIC and install them with VMR.
	.SETS S1 ""
	.IFINS DOC REM DOC
	.IFINS XRF... REM XRF...
.40:
;
'S1'INS DOC
'S1'INS XRF
;
; The documentation extractor is now ready to use.  As a test to make sure
; that it works, use it on itself to create the documentation for itself.
;
DOC @DOCEXT
;
; The Documentation Extraction assembly and task build is now complete.
;
/

.CHKFIL:
	.TESTFILE 'FILE'
	.IF <FILERR> EQ 1 .GOTO CHK20
	.INC N1
	.IF N1 NE 1 .GOTO CHK10
; You have several files missing from the distribution tape.  These files
; are:
;
.CHK10:
;     '<FILSPC>'
.CHK20:
	.RETURN
 
