Merged revisions 1884-1905 via svnmerge from
[scons.git] / src / engine / SCons / Tool / fortran.xml
1 <!--
2 __COPYRIGHT__
3
4 This file is processed by the bin/SConsDoc.py module.
5 See its __doc__ string for a discussion of the format.
6 -->
7 <tool name="fortran">
8 <summary>
9 Set construction variables for generic POSIX Fortran compilers.
10 </summary>
11 <sets>
12 FORTRAN
13 FORTRANFLAGS
14 FORTRANCOM
15 SHFORTRAN
16 SHFORTRANFLAGS
17 SHFORTRANCOM
18 SHFORTRANPPCOM
19 </sets>
20 <uses>
21 FORTRANCOMSTR
22 FORTRANPPCOMSTR
23 SHFORTRANCOMSTR
24 SHFORTRANPPCOMSTR
25 </uses>
26 </tool>
27
28 <cvar name="FORTRAN">
29 <summary>
30 The default Fortran compiler
31 for all versions of Fortran.
32 </summary>
33 </cvar>
34
35 <cvar name="FORTRANCOM">
36 <summary>
37 The command line used to compile a Fortran source file to an object file.
38 By default, any options specified
39 in the &cv-link-FORTRANFLAGS;,
40 &cv-link-CPPFLAGS;,
41 &cv-link-_CPPDEFFLAGS;,
42 &cv-link-_FORTRANMODFLAG;, and
43 &cv-link-_FORTRANINCFLAGS; construction variables
44 are included on this command line.
45 </summary>
46 </cvar>
47
48 <cvar name="FORTRANCOMSTR">
49 <summary>
50 The string displayed when a Fortran source file
51 is compiled to an object file.
52 If this is not set, then &cv-link-FORTRANCOM;
53 (the command line) is displayed.
54 </summary>
55 </cvar>
56
57 <cvar name="FORTRANFLAGS">
58 <summary>
59 General user-specified options that are passed to the Fortran compiler.
60 Note that this variable does
61 <emphasis>not</emphasis>
62 contain
63 <option>-I</option>
64 (or similar) include or module search path options
65 that scons generates automatically from &cv-link-FORTRANPATH;.
66 See
67 &cv-link-_FORTRANINCFLAGS; and &cv-link-_FORTRANMODFLAG;,
68 below,
69 for the variables that expand those options.
70 </summary>
71 </cvar>
72
73 <cvar name="_FORTRANINCFLAGS">
74 <summary>
75 An automatically-generated construction variable
76 containing the Fortran compiler command-line options
77 for specifying directories to be searched for include
78 files and module files.
79 The value of &cv-link-_FORTRANINCFLAGS; is created
80 by prepending/appending &cv-link-INCPREFIX; and &cv-link-INCSUFFIX;
81 to the beginning and end
82 of each directory in &cv-link-FORTRANPATH;.
83 </summary>
84 </cvar>
85
86 <cvar name="FORTRANMODDIR">
87 <summary>
88 Directory location where the Fortran compiler should place
89 any module files it generates.  This variable is empty, by default. Some
90 Fortran compilers will internally append this directory in the search path
91 for module files, as well.
92 </summary>
93 </cvar>
94
95 <cvar name="FORTRANMODDIRPREFIX">
96 <summary>
97 The prefix used to specify a module directory on the Fortran compiler command
98 line.
99 This will be appended to the beginning of the directory
100 in the &cv-link-FORTRANMODDIR; construction variables
101 when the &cv-link-_FORTRANMODFLAG; variables is automatically generated.
102 </summary>
103 </cvar>
104
105 <cvar name="FORTRANMODDIRSUFFIX">
106 <summary>
107 The suffix used to specify a module directory on the Fortran compiler command
108 line.
109 This will be appended to the beginning of the directory
110 in the &cv-link-FORTRANMODDIR; construction variables
111 when the &cv-link-_FORTRANMODFLAG; variables is automatically generated.
112 </summary>
113 </cvar>
114
115 <cvar name="_FORTRANMODFLAG">
116 <summary>
117 An automatically-generated construction variable
118 containing the Fortran compiler command-line option
119 for specifying the directory location where the Fortran
120 compiler should place any module files that happen to get
121 generated during compilation.
122 The value of &cv-link-_FORTRANMODFLAG; is created
123 by prepending/appending &cv-link-FORTRANMODDIRPREFIX; and
124 &cv-link-FORTRANMODDIRSUFFIX;
125 to the beginning and end of the directory in &cv-link-FORTRANMODDIR;.
126 </summary>
127 </cvar>
128
129 <cvar name="FORTRANMODPREFIX">
130 <summary>
131 The module file prefix used by the Fortran compiler.  SCons assumes that
132 the Fortran compiler follows the quasi-standard naming convention for
133 module files of
134 <filename>module_name.mod</filename>.
135 As a result, this variable is left empty, by default.  For situations in
136 which the compiler does not necessarily follow the normal convention,
137 the user may use this variable.  Its value will be appended to every
138 module file name as scons attempts to resolve dependencies.
139 </summary>
140 </cvar>
141
142 <cvar name="FORTRANMODSUFFIX">
143 <summary>
144 The module file suffix used by the Fortran compiler.  SCons assumes that
145 the Fortran compiler follows the quasi-standard naming convention for
146 module files of
147 <filename>module_name.mod</filename>.
148 As a result, this variable is set to ".mod", by default.  For situations
149 in which the compiler does not necessarily follow the normal convention,
150 the user may use this variable.  Its value will be appended to every
151 module file name as scons attempts to resolve dependencies.
152 </summary>
153 </cvar>
154
155 <cvar name="FORTRANPATH">
156 <summary>
157 The list of directories that the Fortran compiler will search for
158 include files and (for some compilers) module files. The Fortran implicit
159 dependency scanner will search these directories for include files (but
160 not module files since they are autogenerated and, as such, may not
161 actually exist at the time the scan takes place). Don't explicitly put
162 include directory arguments in FORTRANFLAGS because the result will be
163 non-portable and the directories will not be searched by the dependency
164 scanner. Note: directory names in FORTRANPATH will be looked-up relative
165 to the SConscript directory when they are used in a command. To force
166 &scons;
167 to look-up a directory relative to the root of the source tree use #:
168
169 <example>
170 env = Environment(FORTRANPATH='#/include')
171 </example>
172
173 The directory look-up can also be forced using the
174 &Dir;()
175 function:
176
177 <example>
178 include = Dir('include')
179 env = Environment(FORTRANPATH=include)
180 </example>
181
182 The directory list will be added to command lines
183 through the automatically-generated
184 &cv-link-_FORTRANINCFLAGS;
185 construction variable,
186 which is constructed by
187 appending the values of the
188 &cv-link-INCPREFIX; and &cv-link-INCSUFFIX;
189 construction variables
190 to the beginning and end
191 of each directory in &cv-link-FORTRANPATH;.
192 Any command lines you define that need
193 the FORTRANPATH directory list should
194 include &cv-link-_FORTRANINCFLAGS;:
195
196 <example>
197 env = Environment(FORTRANCOM="my_compiler $_FORTRANINCFLAGS -c -o $TARGET $SOURCE")
198 </example>
199 </summary>
200 </cvar>
201
202 <cvar name="FORTRANPPCOM">
203 <summary>
204 The command line used to compile a Fortran source file to an object file
205 after first running the file through the C preprocessor.
206 By default, any options specified in the &cv-link-FORTRANFLAGS;,
207 &cv-link-CPPFLAGS;,
208 &cv-link-_CPPDEFFLAGS;,
209 &cv-link-_FORTRANMODFLAG;, and
210 &cv-link-_FORTRANINCFLAGS;
211 construction variables are included on this command line.
212 </summary>
213 </cvar>
214
215 <cvar name="FORTRANPPCOMSTR">
216 <summary>
217 The string displayed when a Fortran source file
218 is compiled to an object file
219 after first running the file throught the C preprocessor.
220 If this is not set, then &cv-link-FORTRANPPCOM;
221 (the command line) is displayed.
222 </summary>
223 </cvar>
224
225 <cvar name="FORTRANSUFFIXES">
226 <summary>
227 The list of suffixes of files that will be scanned
228 for Fortran implicit dependencies
229 (INCLUDE lines and USE statements).
230 The default list is:
231
232 <example>
233 [".f", ".F", ".for", ".FOR", ".ftn", ".FTN", ".fpp", ".FPP",
234 ".f77", ".F77", ".f90", ".F90", ".f95", ".F95"]
235 </example>
236 </summary>
237 </cvar>
238
239 <cvar name="SHFORTRAN">
240 <summary>
241 The default Fortran compiler used for generating shared-library objects.
242 </summary>
243 </cvar>
244
245 <cvar name="SHFORTRANCOM">
246 <summary>
247 The command line used to compile a Fortran source file
248 to a shared-library object file.
249 </summary>
250 </cvar>
251
252 <cvar name="SHFORTRANCOMSTR">
253 <summary>
254 The string displayed when a Fortran source file
255 is compiled to a shared-library object file.
256 If this is not set, then &cv-link-SHFORTRANCOM;
257 (the command line) is displayed.
258 </summary>
259 </cvar>
260
261 <cvar name="SHFORTRANFLAGS">
262 <summary>
263 Options that are passed to the Fortran compiler
264 to generate shared-library objects.
265 </summary>
266 </cvar>
267
268 <cvar name="SHFORTRANPPCOM">
269 <summary>
270 The command line used to compile a Fortran source file to a
271 shared-library object file
272 after first running the file through the C preprocessor.
273 Any options specified
274 in the &cv-link-SHFORTRANFLAGS; and
275 &cv-link-CPPFLAGS; construction variables
276 are included on this command line.
277 </summary>
278 </cvar>
279
280 <cvar name="SHFORTRANPPCOMSTR">
281 <summary>
282 The string displayed when a Fortran source file
283 is compiled to a shared-library object file
284 after first running the file throught the C preprocessor.
285 If this is not set, then &cv-link-SHFORTRANPPCOM;
286 (the command line) is displayed.
287 </summary>
288 </cvar>