home *** CD-ROM | disk | FTP | other *** search
/ PC Extra Super CD 1998 January / PCPLUS131.iso / DJGPP / V2 / DJLSR201.ZIP / src / docs / kb / djgppenv.txi next >
Encoding:
Text File  |  1996-04-27  |  1.7 KB  |  48 lines

  1. @node DJGPP.ENV, , , Hidden Features
  2. @section DJGPP.ENV
  3.  
  4. @cindex DJGPP.ENV
  5. @cindex Environment Variables
  6.  
  7. If you set the DJGPP environment variable to point to a file, that
  8. file will be used to load the environment.  There is a djgpp.env file
  9. distributed with djgpp that provides most of the values you need.  The
  10. format of the file is like this:
  11.  
  12. @example
  13. VAR=value
  14. VAR=value
  15. [program]
  16. VAR=value
  17. [prog2]
  18. VAR=value
  19. @end example
  20.  
  21. Note that all whitespace is preserved, so be careful about trailing
  22. spaces and spaces around the `='.  Variables in the first section
  23. (before any [program] lines) apply to all programs.  Variables in
  24. program-specific sections are loaded only when running that program.
  25. For example, a [gcc] section would have variables that gcc.exe needs.
  26. Values may refer to other variables using the DOS convention, like
  27. %DJGPP%.  In addition, the first characters after the `%' can be used
  28. to process the value before using it.  These syntaxes are allowed:
  29.  
  30. @example
  31. %variable%     Take the value as is
  32. %:variable%    Take the directory portion only
  33. %;variable%    Append with a semicolon if variable is defined
  34. %/variable%    Replace all `\' with `/'
  35. %\variable%    Replace all `/' with `\'
  36. %<variable%    Convert to upper case
  37. %>variable%    Convert to lower case
  38. @end example
  39.  
  40. You may list multiple characters after the %, but they must be before
  41. the variable name, like %:/>DJGPP%.  Variable names are case
  42. sensitive.  The DOS environment variable names are usually upper case.
  43. Variables set through this file override any set in the DOS
  44. environment, unless the first character of the variable name is `+',
  45. in which case the DOS environment overrides the file (the `+' is
  46. removed from the name), as in `+USER=dosuser'.
  47.  
  48.