The dmd.conf rant
Oren Tirosh via Digitalmars-d
digitalmars-d at puremagic.com
Wed Apr 1 01:20:24 PDT 2015
On Wednesday, 1 April 2015 at 02:29:05 UTC, Martin Nowak wrote:
> [...]
>
> ### conclusion
>
> The lookup order for the config file should be changed to the
> following.
> - next to dmd binary (highest precedence so that I can have
> multiple
> installations)
> - per-user conf folder (HOME) (to override the system-wide
> config)
> - system-wide conf folder (to allow package installations
> .deb/.rpm)
>
> The current situation is unmaintainable.
How about a sensible default that makes the configuration file
unnecessary in most cases? This should be similar to the way %@P%
is handled, but relative to the path of the compiler executable
rather than the conf file
The default for unix-like systems could be:
[Environment32]
DFLAGS=-I%@E%/../include/dmd/phobos
-I@%E@/../include/dmd/druntime/import -L-L@%E@/../lib
-L--export-dynamic
[Environment64]
DFLAGS=-I@%E@/../include/dmd/phobos
-I@%E@/../include/dmd/druntime/import -L-L@%E@/../lib64
-L--export-dynamic
This should work for both global configurations (/usr/,
/usr/local/) and private configurations under your work directory
as long as they maintain the same general structure.
It would be nice if the default could some also be made to work
for a side-by-side checkout of the dmd and druntime repositories
with a strategically-placed symlink or some other minimal change.
Using dmd.conf should be reserved for exceptions, not the rule.
More information about the Digitalmars-d
mailing list