SOPTS="-fs -u -v 9"es

INC="defs global_vars pass1/scanner/scan_sep_inc pass1/applinfer/outermost_inc"


# list of files to compile - full path - but no suffix
SRC="globals_init main mine \
pass1/scanner/scan \
pass1/parser/grammar.fixed \
pass1/parser/initids \
pass1/applinfer/precedence \
pass1/stt/stt \
pass5d/RIC \
stree/ststructs_cls \
stree/mknode \
pass1/applinfer/mkappl \
stree/Array \
pass1/applinfer/mkappl2 \
pass1/applinfer/outermost_op \
pass1/applinfer/single_arg \
pass1/applinfer/cand_cond \
pass1/applinfer/cor_cond \
sigio/sig_out \
sigio/sig_in \
pass2/add_id \
pass2/process_id \
pass2/restore \
pass2/retrieve \
pass3/fixup \
pass3/number \
pass3/reorder \
pass3/sigids \
pass4/checksigs \
pass4/findsig \
pass5d/codegen \
stree/drefops \
pass5c/analyze \
pass5c/accessible \
pass5c/bld_analyze \
pass5c/decl_sort \
pass5c/allocate \
pass3/gden_order \
pass3/tsig_order \
pass4/findapplsig \
pass4/coerce \
pass4/fixhints \
pass2/build_symtab"

# list of .u file - no path but .tmp.u suffix
US="globals_init.tmp.u \
main.tmp.u \
mine.tmp.u \
scan.tmp.u \
grammar.fixed.tmp.u \
initids.tmp.u \
precedence.tmp.u \
stt.tmp.u \
RIC.tmp.u \
ststructs_cls.tmp.u \
mknode.tmp.u \
mkappl.tmp.u \
Array.tmp.u \
mkappl2.tmp.u \
outermost_op.tmp.u \
single_arg.tmp.u \
cand_cond.tmp.u \
cor_cond.tmp.u \
sig_out.tmp.u \
sig_in.tmp.u \
add_id.tmp.u \
process_id.tmp.u \
restore.tmp.u \
retrieve.tmp.u \
fixup.tmp.u \
number.tmp.u \
reorder.tmp.u \
sigids.tmp.u \
checksigs.tmp.u \
findsig.tmp.u \
codegen.tmp.u \
drefops.tmp.u \
analyze.tmp.u \
accessible.tmp.u \
bld_analyze.tmp.u \
decl_sort.tmp.u \
allocate.tmp.u \
gden_order.tmp.u \
tsig_order.tmp.u \
findapplsig.tmp.u \
coerce.tmp.u \
fixhints.tmp.u \
build_symtab.tmp.u"

for var in $SRC
do
    ruby djdpre.rb <$var.icn >$var.tmp.icn
    if unicon -fs -c $OPTS $var.tmp.icn
    then echo $var.tmp.icn succeded
    else
    echo $var.tmp.icn failed
    break
    fi	
done

unicon -o ./russell -fs $US
