; 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 TT3 NOW
	PIP /NV='UIC'*.RAT,*.CMD,RATFOR.RNO,.ODL,.SUB,.LAY,README.1ST
	PIP *.*/PU
	PIP *.FTN;*/DE/NM,*.LST;*,*.MAP;*,*.OBJ;*,*.OLB;*,*.TMP;*,*.TT3;*
.IFNINS ...RNO	INS $RNO
	.XQT RNO RATFOR.DOC/-SP=RATFOR.RNO
;
; EDIT README.1ST TO UPDATE IT
;
	KED README.1ST
;
; EDIT RATRSX TO UNDEFINE openclose AND f4p AND spawnit AND realcode 
;
	KED RATRSX.RAT
;
; EDIT ICSI TO UNDEFINE openclose 
;
	KED ICSI.RAT
;
; EDIT RATDEF.RAT TO GET SWITCH DEFAULTS RIGHT
;
	KED RATDEF.RAT
;
; EDIT TKBRATFOR TO GET THE RESIDENT LIBRARIES RIGHT
;
	KED TKBRATFOR.CMD
;
; EDIT RATFOR.ODL TO GET THE ODL RIGHT
;
	KED RATFOR.ODL
;
	PIP README1ST.TT3=README.1ST
	PIP RATFORODL.TT3=RATFOR.ODL
	PIP RATFORDOC.TT3=RATFOR.DOC
	.IFT PRINT	PIP README1ST.TT3,RATFORODL.TT3,RATFORDOC.TT3/SP
	PIP CMD.TT3/ME=*.CMD
	.IFT PRINT	PIP CMD.TT3/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 RATRSX=RATRSX/-LC/-CO/-GO
	RAT ICSI=ICSI/-LC/-CO/-GO
	FOR @FORRATFOR
	LBR @LBRRATFOR
	TKB @TKBRATFOR
	REM ...RAT
	PIP RATFORMAP.TT3=RATFOR.MAP
	.IFT PRINT	PIP RATFORMAP.TT3/SP
	INS RATFOR
;
; TEST THE NEW RATFOR
	RAT RATRSX.TMP,RATRSX.TT3=RATRSX/SC
	RAT RAT1.TMP,RAT1.TT3=RAT1
	RAT RAT2.TMP,RAT2.TT3=RAT2
	RAT ,ICSI.TT3=ICSI/FO/LC
	.IFT PRINT	PIP RATRSX.TT3,RAT1.TT3,RAT2.TT3,ICSI.TT3/SP
	FOR RATRSX=RATRSX.TMP
	FOR RAT1=RAT1.TMP
	FOR RAT2=RAT2.TMP
	RAT ,STRLIB.TT3=STRLIB/SC
	.IFT PRINT	PIP STRLIB.TT3/SP
	RAT VTLIB/SC
	RAT VTTEST
	PIP VTLIB.TT3=VTLIB.LST
	PIP VTTEST.TT3=VTTEST.LST
	.IFT PRINT	PIP VTLIB.TT3,VTTEST.TT3/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.TT3=/LI
	.IFT PRINT	PIP KITDIR.TT3/SP
;
;** DELETE GARBAGE FILES AFTER I EXIT-- DON'T FORGET *.TT3 LATER
;DONE
/
