ppc386.cfg.5 6.0 KB

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