make rank() static again
[NetHack.git] / doc / makedefs.txt
blobe784946c3fa834401c8e8c43c3a433010d387e73
1 MAKEDEFS(6)                      Games Manual                      MAKEDEFS(6)
5 NAME
6        makedefs - NetHack miscellaneous build-time functions
8 SYNOPSIS
9        makedefs { -o | -d | -e | -m | -v | -p | -q | -r | -h }
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  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.
37        -p     Generate pm.h
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.
51 LONG COMMANDS
52        --debug
53               Show debugging output.
55        --make [command]
56               Execute a short command.  Command  is  given  without  preceding
57               dash.
59        --input file
60               Specify the input file for the command (if needed).  If the file
61               is - standard input is read.
63        --output file
64               Specify the output file for the command  (if  needed).   If  the
65               file is - standard output is written.
67        --svs [delimiter]
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
74               operation.
76        --grep-showvars
77               Show  the  name  and  value  for each variable known to the grep
78               option.
80        --grep-trace
81               Turn on debug tracing for the grep function  (  --grep  must  be
82               specified as well).
84        --grep-defined symbol
85               Exit  shell  true  (0) if symbol is known and defined, otherwise
86               exit shell false (1).
88        --grep-define symbol
89               Force the value of symbol to be "defined."  Symbol must  already
90               be known to makedefs.
92        --grep-undef symbol
93               Force  the  definition of symbol to be "undefined."  Symbol must
94               already be known to makedefs.
96 MDGREP FUNCTIONS
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.
103        Rules:
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-
109                   tional state.
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.
126        Control lines:
128               ^^  a line starting with a (single) literal caret
130               ^#  a comment
132               ^?ID
133                   if the ID is defined set the conditional state to TRUE
135               ^!ID
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
142 AUTHOR
143        The NetHack Development Team
145 COPYRIGHT
146        This   file   is   Copyright  (C)  Kenneth  Lorber,  2024  for  version
147        NetHack-3.7:1.22.  NetHack may be freely  redistributed.   See  license
148        for details.
152 NETHACK                        25 December 2024                    MAKEDEFS(6)