.ENABLE QUIET
;command file to assemble pascal-3 library modules (.MAC source files only)
; Create: JMB 22-jan-82
; Renamed: to MACBLD.CMD from P2EXT.CMD by PHIL 16-Aug-82
; Reworked for Pascal-3 by JMB 25-Aug-83
;	(syntax and behavior unchanged).	
;	**NOTE** library is now assumed on SY:. This is to lessen 
;	fragmentation of lb:. The idea is to mung the local (SY:)
;	copy of the library, compress same, and superceded the LB:
;	copy. We just don't have room on LB: to let the library
;	grow during development. 
;
; invoke as --
; @MACBLD file [switch] [switch]
; -- where file is the simple name of the module
; to be assembled, and switch is one of the options listed below.
; SY:[22,310]file.MAC is assumed and required. 
; Resulting object module is included (replaced) in SY:[22,310]P3UTIL.OLB
; if no assembly errors result. The object is then deleted.
; By default, no listing file is generated.
;
; OPTIONS:
; Listing output -
;  L = Generate 132 column listing 
;  N = Generate listing
;      Neither listing is spooled. 
;
; Object file -
;  O = Will cause the object file to be retained, and will supress
;      inclusion in the library. This is usefull during debugging.
;
.ENABLE SUBSTITUTION
.SETS FILE P1
.SETF OBJ
.SETF DOLST
.SETF L80
.SETN STAT 1
.SETS UIC "[22,310]"
.IF P2 = "N" .OR .IF P3 = "N" .SETT L80
.IF P2 = "L" .OR .IF P3 = "L" .SETT DOLST 
.IF P2 = "O" .OR .IF P3 = "O" .SETT OBJ
.DISABLE QUIET
.IFT DOLST .AND .IFF L80 MAC 'FILE','FILE'/-SP='UIC'PASMAC,'FILE'
.IFT L80 MAC 'FILE','FILE'/-SP/LI:TTM='UIC'PASMAC,'FILE'
.IFF L80 .AND .IFF DOLST MAC 'FILE'='UIC'PASMAC,'FILE'
.IF <EXSTAT> EQ 1 .GOTO 10
.SETN STAT <EXSTAT>
;  MACRO ERRORS ENCOUNTERED
.GOTO PURGE
.10:
LBR 'UIC'P3UTIL.OLB/RP='FILE'
.PURGE:
.IFF OBJ PIP 'FILE'.OBJ;*/DE
PIP 'FILE'.*/PU
.EXIT STAT
