.key opt1
;
;   Include file consistency checker.  All-at-once assembly checker.
;
;   Written Saturday 03-Nov-90 18:20:10 Bryce Nesbitt
;
delete >NIL: t:A<$$> quiet
delete >NIL: t:B<$$> quiet
delete >NIL: t:C<$$> quiet
delete >NIL: t:D<$$> quiet
delete >NIL: t:E<$$> quiet

echo  >t:B<$$> ";---Commodore-Amiga PREASSEM builder END"    ;create B file

echo  >t:D<$$> ";-----------------------------------------------------------"
echo >>t:D<$$> ";---                 PREASSEM builder                    ---"
echo >>t:D<$$> ";---        Copyright 1989 Commodore-Amiga, Inc.         ---"
echo >>t:D<$$> ";---     Wednesday 24-May-89 22:17:27 Bryce Nesbitt      ---"
echo >>t:D<$$> ";---                                                     ---"
echo >>t:D<$$> ";--- Assembles into a preassembled include file for CAPE ---"
echo >>t:D<$$> ";---      CAPE -a t:E1 -o amiga_symbols.pre -i inc:      ---"
echo >>t:D<$$> ";-----------------------------------------------------------"
echo >>t:D<$$> "  PREASM                      ;magic psuedo-op"
echo >>t:D<$$> "  INCLUDE 'work/exec/types.i' ;get types.i first!"
echo >>t:D<$$> "PREASSEMBLED_INCLUDES   EQU 1 ;for conditional tests"
echo >>t:D<$$> ";---------------------------------------------------------"
echo >>t:D<$$> "FUNCDEF MACRO                 ;null macro to prevent errors"
echo >>t:D<$$> "        ENDM"
echo >>t:D<$$> ""
echo >>t:D<$$> ""

echo "---------- assembling all include files at once ----------"
list >t:A<$$> work/#? DIRS LFORMAT "list >>t:B<$$> %s%s/#?.i LFORMAT=*"  INCLUDE '%%s%%s'*""
execute t:A<$$>
sort t:B<$$> to t:C<$$>
join t:D<$$> t:C<$$> as t:E<$$>

cape -a t:E<$$> -o amiga_symbols.pre -i work	;Rock and Roll!

delete amiga_symbols.pre quiet
