1 MAKEDEFS(6) Games Manual MAKEDEFS(6)
6 makedefs - NetHack miscellaneous build-time functions
9 makedefs { -o | -d | -e | -m | -v | -p | -q | -r | -h }
11 makedefs --input file --output file --command
14 Makedefs is a build-time tool used for a variety of NetHack(6) source
15 file creation and modification tasks. For historical reasons, makedefs
16 takes two types of command lines. When invoked with a short option,
17 the files operated on are determined when makedefs is compiled. When
18 invoked with a long option, the --input and --output options are used
19 to specify the files for the --command. Each command is only available
20 in one of the two formats.
23 Upper and lower case are both accepted for the short commands.
27 -d Generate data.base.
29 -e Generate dungeon.pdf. The input file dungeon.def is passed
30 through the same logic as that used by the --grep command; see
31 the MDGREP FUNCTIONS section below for details.
33 -m Generate date.h and options file. It will read dat/gitinfo.txt,
34 only if it is present, to obtain githash= and gitbranch=
35 info and include related preprocessor #defines in date.h file.
39 -q Generate the rumors file.
41 -s Generate the bogusmon, engrave, and epitaph files.
43 -1 Generate the epitaph file.
45 -2 Generate the engrave file.
47 -3 Generate the bogusmon file.
49 -h Generate the oracles file.
53 Show debugging output.
56 Execute a short command. Command is given without preceding
60 Specify the input file for the command (if needed). If the file
61 is - standard input is read.
64 Specify the output file for the command (if needed). If the
65 file is - standard output is written.
68 Generate a version string to standard output without a trailing
69 newline. If specified, the delimiter is used between each part
70 of the version string.
72 --grep Filter the input file to the output file. See the MDGREP FUNC-
73 TIONS section below for information on controlling the filtering
77 Show the name and value for each variable known to the grep
81 Turn on debug tracing for the grep function ( --grep must be
85 Exit shell true (0) if symbol is known and defined, otherwise
89 Force the value of symbol to be "defined." Symbol must already
93 Force the definition of symbol to be "undefined." Symbol must
94 already be known to makedefs.
97 The --grep command (and certain other commands) filter their input, on
98 a line-by-line basis, according to control lines embedded in the input
99 and on information gleaned from the NetHack(6) configuration. This
100 allows certain changes such as embedding platform-specific documenta-
101 tion into the master documentation files.
105 - The default conditional state is printing enabled.
107 - Any line NOT starting with a caret (^) is either suppressed
108 or passed through unchanged depending on the current condi-
111 - Any line starting with a caret is a control line; as in C,
112 zero or more spaces may be embedded in the line almost any-
113 where (except immediately after the caret); however the
114 caret must be in column 1.
116 - Conditionals may be nested.
118 - Makedefs will exit with an error code if any errors are
119 detected; processing will continue (if it can) to allow as
120 many errors as possible to be detected.
122 - Unknown identifiers are treated as both TRUE and as an
123 error. Note that --undef or #undef in the NetHack(6) con-
124 figuration are different from unknown.
128 ^^ a line starting with a (single) literal caret
133 if the ID is defined set the conditional state to TRUE
136 if the ID is not defined set the conditional state to TRUE
138 ^: else; invert the conditional state
140 ^. end the most recent conditional
143 The NetHack Development Team
146 This file is Copyright (C) Kenneth Lorber, 2024 for version
147 NetHack-3.7:1.22. NetHack may be freely redistributed. See license
152 NETHACK 25 December 2024 MAKEDEFS(6)