	.ENABLE SUBSTITUTION
;
;		'<FILSPC>'
;
;	Rebuild FIGURE, a calculator program.
;
	.SETS S$MCR "MCR "
	.IF <CLI> = "MCR"	.SETS S$MCR ""

	.SETF L$F4P	! Not rebuilding all F4P
	.SETF L$MAC	! Not rebuilding all MAC
	.SETF L$ABO	! Not aborting.
	.SETF L$TKB	! Not linking (yet).
	.SETF L$DEB	! Not debugging.
	.SETS S$DEB ""	! No debugs.
	.SETS S$LIBR P2	! Library?

	.SETS S$CPLS "F4P,F77"
	.SETN N$CPLR 0.
.CPLLP:
	.IF S$CPLS = ""	.GOTO CPLLPX
	.PARSE S$CPLS "," S$CPLR S$CPLS
	.IFNINS ...'S$CPLR'	.GOTO CPLLP
	.SETS S$FTN S$CPLR
	.INC N$CPLR
	.GOTO CPLLP
.CPLLPX:.IF N$CPLR = 1	.GOTO CPLLPZ
	.ASKS [3:3:S$FTN] S$FTN What is your default FORTRAN compiler
.CPLLPZ:.;
	

	.IF P1 = "FALSE"	.GOTO QASKD
	.ASK [<FALSE>] L$DEB Do you want to compile with debugs
.QASKD:	.SETS S$LIBR "resident library"
	.IF <SYSTEM> = 6	.SETS S$LIBR "resident or supervisor library"
	.DISABLE DISPLAY
	;>* What 'S$LIBR' shall I link to
	.ENABLE DISPLAY
	.ASKS S$LIBR                                (default:none)
	.IF S$LIBR = ""	.GOTO QASKL
	.SETF L$Q
	.IF <SYSTEM> = 6	.ASK L$Q Is 'S$LIBR' a supervisor mode library
	.IFT L$Q	.SETS S$LIBR "SUPLIB	= 'S$LIBR':SV"
	.IFF L$Q	.SETS S$LIBR "LIBR	= 'S$LIBR':RO"
.QASKL:	.IFT L$DEB	.SETS S$DEB "/DE"
	'S$MCR'PIP IPARSE.FTN/PU & *.*;1/RE=IPARSE.FTN
	'S$MCR'PIP FIG.FTN/PU & *.*;1/RE=FIG.FTN
	'S$MCR'PIP FIGRSX.FTN/PU & *.*;1/RE=FIGRSX.FTN
	'S$MCR'PIP FIGPSR.FTN/PU & *.*;1/RE=FIGPSR.FTN
	'S$MCR'PIP FIGPAS.FTN/PU & *.*;1/RE=FIGPAS.FTN
	'S$MCR'PIP FIGPFL.FTN/PU & *.*;1/RE=FIGPFL.FTN
	'S$MCR'PIP FIGEVL.FTN/PU & *.*;1/RE=FIGEVL.FTN
	'S$MCR''S$FTN' IPARSE=IPARSE/CO:20./TR:NONE/-CK'S$DEB'
	'S$MCR''S$FTN' FIG=FIG/CO:20./TR:NONE/-CK'S$DEB'
	'S$MCR''S$FTN' FIGRSX=FIGRSX/CO:20./TR:NONE/-CK'S$DEB'
	'S$MCR''S$FTN' FIGPSR=FIGPSR/CO:20./TR:NONE/-CK'S$DEB'
	'S$MCR''S$FTN' FIGPAS=FIGPAS/CO:20./TR:NONE/-CK'S$DEB'
	'S$MCR''S$FTN' FIGPFL=FIGPFL/CO:20./TR:NONE/-CK'S$DEB'
	'S$MCR''S$FTN' FIGEVL=FIGEVL/CO:20./TR:NONE/-CK'S$DEB'
	.OPEN FIGTKB.TMP
	.DATA FIG/FP/CP = FIG,FIGRSX,
	.IF S$LIBR = ""	.DATA 	LB:[1,1]SYSLIB/LB:$SHORT
	.DATA 	FIGPSR,IPARSE,
	.DATA 		FIGPAS,
	.DATA 		FIGPFL,
	.DATA 	FIGEVL
	.DATA /
	.DATA ACTFIL	= 6
	.DATA ASG	= SY:1
	.DATA ASG	= SY:2
	.DATA ASG	= SY:3
	.DATA ASG	= SY:4
	.DATA ASG	= TI:5
	.DATA ASG	= TI:6
	.IF S$LIBR <> ""	.DATA 'S$LIBR'
	.DATA TASK	= ...FIG
	.DATA IDENT	= 86.108
	.DATA //
	.CLOSE
	'S$MCR'TKB @FIGTKB.TMP
	'S$MCR'PIP IPARSE.OBJ;*/DE/NM
	'S$MCR'PIP FIG.OBJ;*/DE/NM
	'S$MCR'PIP FIGRSX.OBJ;*/DE/NM
	'S$MCR'PIP FIGPSR.OBJ;*/DE/NM
	'S$MCR'PIP FIGPAS.OBJ;*/DE/NM
	'S$MCR'PIP FIGPFL.OBJ;*/DE/NM
	'S$MCR'PIP FIGEVL.OBJ;*/DE/NM
	'S$MCR'PIP FIGTKB.TMP;*/DE/NM
	'S$MCR'PIP FIG.TSK/PU & *.*;1/RE=FIG.TSK
	.EXIT
