OSDN Git Service

import nethack-3.6.0
[jnethack/source.git] / doc / makedefs.6
1 .TH MAKEDEFS 6 "29 Apr 2010"
2 .\" NetHack 3.6  makedefs.6     $NHDT-Date: 1432512786 2015/05/25 00:13:06 $  $NHDT-Branch: master $:$NHDT-Revision: 1.7 $
3 .UC 4
4 .SH NAME
5 makedefs \- NetHack miscellaneous build-time functions
6 .SH SYNOPSIS
7 .B makedefs
8 {
9 .B -o
10 |
11 .B -d
12 |
13 .B -e
14 |
15 .B -m
16 |
17 .B -v
18 |
19 .B -p
20 |
21 .B -q
22 |
23 .B -r
24 |
25 .B -h
26 |
27 .B -z
28 }
29 .P
30 .B makedefs --input
31 .I file
32 .B --output
33 .I file
34 .BI -- command
35 .SH DESCRIPTION
36 .PP
37 .B Makedefs
38 is a build-time tool used for a variety of
39 .BR NetHack (6)
40 source file creation and modification tasks.  For historical reasons,
41 .B makedefs
42 takes two types of command lines.  When invoked with a short option, the
43 files operated on are determined when
44 .B makedefs
45 is compiled.  When invoked with a long option, the
46 .B --input
47 and 
48 .B --output
49 options are used to specify the files for the
50 .BI -- command.
51 Each command is only available in one of the two formats.
52 .SH SHORT COMMANDS
53 Upper and lower case are both accepted for the short commands.
54 .TP
55 .B -o
56 Generate
57 .I onames.h.
58 .br
59 .TP
60 .B -d
61 Generate
62 .I data.base.
63 .br
64 .TP
65 .B -e
66 Generate
67 .I dungeon.pdf.
68 The input file
69 .I dungeon.def
70 is passed through the
71 same logic as that used by the
72 .B --grep
73 command; see the
74 .B MDGREP FUNCTIONS
75 section below for details.
76 .br
77 .TP
78 .B -m
79 Generate
80 .I monster.c.
81 .br
82 .TP
83 .B -v
84 Generate
85 .I date.h
86 and
87 .I options
88 file.
89 .br
90 .TP
91 .B -p
92 Generate
93 .I pm.h
94 .br
95 .TP
96 .B -q
97 Generate
98 .IR quest.dat .
99 .br
100 .TP
101 .B -r
102 Generate the
103 .I rumors
104 file.
105 .br
106 .TP
107 .B -s
108 Generate the
109 .I bogusmon
110 ,
111 .I engrave
112 and
113 .IR epitaph files.
114 .br
115 .TP
116 .B -h
117 Generate the
118 .B oracles
119 file.
120 .br
121 .TP
122 .B -z
123 Generate
124 .I vis_tab.c
125 and
126 .IR vis_tab.h .
127 .SH LONG COMMANDS
128 .TP
129 .BI --debug
130 Show debugging output.
131 .br
132 .TP
133 .B --make \fR[\fIcommand\fR]
134 Execute a short command.  Command is given without preceding dash.
135 .br
136 .TP
137 .BI --input " file"
138 Specify the input
139 .I file
140 for the command (if needed).  If the file is - standard
141 input is read.
142 .br
143 .TP
144 .BI --output " file"
145 Specify the output
146 .I file
147 for the command (if needed).  If the file is - standard
148 output is written.
149 .br
150 .TP
151 .B --svs \fR[\fIdelimiter\fR]
152 Generate a version string to standard output without a trailing newline.
153 If specified, the delimiter is used between each part of the version string.
154 .br
155 .TP
156 .B --grep
157 Filter the input
158 .I file to the output
159 .IR file .
160 See the
161 .B MDGREP FUNCTIONS
162 section below for information on controlling the filtering operation.
163 .br
164 .TP
165 .B --grep-showvars
166 Show the name and value for each variable known to the grep option.
167 .br
168 .TP
169 .B --grep-trace
170 Turn on debug tracing for the grep function (
171 .B --grep
172 must be specified as well).
173 .br
174 .TP
175 .BI --grep-define " symbol"
176 Force the value of
177 .I symbol
178 to be "defined."
179 .I Symbol
180 must already be known to
181 .BR makedefs .
182 .br
183 .TP
184 .BI --grep-undef " symbol"
185 Force the definition of
186 .I symbol
187 to be "undefined."
188 .I Symbol
189 must already be known to
190 .BR makedefs .
191 .SH MDGREP FUNCTIONS
192 The
193 .B --grep
194 command (and certain other commands) filter their input, on a line-by-line
195 basis, according to control lines embedded in the input and on information
196 gleaned from the
197 .BR NetHack (6)
198 configuration.  This allows certain changes such as embedding platform-specific
199 documentation into the master documentation files.
200 .P
201 Rules:
202 .RS
203 .IP - 4
204 The default conditional state is printing enabled.
205 .IP - 4
206 Any line
207 .I NOT
208 starting with a caret (^) is either suppressed or passed through unchanged
209 depending on the current conditional state.
210 .IP - 4
211 Any line starting with a caret is a control line; as in C, zero or more spaces
212 may be embedded in the line almost anywhere (except immediately after the
213 caret); however the caret must be in column 1.
214 .IP - 4
215 Conditionals may be nested.
216 .IP - 4
217 .I Makedefs
218 will exit with an error code if any errors are detected; processing will
219 continue (if it can) to allow as many errors as possible to be detected.
220 .IP - 4
221 Unknown identifiers are treated as both TRUE and as an error.  Note that
222 .BR --undef " or " #undef
223 in the
224 .BR NetHack (6)
225 configuration are different from unknown.
226 .RE
227 .P
228 Control lines:
229 .RS
230 .IP ^^ 4
231 a line starting with a (single) literal caret
232 .IP ^#
233 a comment
234 .IP ^?\fIID
235 if the
236 .I ID
237 is defined set the conditional state to TRUE
238 .IP ^!\fIID
239 if the
240 .I ID
241 is not defined set the conditional state to TRUE
242 .IP ^:
243 else; invert the conditional state
244 .IP ^.
245 end the most recent conditional
246 .RE
247 .\".SH EXAMPLES
248 .SH AUTHOR
249 The NetHack Development Team
250 .SH "SEE ALSO"
251 .PP
252 .BR dgn_comp (6)