www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/04/18/05:19:35

Date: Thu, 18 Apr 1996 12:06:31 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: "Dale P. Smith" <dpsm AT en DOT com>
Cc: djgpp AT delorie DOT com
Subject: Re: Format of DJGPP.ENV
In-Reply-To: <31755b57.31496192@news.en.com>
Message-Id: <Pine.SUN.3.91.960418115918.10058F-100000@is>
Mime-Version: 1.0

On Wed, 17 Apr 1996, Dale P. Smith wrote:

> As far as I can tell, there is no documentation on the DJGPP.ENV file.
> 
> It obviously sets environment variables, but what about all those "+",
> "%:/>" and "%/>" things?

The following description is from an old v1.x readme file.  I guess it 
should be put into the libc docs, in the node that describes 
`__crt0_load_environment_file', since there seems to be no other suitable 
place.
----------------------------------------------------------------------
If you set the DJGPP environment variable to point to a file, that
file will be used to load the environment.  There is a djgpp.env file
distributed with djgpp that provides most of the values you need.  The
format of the file is like this:

VAR=value
VAR=value
[program]
VAR=value
[prog2]
VAR=value

Note that all whitespace is preserved, so be careful about trailing
spaces and spaces around the `='.  Variables in the first section
(before any [program] lines) apply to all programs.  Variables in
program-specific sections are loaded only when running that program.
For example, a [gcc] section would have variables that gcc.exe needs.
Values may refer to other variables using the DOS convention, like
%DJGPP%.  In addition, the first characters after the `%' can be used
to process the value before using it.  These syntaxes are allowed:

    %variable%     Take the value as is
    %:variable%    Take the directory portion only
    %;variable%    Append with a semicolon if variable is defined
    %/variable%    Replace all `\' with `/'
    %\variable%    Replace all `/' with `\'
    %<variable%    Convert to upper case
    %>variable%    Convert to lower case

You may list multiple characters after the %, but they must be before
the variable name, like %:/>DJGPP%.  Variable names are case
sensitive.  The DOS environment variable names are usually upper case.
Variables set through this file override any set in the DOS
environment, unless the first character of the variable name is `+',
in which case the DOS environment overrides the file (the `+' is
removed from the name), as in `+USER=dosuser'.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019