Building from source for ubuntu

Jonathan M Davis jmdavisProg at gmx.com
Wed Jul 10 14:31:59 PDT 2013


On Wednesday, July 10, 2013 13:19:33 H. S. Teoh wrote:
> How do you coax different versions of dmd to pick up a different
> dmd.conf file? The last time I tried it, all of them insisted on reading
> /etc/dmd.conf, which, of course, only actually works for one.

To quote the website (http://dlang.org/dmd-linux.html):

-------
dmd will look for the ini­tial­iza­tion file dmd.conf in the fol­low­ing se­
quence of di­rec­to­ries:

1. cur­rent work­ing di­rec­tory
2. di­rec­tory spec­i­fied by the HOME en­vi­ron­ment vari­able
3. di­rec­tory dmd re­sides in
4. /etc/
-------

So, if you put dmd.conf in the same directory with the dmd binary, then it'll 
be specific that particular version.

The bigger problem is your path. If you have multiple versions of dmd in your 
path, the first will always win. If you want to be able to switch between dmd 
binaries, you end either having to explicitly give the path to dmd or having 
to set up some way to switch the version of dmd which is currently in your 
path (probably by having it be a symlink which you change).

- Jonathan M Davis


More information about the Digitalmars-d-learn mailing list