	.ENABLE GLOBAL
	.ENABLE SUBSTITUTION
	;
	;	Building REI -- File Reincarnation Utility
	;
	.SETF SRCDEV
	.IFNDF $TKB .SETS $TKB "TKB"
	.IFDF $SRC .GOTO SRCOK
	.SETS $SRC COMMAN
	.PARSE $SRC " " $SRC DUMMY
	.PARSE $SRC "/" $SRC DUMMY
	.PARSE $SRC "." $SRC EXT
	.IF EXT EQ "" .SETS EXT "CMD"
	.TESTFILE '$SRC'.'EXT'
	.PARSE <FILSPC> ":" $SRC TEMP
	.TESTFILE SY:
	.PARSE <FILSPC> ":" SYDEV TEMP
	.IF $SRC EQ SYDEV .SETT SRCDEV
	.SETS $SRC $SRC+":"
.SRCOK:	.SETF Q
	.IFDF $LST .AND .IFDF $MP .GOTO CHKMP
	.ASK Q Generate listings
	.IFT Q .SETS $LST ""
	.IFF Q .SETS $LST "NL:"
	.SETF Q
	.ASK Q Generate maps
	.IFT Q .SETS $MP ""
	.IFF Q .SETS $MP "NL:"
.CHKMP:
.REI1:
	SLP @'$SRC'REI.COR
	MAC REI,'$LST'REI/-SP=REI
	PIP REI.MAC;*/DE
	.OPEN REITKB.CMD
	.DATA REI/PR:0/CP,'$MP'REI/-SP=REI
	.DATA /
	.DATA UIC=[1,1]
	.DATA TASK=...REI
	.DATA //
	.CLOSE
	'$TKB' @REITKB
	PIP REI.OBJ;*/DE,REITKB.CMD;*/DE
.REIEX:	;
