mirror of
https://github.com/dlang/dmd.git
synced 2025-04-29 14:40:12 +03:00

Similarly to Make files, the syntax `VAR ?= value` is added to define variables only when they were previously undefined. In this case, if the environment variable `VAR` was undefined, then it will be defined with the value `value`, otherwise the previous content of `VAR` will be preserved. This is useful to define default flags in the config file that can be easily overridden by using environment variables.
49 lines
1.2 KiB
Groff
49 lines
1.2 KiB
Groff
.TH DMD.CONF 5 "2006-03-12" "Digital Mars" "Digital Mars D"
|
|
.SH NAME
|
|
dmd.conf \- configuration file for
|
|
\BR dmd (1)
|
|
|
|
.SH SYNOPSIS
|
|
.I /etc/dmd.conf
|
|
|
|
.SH DESCRIPTION
|
|
dmd will look for the initialization file
|
|
.I dmd.conf
|
|
in the directory \fI/etc\fR. If found, environment variable
|
|
settings in the file will override any existing settings.
|
|
.PP
|
|
|
|
This is handy to make dmd independent of programs with
|
|
conflicting use of environment variables.
|
|
|
|
.SH SYNTAX
|
|
Environment variables follow the [Environment] section heading, in
|
|
name=value or name?=value pairs. Comments are lines that start with ;.
|
|
Variable names are always converted to uppercase, so if you use
|
|
name=value, actually the variable with name NAME will be written. If
|
|
the name?=value syntax is used, the variable with NAME will only be
|
|
written if it was defined before (in that case the original value is
|
|
preserved).
|
|
.PP
|
|
|
|
.SH EXAMPLE
|
|
.PD 0.5
|
|
; dmd.conf file for dmd
|
|
.LP
|
|
; Names enclosed by %% are searched for in the existing environment
|
|
.LP
|
|
; and inserted. The special name %@P% is replaced with the path
|
|
.LP
|
|
; to this file.
|
|
.LP
|
|
[Environment]
|
|
.LP
|
|
DFLAGS="-I%@P%/../src/phobos"
|
|
.PD
|
|
|
|
.SH FILES
|
|
.I /etc/dmd.conf
|
|
|
|
.SH "SEE ALSO"
|
|
.BR dmd (1)
|
|
.BR rdmd (1)
|