HP-UX has a non-standard but quite usable equivalent to the sendmail.mc macro.
Here is a script that automates the process:
http://www.hpux.ws/buildmail.hpux.text
Tested for 11.00 11i v1 sendmail 8.9 and 8.11 and 8.13(Tested with HP depot sendmail only.)