1 .\" This file is automatically generated. Do not edit!
2 .\" @(#)$Id: mh-hack.rf,v 1.6 1992/05/12 22:23:34 jromine Exp $
5 mh-hack \- how to hack MH
9 This is a description of how one can modify the \fIMH\fR system.
10 The \fIMH\fR distribution has a lot of complex inter\-relations,
11 so before you go modifying any code, you should read this and
12 understand what is going on.
16 \fBADDING A NEW PROGRAM\fR
18 Suppose you want to create a new \fIMH\fR command called
20 First, create and edit \*(lqpickle.c\*(rq in the \fBuip/\fR directory.
21 Next edit \fBconf/makefiles/uip\fR to include \*(lqpickle\*(rq.
22 This file has directions at the end of it which explain how it should
24 Next, update any documentation (described below).
25 At this point you can re\-configure \fIMH\fR.
26 See \fImh\-gen(8)\fR for instructions on how to do this
27 (basically, you want \*(lqmhconfig MH\*(rq).
30 \fBADDING A NEW SUBROUTINE\fR
32 Suppose you want to create a new \fIMH\fR routine called
34 First, create and edit \*(lqpickle.c\*(rq in the \fBsbr/\fR directory.
35 Next edit \fBconf/makefiles/sbr\fR to include \*(lqpickle\*(rq.
36 This file has directions at the end of it which explain how it should
38 You should modify \fBconfig/mh.h\fR to define \*(lqpickle ();\*(rq.
39 Similarly, \fBsbr/llib\-lsbr\fR should be modified for \fIlint\fR.
40 At this point you can re\-configure \fIMH\fR.
43 \fBUPDATING DOCUMENTATION\fR
45 Edit whatever files you want in \fBconf/doc/\fR.
46 When documenting a new program, such as \*(lqpickle\*(rq,
47 you should create a manual page with the name \*(lqpickle.rf\*(rq.
48 The file \fBconf/doc/template\fR has a manual page template that you
50 If you are documenting a new program, then you should also update three
52 The file \fBconf/doc/mh.rf\fR should be modified to include the
53 \*(lq\&.NA\*(rq section from \*(lqpickle.rf\*(rq.
54 The file \fBconf/doc/mh\-chart.rf\fR should be modified to include
55 the \*(lq\&.SY\*(rq section from \*(lqpickle.rf\*(rq.
56 Finally, the file \fBconf/doc/MH.rf\fR should be modified to include a
57 \*(lq\&.so pickle.me\*(rq.
58 Naturally, none of these changes will be reflected in the configuration
59 until you actually run \fImhconfig\fR.
62 Too numerous to mention. Honest.
66 Hacking is an art, but most programmers are butchers, not artists.