Eliminate the python build requirement

This moves the template into the Makefile and does the formatting
work with `awk`. It's helpful on platforms where Python is not
available by default, e.g. *BSD.