~ubuntu-branches/debian/lenny/fpc/lenny

« back to all changes in this revision

Viewing changes to man/man5/fpc.cfg.5

  • Committer: Bazaar Package Importer
  • Author(s): Mazen Neifer, Torsten Werner, Mazen Neifer
  • Date: 2008-05-17 17:12:11 UTC
  • mfrom: (3.1.9 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080517171211-9qi33xhd9evfa0kg
Tags: 2.2.0-dfsg1-9
[ Torsten Werner ]
* Add Mazen Neifer to Uploaders field.

[ Mazen Neifer ]
* Moved FPC sources into a version dependent directory from /usr/share/fpcsrc
  to /usr/share/fpcsrc/${FPCVERSION}. This allow installing more than on FPC
  release.
* Fixed far call issue in compiler preventing building huge binearies.
  (closes: #477743)
* Updated building dependencies, recomennded and suggested packages.
* Moved fppkg to fp-utils as it is just a helper tool and is not required by
  compiler.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
.TH fpc.cfg 5 "22 february 2002" FPC "FPC configuration file"
2
 
.SH NAME
3
 
fpc.cfg \- Free Pascal Compiler (FPC) configuration file, name derived from Free Pascal Compiler.
4
 
 
5
 
.SH DESCRIPTION
6
 
This is the main configuration file of the
7
 
.I Free Pascal Compiler (FPC)
8
 
.PP
9
 
All commandline options of the compiler (described in
10
 
.BR fpc (1)
11
 
) can be specified in fpc.cfg
12
 
 
13
 
When the configuration file is found, it is read, and the lines
14
 
it contains are treated like you typed them on the command line see
15
 
.BR fpc (1)
16
 
with some extra condtional possibilities.
17
 
 
18
 
.SH SYNTAX
19
 
 
20
 
You can specify comments in the configuration file with the # sign.
21
 
Everything from the # on will be ignored, unless it is one of the keywords (see below).
22
 
 
23
 
The compiler looks for the fpc.cfg file in the following places :
24
 
.PP
25
 
\       \fI\- Under Linux and unix\fP
26
 
.br
27
 
\       \       \- The current directory.
28
 
.br
29
 
\       \       \- Home directory, looks for .fpc.cfg
30
 
.br
31
 
\       \       \- The directory specified in the environment
32
 
.br
33
 
\       \            variable PPC\_CONFIG\_PATH, and if it's not
34
 
.br
35
 
\       \            set under /etc.
36
 
.PP
37
 
\       \fI- Under all other OSes:\fP
38
 
.br
39
 
\       \       \- The current directory.
40
 
.br
41
 
\       \       \- The directory specified in the environment
42
 
.br
43
 
\       \            variable  PPC\_CONFIG\_PATH.
44
 
.br
45
 
\       \       \- The directory where the compiler binary is.
46
 
.br
47
 
 
48
 
.PP
49
 
When the compiler has finished reading the configuration file, it continues
50
 
to treat the command line options.
51
 
 
52
 
One of the command\-line options allows you to specify a second configuration
53
 
file: Specifying \@foo on the command line will use file foo instead of fpc.cfg
54
 
and read further options from there. When the compiler has finished reading
55
 
this file, it continues to process the command line.
56
 
 
57
 
The configuration file allows some kind of preprocessing. It understands the
58
 
following directives, which you should place on the first column of a line :
59
 
.PP
60
 
 
61
 
\       #IFDEF
62
 
.br
63
 
\       #IFNDEF
64
 
.br
65
 
\       #ELSE
66
 
.br
67
 
\       #ENDIF
68
 
.br
69
 
\       #DEFINE
70
 
.br
71
 
\       #UNDEF
72
 
.br
73
 
\       #WRITE
74
 
.br
75
 
\       #INCLUDE
76
 
.br
77
 
\       #SECTION
78
 
.br
79
 
They work the same way as their $...  directive counterparts in Pascal: 
80
 
 
81
 
.IP \fI#IFDEF\fP
82
 
.RS
83
 
.IP \fISyntax\fP
84
 
#IFDEF name
85
 
 
86
 
Lines following #IFDEF are skipped read if the keyword "name"
87
 
following it is not defined.
88
 
 
89
 
They are read until the keywords #ELSE or #ENDIF are
90
 
encountered, after which normal processing is resumed.
91
 
 
92
 
.IP \fIExample\fP
93
 
#IFDEF VER0_99_12
94
 
.br
95
 
\-Fu/usr/lib/fpc/0.99.12/rtl
96
 
.br
97
 
#ENDIF
98
 
.br
99
 
.PP
100
 
In the above example, /usr/lib/fpc/0.99.12/rtl will be added to
101
 
the path if you're compiling with version 0.99.12 of the compiler.
102
 
.RE
103
 
 
104
 
.IP \fI#IFNDEF\fP
105
 
.RS
106
 
.IP \fISyntax\fP
107
 
#IFNDEF name
108
 
 
109
 
Lines following #IFDEF are skipped read if the keyword "name"
110
 
following it is defined.
111
 
 
112
 
They are read until the keywords #ELSE or #ENDIF are
113
 
encountered, after which normal processing is resumed.
114
 
 
115
 
.IP \fIExample\fP
116
 
#IFNDEF VER0_99_12
117
 
.br
118
 
-Fu/usr/lib/fpc/0.99.13/rtl
119
 
.br
120
 
#ENDIF
121
 
.PP
122
 
In the above example, /usr/lib/fpc/0.99.13/rtl will be added to
123
 
the path if you're NOT compiling with version 0.99.12 of the compiler.
124
 
.RE
125
 
.IP \fI#ELSE\fP
126
 
.RS
127
 
.IP \fISyntax\fP
128
 
#ELSE
129
 
 
130
 
#ELSE can be specified after a #IFDEF or #IFNDEF
131
 
directive as an alternative.
132
 
Lines following #ELSE are skipped read if the preceding #IFDEF
133
 
#IFNDEF was accepted.
134
 
 
135
 
They are skipped until the keyword #ENDIF is
136
 
encountered, after which normal processing is resumed.
137
 
 
138
 
.IP \fIExample\fP
139
 
 
140
 
#IFDEF VER0_99_12
141
 
.br
142
 
-Fu/usr/lib/fpc/0.99.12/rtl
143
 
.br
144
 
#ELSE
145
 
.br
146
 
-Fu/usr/lib/fpc/0.99.13/rtl
147
 
.br
148
 
#ENDIF
149
 
.br
150
 
.PP
151
 
In the above example, /usr/lib/fpc/0.99.12/rtl will be added to
152
 
the path if you're compiling with version 0.99.12 of the compiler,
153
 
otherwise /usr/lib/fpc/0.99.13/rtl will be added to the path.
154
 
.RE
155
 
.IP \fI#ENDIF\fP
156
 
.RS
157
 
.IP \fISyntax\fP
158
 
#ENDIF
159
 
.PP
160
 
#ENDIF marks the end of a block that started with #IF(N)DEF,
161
 
possibly with an #ELSE between it.
162
 
.RE
163
 
 
164
 
.IP \fI#DEFINE\fP
165
 
.RS
166
 
.IP \fISyntax\fP
167
 
#DEFINE name
168
 
.PP
169
 
#DEFINE defines a new keyword. This has the same effect as a
170
 
"\-dname"  command\-line option.
171
 
.RE
172
 
 
173
 
.IP \fI#UNDEF\fP
174
 
.RS
175
 
.IP \fISyntax\fP
176
 
#UNDEF name
177
 
 
178
 
#UNDEF un-defines a keyword if it existed.
179
 
This has the same effect as a "-uname" command-line option.
180
 
.RE
181
 
 
182
 
.IP \fI#WRITE\fP
183
 
.RS
184
 
.IP \fISyntax\fP
185
 
#WRITE Message Text
186
 
 
187
 
#WRITE writes "Message Text" to the screen.
188
 
This can be useful to display warnings if certain options are set.
189
 
 
190
 
.IP \fIExample\fP
191
 
#IFDEF DEBUG
192
 
.br
193
 
#WRITE Setting debugging ON...
194
 
.br
195
 
-g
196
 
.br
197
 
#ENDIF
198
 
.br
199
 
 
200
 
.PP
201
 
if "DEBUG is defined, this will produce a line
202
 
 
203
 
Setting debugging ON...
204
 
 
205
 
and will then switch on debugging information in the compiler.
206
 
.RE
207
 
 
208
 
.IP \fI#INCLUDE\fP
209
 
.RS
210
 
.IP \fISyntax\fP
211
 
#INCLUDE filename
212
 
 
213
 
#INCLUDE instructs the compiler to read the contents of
214
 
"filename" before continuing to process options in the current file.
215
 
 
216
 
This can be useful if you want to have a particular configuration file
217
 
for a project (or, under Unix like systems (such as Linux), in 
218
 
your home directory), but  still want to have the global options that are 
219
 
set in a global configuration file.
220
 
 
221
 
.IP \fIExample\fP
222
 
#IFDEF LINUX
223
 
.br
224
 
  #INCLUDE /etc/fpc.cfg
225
 
.br
226
 
#ELSE
227
 
.br
228
 
  #IFDEF GO32V2
229
 
.br
230
 
    #INCLUDE c:\\pp\\bin\\fpc.cfg
231
 
.br
232
 
  #ENDIF
233
 
.br
234
 
#ENDIF
235
 
.br
236
 
.PP
237
 
This will include /etc/fpc.cfg if you're on a unix like machine (like linux),
238
 
and will include c:\\pp\\bin\\fpc.cfg on a dos machine.
239
 
.RE
240
 
.IP \fI#SECTION\fP
241
 
.RS
242
 
.IP \fISyntax\fP
243
 
#SECTION name
244
 
 
245
 
The #SECTION directive acts as a #IFDEF directive, only
246
 
it doesn't require an #ENDIF directive. the special name COMMON
247
 
always exists, i.e. lines following #SECTION COMMON are always read.
248
 
.RE
249
 
 
250
 
.SH Example
251
 
 
252
 
A standard block often used in (the Linux version of) fpc.cfg is
253
 
 
254
 
-vwhin
255
 
.br
256
 
#IFDEF VER0_99_12
257
 
.br
258
 
 #IFDEF FPC_LINK_STATIC
259
 
.br
260
 
  \-Fu/usr/lib/fpc/0.99.12/rtl/static
261
 
.br
262
 
  \-Fu/usr/lib/fpc/0.99.12/units/static
263
 
.br
264
 
 #ENDIF
265
 
.br
266
 
 #IFDEF FPC_LINK_DYNAMIC
267
 
.br
268
 
  \-Fu/usr/lib/fpc/0.99.12/rtl/shared
269
 
.br
270
 
  \-Fu/usr/lib/fpc/0.99.12/units/shared
271
 
.br
272
 
 #ENDIF
273
 
.br
274
 
 \-Fu/usr/lib/fpc/0.99.12/rtl
275
 
.br
276
 
 \-Fu/usr/lib/fpc/0.99.12/units
277
 
.br
278
 
#ENDIF
279
 
.PP
280
 
The block is copied into the fpc.cfg file for each version you use (normally
281
 
the latest release  and the lastest developpers
282
 
snapshot.
283
 
 
284
 
.SH SEE ALSO
285
 
.BR  fpc (1)