next up previous contents
Next: Porting Turbo Pascal Code Up: Compiler configuration Previous: Using the command-line options

Using the configuration file

  Using the configuration file ppc386.cfg is an alternative to command line options. When a configuration file is found, it is read, and the lines in it are treated like you typed them on the command line. They are treated before the options that you type on the command line.

You can specify comments in the configuration file with the # sign. Everything from the # on will be ignored.

The compiler looks for the ppc386.cfg file in the following places :

  1. The current directory.
  2. Under DOS, the directory where the compiler is. Under LINUX, the compiler looks in the /etc directory
  3. if specified, the directory in the PPC_CONFIG_PATH environment variable.
When the compiler has finished reading the configuration file, it continues to treat the command line options.

One of the command-line options allows you to specify a second configuration file: Specifying @foo on the command line will open file foo, and read further options from there. When the compiler has finished reading this file, it continues to process the command line.

An important feature in the configuration file is that you can specify sections. They behave much like conditional defines. Suppose the following configuration file (named myconf)

-a
#section first
-Up/some_path
#section second
-Up/other_path.
When you invoke the compiler as follows:
  ppc386 -dfirst @myconf foo.pp
then the compiler will read the part of the configuration file coming before the line containing #section second. As a result the unit search path will be set to /some_path. If, on the other hand, you invoke the compiler as
  ppc386 -dsecond @myconf foo.pp
Then the configuration file will be read as if the part between #section first and #section second didn't exist, resulting in a unit search path of /other_path. If you put a #section common on a line, everything that follows this keyword will be read, whatever the defined constants.

In short, the #define keywords act as conditionals.


next up previous contents
Next: Porting Turbo Pascal Code Up: Compiler configuration Previous: Using the command-line options

Michael Van Canneyt
Tue Mar 31 16:44:14 CEST 1998