|
|
1.1 root 1: .\" This file is automatically generated. Do not edit!
2: .SC MH\-HACK 8
3: .NA
4: mh\-hack \- how to hack MH
5: .SY
6: big hack attack
7: .DE
8: This is a description of how one can modify the \fIMH\fR system.
9: The \fIMH\fR distribution has a lot of complex inter\-relations,
10: so before you go modifying any code, you should read this and
11: understand what is going on.
12:
13: .in +.5i
14: .ti -.5i
15: \fBADDING A NEW PROGRAM\fR
16: .br
17: Suppose you want to create a new \fIMH\fR command called
18: \*(lqpickle\*(rq.
19: First, create and edit \*(lqpickle.c\*(rq in the \fBuip/\fR directory.
20: Next edit \fBconf/makefiles/uip\fR to include \*(lqpickle\*(rq.
21: This file has directions at the end of it which explain how it should
22: be modified.
23: Next, update any documentation (described below).
24: At this point you can re\-configure \fIMH\fR.
25: See \fImh\-gen(8)\fR for instructions on how to do this
26: (basically, you want \*(lqmhconfig MH\*(rq).
27:
28: .ti -.5i
29: \fBADDING A NEW SUBROUTINE\fR
30: .br
31: Suppose you want to create a new \fIMH\fR routine called
32: \*(lqpickle\*(rq.
33: First, create and edit \*(lqpickle.c\*(rq in the \fBsbr/\fR directory.
34: Next edit \fBconf/makefiles/sbr\fR to include \*(lqpickle\*(rq.
35: This file has directions at the end of it which explain how it should
36: be modified.
37: You should modify \fBconfig/mh.h\fR to define \*(lqpickle ();\*(rq.
38: Similarly, \fBsbr/llib\-lsbr\fR should be modified for \fIlint\fR.
39: At this point you can re\-configure \fIMH\fR.
40:
41: .ti -.5i
42: \fBUPDATING DOCUMENTATION\fR
43: .br
44: Edit whatever files you want in \fBconf/doc/\fR.
45: When documenting a new program, such as \*(lqpickle\*(rq,
46: you should create a manual page with the name \*(lqpickle.rf\*(rq.
47: The file \fBconf/doc/template\fR has a manual page template that you
48: can use.
49: If you are documenting a new program, then you should also update three
50: other files:
51: The file \fBconf/doc/mh.rf\fR should be modified to include the
52: \*(lq\&.NA\*(rq section from \*(lqpickle.rf\*(rq.
53: The file \fBconf/doc/mh\-chart.rf\fR should be modified to include
54: the \*(lq\&.SY\*(rq section from \*(lqpickle.rf\*(rq.
55: Finally, the file \fBconf/doc/MH.rf\fR should be modified to include a
56: \*(lq\&.so pickle.me\*(rq.
57: Naturally, none of these changes will be reflected in the configuration
58: until you actually run \fImhconfig\fR.
59: .in -.5i
60: .Fi
61: Too numerous to mention. Honest.
62: .Sa
63: mh\-gen(8)
64: .Bu
65: Hacking is an art, but most programmers are butchers, not artists.
66: .En
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.