Add end-of-game dumplogs
[aNetHack.git] / doc / makedefs.txt
blob8c2edb3c8d6449334fa6247f7d8c1055ed52ab41
1 MAKEDEFS(6)                                                        MAKEDEFS(6)
5 NAME
6        makedefs - NetHack miscellaneous build-time functions
8 SYNOPSIS
9        makedefs { -o | -d | -e | -m | -v | -p | -q | -r | -h | -z }
11        makedefs --input file --output file --command
13 DESCRIPTION
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.
22 SHORT COMMANDS
23        Upper and lower case are both accepted for the short commands.
25        -o     Generate onames.h.
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 monster.c.
35        -v     Generate date.h and options file.
37        -p     Generate pm.h
39        -q     Generate quest.dat.
41        -r     Generate the rumors file.
43        -h     Generate the oracles file.
45        -z     Generate vis_tab.c and vis_tab.h.
47 LONG COMMANDS
48        --input file
49               Specify the input file for the command (if needed).  If the file
50               is - standard input is read.
52        --output file
53               Specify the output file for the command  (if  needed).   If  the
54               file is - standard output is written.
56        --svs [delimiter]
57               Generate  a version string to standard output without a trailing
58               newline.  If specified, the delimiter is used between each  part
59               of the version string.
61        --grep Filter  the input file to the output file.  See the MDGREP FUNC
62               TIONS section below for information on controlling the filtering
63               operation.
65        --grep-showvars
66               Show  the  name  and  value  for each variable known to the grep
67               option.
69        --grep-trace
70               Turn on debug tracing for the grep function  (  --grep  must  be
71               specified as well).
73        --grep-define symbol
74               Force  the value of symbol to be "defined."  Symbol must already
75               be known to makedefs.
77        --grep-undef symbol
78               Force the definition of symbol to be "undefined."   Symbol  must
79               already be known to makedefs.
81 MDGREP FUNCTIONS
82        The  --grep command (and certain other commands) filter their input, on
83        a line-by-line basis, according to control lines embedded in the  input
84        and  on  information  gleaned  from the NetHack(6) configuration.  This
85        allows certain changes such as embedding  platform-specific  documenta
86        tion into the master documentation files.
88        Rules:
90               -   The default conditional state is printing enabled.
92               -   Any  line NOT starting with a caret (^) is either suppressed
93                   or passed through unchanged depending on the current  condi
94                   tional state.
96               -   Any  line  starting with a caret is a control line; as in C,
97                   zero or more spaces may be embedded in the line almost  any
98                   where  (except  immediately  after  the  caret); however the
99                   caret must be in column 1.
101               -   Conditionals may be nested.
103               -   Makedefs will exit with an error  code  if  any  errors  are
104                   detected;  processing  will continue (if it can) to allow as
105                   many errors as possible to be detected.
107               -   Unknown identifiers are treated  as  both  TRUE  and  as  an
108                   error.   Note  that --undef or #undef in the NetHack(6) con
109                   figuration are different from unknown.
111        Control lines:
113               ^^  a line starting with a (single) literal caret
115               ^#  a comment
117               ^?ID
118                   if the ID is defined set the conditional state to TRUE
120               ^!ID
121                   if the ID is not defined set the conditional state to TRUE
123               ^:  else; invert the conditional state
125               ^.  end the most recent conditional
127 AUTHOR
128        The NetHack Development Team
130 SEE ALSO
131        dgn_comp(6)
135 4th Berkeley Distribution         29 Apr 2010                      MAKEDEFS(6)