DMD.CONF(5)

πŸ“¦ version 2.112.1, in alpine 3.24, opensuse-leap 16.0

πŸ’… DMD.CONF(5) β€” the dmd configuration file, bestie edition ✨

okay so real talk, this is the dmd.conf manpage from the Digital Mars D crew, and it's genuinely not that deep β€” but it is lowkey important, so let's get into it 🫢


🌸 NAME 🌸

dmd.conf β€” the configuration file for dmd(1) πŸ’–

✨ SYNOPSIS ✨

/etc/dmd.conf

that's it. that's the whole synopsis. iconic behavior honestly πŸŽ€

πŸ¦‹ DESCRIPTION πŸ¦‹

so dmd goes looking for its initialization file, dmd.conf, in these directories, in this exact order:

  1. the current working directory πŸ“‚
  2. $HOME 🏠
  3. the directory containing the dmd executable 🧚
  4. /etc βš™οΈ

if it finds one, the environment variable settings in that file override any settings that already exist. no cap.

and like… that's actually the point? it's handy for making dmd independent of other programs that are out here with a conflicting use of environment variables 😭 like girl, stop fighting over DFLAGS.

πŸ’€ SYNTAX πŸ’€

environment variables go after the [Environment] section heading, written as name=value or name?=value pairs.

comments are lines that start with ; β€” yes, semicolon. not #. I know. I know. πŸ™ˆ

variable names are always converted to uppercase, so if you write name=value, what actually gets written is the variable with the name NAME. periodt.

and if you use the name?=value syntax, the variable with NAME will only be written if it was defined before β€” and in that case, the original value is preserved πŸ‘‘

so like, = says "move over, I'm the main character now" and ?= says "only if nobody's already claimed this seat, no worries bestie" πŸ’…

πŸ”₯ EXAMPLE πŸ”₯

here's the whole thing verbatim, keep it exactly like this:

; dmd.conf file for dmd
; Names enclosed by %% are searched for in the existing environment
; and inserted. The special name %@P% is replaced with the path
; to this file.
[Environment]
DFLAGS="-I%@P%/../src/phobos"

ate, no crumbs πŸ’œ

πŸ“ FILES πŸ“

  • /etc/dmd.conf

🌈 SEE ALSO 🌈

go read those too, they're the whole friend group fr fr πŸ‘‘


okay that's the page!! πŸ’– huge thanks to Digital Mars for this one, dated 2006-03-12 β€” and yeah, it's the DMD.CONF(5) page, section 5, obvi. now go set your environment variables, you absolute icon πŸŽ€βœ¨

πŸ“¦ where this page comes from