ref: a4adf6b569bbf3e0258bffcbbe2ac8c3adf46792
dir: /mkfile/
invoices=`{cd invoice; walk -d -n 1}
targets=`{for (f in $invoices) { echo invoice/^$f^/invoice-^$f^.pdf }}
all:V: test invoices balance
test:VQ:
# run tests for data integrity
for (t in bin/test/v*)
test -x $t && $t
balance:VQ: balance.pdf
balance.pdf:VQ:
bin/balance | sed -f lib/balance.sed | tbl | troff -ms | lp -dstdout | ps2pdf > $target
echo '√' balance.pdf
invoices:VQ: $targets
invoice/([^/]+)/invoice-([^/]+).pdf:RQ: invoice/\1/template invoice/\1/data.tsv
bin/buildinvoice.rc $stem1 > $target
echo built $target `{cat invoice/$stem1/md5sum}