ref: f3cb4b36831e141994b9508139f6c2e4d69ebbe6
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
bin/test/vmissingfiles
bin/test/vvariables
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}