MAKEDEFS(6)
๐ ๏ธ MAKEDEFS ๐ (section 6, Games Manual)
okay bestie, gather round, because this one is a build-time legend and honestly it's giving backstage-pass energy ๐๏ธโจ
๐ NAME
makedefs โ the NetHack miscellaneous build-time functions, no cap ๐งฐ
โจ SYNOPSIS
makedefs { -o | -d | -e | -m | -v | -p | -q | -r | -h }
makedefs --input file --output file --command
๐ธ DESCRIPTION
makedefs is a build-time tool, and it's literally the behind-the-scenes main character for a whole bunch of NetHack(6) source file creation and modification tasks ๐ซถ
For historical reasons (iykyk ๐ญ), makedefs takes two types of command lines:
- when you invoke it with a short option, the files it operates on are determined when
makedefsis compiled ๐ฆ - when you invoke it with a long option,
--inputand--outputare what specify the files for the--command๐ฏ
and here's the tea: each command is only available in one of the two formats. not both. pick your lane ๐ฆ
๐ SHORT COMMANDS
Upper and lower case are both accepted for the short commands, so go off however you like โจ
-oโ generateonames.h๐-dโ generatedata.base๐-eโ generatedungeon.pdf. the input filedungeon.defgets passed through the same logic as the--grepcommand uses; peep the MDGREP FUNCTIONS section below for the details ๐-mโ generatedate.hand the options file. it will readdat/gitinfo.txt, only if it is present, to obtaingithash=andgitbranch=info and include the related preprocessor#defines in thedate.hfile ๐ฅ-pโ generatepm.h๐-qโ generate the rumors file ๐ฃ๏ธ-sโ generate thebogusmon,engrave, andepitaphfiles ๐ชฆ-1โ generate the epitaph file โญ-2โ generate the engrave file โ๏ธ-3โ generate the bogusmon file ๐พ-hโ generate the oracles file ๐ฎ
๐ LONG COMMANDS
--debugโ show debugging output ๐--make [command]โ execute a short command. the command is given without a preceding dash, mkay ๐ซ--input fileโ specify the input file for the command (if needed). if the file is-, standard input is read ๐ฅ--output fileโ specify the output file for the command (if needed). if the file is-, standard output is written ๐ค--svs [delimiter]โ generate a version string to standard output without a trailing newline. if specified, the delimiter is used between each part of the version string ๐งต--grepโ filter the input file to the output file. see the MDGREP FUNCTIONS section below for info on controlling the filtering operation ๐--grep-showvarsโ show the name and value for each variable known to the grep option ๐--grep-traceโ turn on debug tracing for the grep function (--grepmust be specified as well, don't forget bestie) ๐ต๏ธ--grep-defined symbolโ exit shell true (0) if symbol is known and defined, otherwise exit shell false (1) โ--grep-define symbolโ force the value of symbol to be"defined."symbol must already be known tomakedefs๐--grep-undef symbolโ force the definition of symbol to be"undefined."symbol must already be known tomakedefs๐
๐ฆ MDGREP FUNCTIONS
the --grep command (and certain other commands) filters their input, line by line, according to control lines embedded in the input and on information gleaned from the NetHack(6) configuration ๐ง
this is how you get cute little things like platform-specific documentation embedded into the master documentation files โจ
๐ Rules
- the default conditional state is printing enabled ๐ข
- any line NOT starting with a caret (
^) is either suppressed or passed through unchanged, depending on the current conditional state ๐ - any line starting with a caret is a control line; as in C, zero or more spaces may be embedded in the line almost anywhere (except immediately after the caret); however the caret must be in column 1 ๐
- conditionals may be nested ๐ช
makedefswill exit with an error code if any errors are detected; processing will continue (if it can) to allow as many errors as possible to be detected ๐จ- unknown identifiers are treated as both TRUE and as an error. note that
--undefor#undefin theNetHack(6)configuration are different from unknown โ ๏ธ
๐งพ Control lines
^^โ a line starting with a (single) literal caret ๐ซ^#โ a comment ๐ฌ^?IDโ if the ID is defined, set the conditional state to TRUE โ๏ธ^!IDโ if the ID is not defined, set the conditional state to TRUE ๐^:โ else; invert the conditional state ๐^.โ end the most recent conditional ๐
lowkey important: those unknown-identifier rules are not the same as--undefor#undef, so don't conflate them or you will be confused and sad ๐ญ
๐ AUTHOR
The NetHack Development Team ๐
๐ COPYRIGHT
This file is Copyright (C) Kenneth Lorber, 2024 for version NetHack-5:1.22. NetHack may be freely redistributed. See license for details. ๐
and that's the whole page, bestie!! ๐ one last little sign-off: this one's from the NETHACK corner of the world, dated 26 April 2026, and it lives in section 6 of the Games Manual โ so if you ever need to find it again, that's where she'll be, slaying as always ๐ โจ๐ฆ
๐ฆ where this page comes from
- arch rolling: nethack 5.0.0-2 ยท NGPL
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms