[Issue 1660] DFLAGS environment variables is not working

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Jun 23 09:16:18 PDT 2008


http://d.puremagic.com/issues/show_bug.cgi?id=1660


baryluk at smp.if.uj.edu.pl changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|INVALID                     |




------- Comment #4 from baryluk at smp.if.uj.edu.pl  2008-06-23 11:16 -------
Most tools behaves in this way, gcc, make. IMHO environment variables should
have higher priority than /etc/dmd.conf. Practicly always we have configured
/etc/dmd.conf so is env. variable have smaller priority and it will be never
used.

Proposed order:
  1. DMD=`which dmd`; `dirname $DMD`/dmd.conf   - compiler settings
  2. /etc/dmd.conf                              - system settings
  3. $HOME/dmd.conf                             - user settings
  4. `pwd`/dmd.conf                             - project settings
  5. DFLAGS env variable                        - overrding them
  6. command line                               - from make/rebuild/manual
compilation

as oposed to current:
  1. DFLAGS env variable
  2. `pwd`/dmd.conf
  3. $HOME/dmd.conf
  4. DMD=`which dmd`; `dirname $DMD`/dmd.conf
  5. /etc/dmd.conf
  6. command line

which is very strange to me.

I want for example create wrapper dmd-tango:

#!/bin/sh
export DFLAGS="override /etc/dmd.conf which have conf for dmd-phobos"
exec /usr/bin/dmd $*

Currently there is no easy way to do this.


I don't exactly understand phrase "This is handy to make dmd independent of
programs with conflicting use of environment variables." from
http://www.digitalmars.com/d/2.0/dmd-linux.html#dmd_conf

We are using only DFLAGS and CC, what programs will/can conflict with them?


-- 



More information about the Digitalmars-d-bugs mailing list