Remove build-time dependency on awk, using erlang instead