table of contents
other versions
- jessie 2.6.4+dfsg-4
fpc.cfg(5) | FPC configuration file | fpc.cfg(5) |
NAME¶
fpc.cfg - Free Pascal Compiler (FPC) configuration file, name derived from Free Pascal Compiler.DESCRIPTION¶
This is the main configuration file of the Free Pascal Compiler (FPC) All commandline options of the compiler (described in fpc(1) ) can be specified in fpc.cfg When the configuration file is found, it is read, and the lines it contains are treated like you typed them on the command line see fpc(1) with some extra condtional possibilities.SYNTAX¶
You can specify comments in the configuration file with the # sign. Everything from the # on will be ignored, unless it is one of the keywords (see below). The compiler looks for the fpc.cfg file in the following places : - Under Linux and unix- #IFDEF
- Syntax
- #IFDEF name Lines following #IFDEF are skipped read if the keyword "name" following it is not defined. They are read until the keywords #ELSE or #ENDIF are encountered, after which normal processing is resumed.
- Example
- #IFDEF VER0_99_12
- #IFNDEF
- Syntax
- #IFNDEF name Lines following #IFDEF are skipped read if the keyword "name" following it is defined. They are read until the keywords #ELSE or #ENDIF are encountered, after which normal processing is resumed.
- Example
- #IFNDEF VER0_99_12
- #ELSE
- Syntax
- #ELSE #ELSE can be specified after a #IFDEF or #IFNDEF directive as an alternative. Lines following #ELSE are skipped read if the preceding #IFDEF #IFNDEF was accepted. They are skipped until the keyword #ENDIF is encountered, after which normal processing is resumed.
- Example
-
#IFDEF VER0_99_12
- #ENDIF
- Syntax
- #ENDIF
- #DEFINE
- Syntax
- #DEFINE name
- #UNDEF
- Syntax
- #UNDEF name #UNDEF un-defines a keyword if it existed. This has the same effect as a "-uname" command-line option.
- #WRITE
- Syntax
- #WRITE Message Text #WRITE writes "Message Text" to the screen. This can be useful to display warnings if certain options are set.
- Example
- #IFDEF DEBUG
- #INCLUDE
- Syntax
- #INCLUDE filename #INCLUDE instructs the compiler to read the contents of "filename" before continuing to process options in the current file. This can be useful if you want to have a particular configuration file for a project (or, under Unix like systems (such as Linux), in your home directory), but still want to have the global options that are set in a global configuration file.
- Example
- #IFDEF LINUX
#INCLUDE /etc/fpc.cfg
#IFDEF GO32V2
#INCLUDE c:\pp\bin\fpc.cfg
#ENDIF
- #SECTION
- Syntax
- #SECTION name The #SECTION directive acts as a #IFDEF directive, only it doesn't require an #ENDIF directive. the special name COMMON always exists, i.e. lines following #SECTION COMMON are always read.
Example¶
A standard block often used in (the Linux version of) fpc.cfg is -vwhin#IFDEF FPC_LINK_STATIC
-Fu/usr/lib/fpc/0.99.12/rtl/static
-Fu/usr/lib/fpc/0.99.12/units/static
#ENDIF
#IFDEF FPC_LINK_DYNAMIC
-Fu/usr/lib/fpc/0.99.12/rtl/shared
-Fu/usr/lib/fpc/0.99.12/units/shared
#ENDIF
-Fu/usr/lib/fpc/0.99.12/rtl
-Fu/usr/lib/fpc/0.99.12/units
SEE ALSO¶
fpc(1)22 february 2002 | FPC |