`
glinuz
  • 浏览: 17938 次
最近访客 更多访客>>
社区版块
存档分类
最新评论

dmd.conf

    博客分类:
  • D
阅读更多
my dmd.conf content:
[Environment]
LIB="%@p%/../lib"
INCLUDE="%@P%/../inlcude;%INCLUDE%"
DFLAGS=-I%@P%/../src/phobos -L-L%@P%/../lib


转载:http://www.digitalmars.com/d/archives/13197.html

There are documets on where the different files of an application should be put
in a Linux or Unix system. (Sorry, right now I can't give a pointer. Anybody?)
You might also check the Vim editor sources (www.vim.org), Vim does a good job
of "knowing where it is", among other things.

The volume where the compiler binaries reside might be remotely mounted as
read-only, especially in a corporate setup. Also, it is easier for the sysadmin
to have all system-wide configurations in the same place, i.e. /etc.

Individual users can then override these configurations, e.g. with a $HOME/.dmd
file (or even directory, if the configuration is elaborate -- which probably is
not needed fof dmd.)

One way to resolve the issue is to have the binary look for the config file in
/etc and read it, then to update the parameters reading from the first config
file found in

1. defined on the command line
2. pointed to by the environment variable $DMD_CONFIG, if it is defined
3. current directory (.)
4. home directory ($HOME)

If the user installing DMD is root then this is what sould be set up. On the
other hand, if the installing user is non-root (the user himself), then the
installation should copy a default .dmd file to his home directory. In this case
the .dmd file could contain the path to dmd-home, since the user might have
installed the package in any of various places. (It's not even uncommon to
install in /tmp, for example for temporary needs or to just check something.)

In any case, you probably have to spew a man-file to the man directory, the
libraries to /usr/lib, the binary to /usr/bin, and the config file to /etc, at
the very least.

Sure, it is possible to have the whole DMD-tree in one place. This is OK for a
personal install. But when root installs DMD, then every user should be able to
use DMD, and then a single-hierarchy-install would confuse normal Unix and Linux
people.
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics