awk.h, awk.g.c, token.c, proctab.c and awk.lx.c were generated manually from the info in the Makefile.mk
The yacc used was byacc but it might also work with the heirloom devtools yacc.

byacc -d awk.g.y
mv y.tab.c awk.g.c
mv y.tab.h awk.g.h

Plan9 lex does not work and flex got broken??? need to check/rebuild it...
Heirloom devtools lex works.
lex awk.lx.l
mv lex.yy.c awk.lx.c

mkmk -o proc -S -B  -I../include -I/sys/include/ape/heirloom -D_POSIX_SOURCE -D_SUSV2_SOURCE -D_BSD_EXTENSION proc.c > mkfile.proc

mkmk -o oawk -S -B -a -I../include -I/sys/include/ape/heirloom -D_POSIX_SOURCE -D_SUSV2_SOURCE -D_BSD_EXTENSION -DSU3 -x awk.g.y -x awk.g.2001.y -x awk.lx.l -x proc.c > mkfile

DEPENDENCIES:

Heirloom libuxre must be rebuilt with a proper wchar library (like libutf8) to work. Otherwise linking errors occur at this stage.