Commit | Line | Data |
---|---|---|
ad787160 C |
1 | .\" @(MHWARNING) |
2 | .\" @(#)$Id: mh-hack.rf,v 1.6 1992/05/12 22:23:34 jromine Exp $ | |
3 | .SC MH-HACK 8 | |
29a3a89d | 4 | .NA |
ad787160 | 5 | mh-hack \- how to hack MH |
29a3a89d C |
6 | .SY |
7 | big hack attack | |
8 | .DE | |
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. | |
13 | ||
14 | .in +.5i | |
15 | .ti -.5i | |
16 | \fBADDING A NEW PROGRAM\fR | |
17 | .br | |
18 | Suppose you want to create a new \fIMH\fR command called | |
19 | \*(lqpickle\*(rq. | |
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 | |
23 | be modified. | |
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). | |
28 | ||
29 | .ti -.5i | |
30 | \fBADDING A NEW SUBROUTINE\fR | |
31 | .br | |
32 | Suppose you want to create a new \fIMH\fR routine called | |
33 | \*(lqpickle\*(rq. | |
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 | |
37 | be modified. | |
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. | |
41 | ||
42 | .ti -.5i | |
43 | \fBUPDATING DOCUMENTATION\fR | |
44 | .br | |
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 | |
49 | can use. | |
50 | If you are documenting a new program, then you should also update three | |
51 | other files: | |
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. | |
60 | .in -.5i | |
61 | .Fi | |
62 | Too numerous to mention. Honest. | |
63 | .Sa | |
64 | mh\-gen(8) | |
65 | .Bu | |
66 | Hacking is an art, but most programmers are butchers, not artists. | |
67 | .En |