; COMMAND FILE TO CREATE THE RATFOR DISTRIBUTION KIT
;
.ENABLE SUBSTITUTION
	SET /UIC=[314,1]
.ASKS UIC ENTER SOURCE UIC [XXX,XXX]
.ASK PRINT WANT TO SPOOL TO LP1 NOW
	PIP /NV='UIC'*.RAT,*.CMD,RATFOR.RNO,RATFOR.ODL,RATFOR.SUB,RATFOR.LAY
	PIP *.*/PU
	PIP *.FTN;*,*.LST;*,*.MAP;*,*.OBJ;*,*.OLB;*,*.TMP;*/DE
.IFNINS ...RNO	INS $RNO
	.XQT RNO RATFOR.DOC/-SP=RATFOR.RNO
;
; EDIT README.1ST TO UPDATE IT
;
	EDI README.1ST
;
; EDIT RATRSX TO UNDEFINE openclose AND f4p AND spawnit AND realcode 
;
	EDI RATRSX.RAT
;
; EDIT RATDEF.RAT TO GET SWITCH DEFAULTS RIGHT
;
	EDI RATDEF.RAT
;
; EDIT TKBRATFOR TO GET THE RESIDENT LIBRARIES RIGHT
;
	EDI TKBRATFOR.CMD
;
; EDIT RATFOR.ODL TO GET THE ODL RIGHT
;
	EDI RATFOR.ODL
;
	PIP README1ST.LP1=README.1ST
	PIP RATFORODL.LP1=RATFOR.ODL
	PIP RATFORDOC.LP1=RATFOR.DOC
	.IFT PRINT	PIP README1ST.LP1,RATFORODL.LP1,RATFORDOC.LP1/SP
	PIP CMD.LP1/ME=*.CMD
	.IFT PRINT	PIP CMD.LP1/SP
;
	.IFNINS ...RAT	INS 'UIC'RATFOR
;
;  BUILD RATFOR FROM SCRATCH
	RAT STRLIB=STRLIB/-LC/-CO/-GO
	FOR STRLIB=STRLIB/-SN
	LBR @LBRSTRLIB
	RAT RAT1=RAT1/-LC/-CO/-GO
	RAT RAT2=RAT2/-LC/-CO/-GO
	RAT RAT3=RAT3/-LC/-CO/-GO
	RAT RATRSX=RATRSX/-LC/-CO/-GO
	RAT ICSI=ICSI/-LC/-CO/-GO
	FOR @FORRATFOR
	LBR @LBRRATFOR
	TKB @TKBRATFOR
	REM ...RAT
	PIP RATFORMAP.LP1=RATFOR.MAP
	.IFT PRINT	PIP RATFORMAP.LP1/SP
	INS RATFOR
;
; TEST THE NEW RATFOR
	RAT RATRSX.TMP,RATRSX.LP1=RATRSX/SC
	RAT RAT1.TMP,RAT1.LP1=RAT1
	RAT RAT2.TMP,RAT2.LP1=RAT2/FO
	RAT RAT3.TMP,RAT3.LP1=RAT3
	RAT ,ICSI.LP1=ICSI
	.IFT PRINT	PIP RATRSX.LP1,RAT1.LP1,RAT2.LP1,RAT3.LP1,ICSI.LP1/SP
	FOR RATRSX=RATRSX.TMP
	FOR RAT1=RAT1.TMP
	FOR RAT2=RAT2.TMP
	FOR RAT3=RAT3.TMP
	RAT ,STRLIB.LP1=STRLIB/SC
	.IFT PRINT	PIP STRLIB.LP1/SP
	RAT VTLIB/SC
	RAT VTTEST
	PIP VTLIB.LP1=VTLIB.LST
	PIP VTTEST.LP1=VTTEST.LST
	.IFT PRINT	PIP VTLIB.LP1,VTTEST.LP1/SP
	FOR VTLIB=VTLIB
	FOR VTTEST=VTTEST
;
;** IF NO ERRORS ABOVE, ALL IS OK
;
	REM ...RAT
;
	PIP *.TSK;*,*.TMP;*,*.LST;*,*.OBJ;*,*.OLB;*,*.MAP;*/DE
	PIP *.*/PU
	PIP *.*/TR
	PIP *.*;1/RE=*.*;*
	SRD /WB/NA/-LI
	PIP KITDIR.LP1=/LI
	.IFT PRINT	PIP KITDIR.LP1/SP
;
;** DELETE GARBAGE FILES AFTER I EXIT-- DON'T FORGET *.LP1 LATER
;DONE
/
