summaryrefslogtreecommitdiff
path: root/src/engine/SCons/Tool/fortran.xml
blob: 3907ce29222491944461f2dd4007aedf1e85727f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2001 - 2017 The SCons Foundation

This file is processed by the bin/SConsDoc.py module.
See its __doc__ string for a discussion of the format.
-->

<!DOCTYPE sconsdoc [
<!ENTITY % scons SYSTEM '../../../../doc/scons.mod'>
%scons;
<!ENTITY % builders-mod SYSTEM '../../../../doc/generated/builders.mod'>
%builders-mod;
<!ENTITY % functions-mod SYSTEM '../../../../doc/generated/functions.mod'>
%functions-mod;
<!ENTITY % tools-mod SYSTEM '../../../../doc/generated/tools.mod'>
%tools-mod;
<!ENTITY % variables-mod SYSTEM '../../../../doc/generated/variables.mod'>
%variables-mod;
]>

<sconsdoc xmlns="http://www.scons.org/dbxsd/v1.0"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://www.scons.org/dbxsd/v1.0 http://www.scons.org/dbxsd/v1.0/scons.xsd">

<tool name="fortran">
<summary>
<para>
Set construction variables for generic POSIX Fortran compilers.
</para>
</summary>
<sets>
<item>FORTRAN</item>
<item>FORTRANFLAGS</item>
<item>FORTRANCOM</item>
<item>SHFORTRAN</item>
<item>SHFORTRANFLAGS</item>
<item>SHFORTRANCOM</item>
<item>SHFORTRANPPCOM</item>
</sets>
<uses>
<item>FORTRANCOMSTR</item>
<item>FORTRANPPCOMSTR</item>
<item>SHFORTRANCOMSTR</item>
<item>SHFORTRANPPCOMSTR</item>
</uses>
</tool>

<cvar name="FORTRAN">
<summary>
<para>
The default Fortran compiler
for all versions of Fortran.
</para>
</summary>
</cvar>

<cvar name="FORTRANCOM">
<summary>
<para>
The command line used to compile a Fortran source file to an object file.
By default, any options specified
in the &cv-link-FORTRANFLAGS;,
&cv-link-CPPFLAGS;,
&cv-link-_CPPDEFFLAGS;,
&cv-link-_FORTRANMODFLAG;, and
&cv-link-_FORTRANINCFLAGS; construction variables
are included on this command line.
</para>
</summary>
</cvar>

<cvar name="FORTRANCOMSTR">
<summary>
<para>
The string displayed when a Fortran source file
is compiled to an object file.
If this is not set, then &cv-link-FORTRANCOM;
(the command line) is displayed.
</para>
</summary>
</cvar>

<cvar name="FORTRANFILESUFFIXES">
<summary>
<para>
The list of file extensions for which the FORTRAN dialect will be used. By
default, this is ['.f', '.for', '.ftn']
</para>
</summary>
</cvar>

<cvar name="FORTRANPPFILESUFFIXES">
<summary>
<para>
The list of file extensions for which the compilation + preprocessor pass for
FORTRAN dialect will be used. By default, this is ['.fpp', '.FPP']
</para>
</summary>
</cvar>

<cvar name="FORTRANFLAGS">
<summary>
<para>
General user-specified options that are passed to the Fortran compiler.
Note that this variable does
<emphasis>not</emphasis>
contain
<option>-I</option>
(or similar) include or module search path options
that scons generates automatically from &cv-link-FORTRANPATH;.
See
&cv-link-_FORTRANINCFLAGS; and &cv-link-_FORTRANMODFLAG;,
below,
for the variables that expand those options.
</para>
</summary>
</cvar>

<cvar name="_FORTRANINCFLAGS">
<summary>
<para>
An automatically-generated construction variable
containing the Fortran compiler command-line options
for specifying directories to be searched for include
files and module files.
The value of &cv-link-_FORTRANINCFLAGS; is created
by prepending/appending &cv-link-INCPREFIX; and &cv-link-INCSUFFIX;
to the beginning and end
of each directory in &cv-link-FORTRANPATH;.
</para>
</summary>
</cvar>

<cvar name="FORTRANMODDIR">
<summary>
<para>
Directory location where the Fortran compiler should place
any module files it generates.  This variable is empty, by default. Some
Fortran compilers will internally append this directory in the search path
for module files, as well.
</para>
</summary>
</cvar>

<cvar name="FORTRANMODDIRPREFIX">
<summary>
<para>
The prefix used to specify a module directory on the Fortran compiler command
line.
This will be appended to the beginning of the directory
in the &cv-link-FORTRANMODDIR; construction variables
when the &cv-link-_FORTRANMODFLAG; variables is automatically generated.
</para>
</summary>
</cvar>

<cvar name="FORTRANMODDIRSUFFIX">
<summary>
<para>
The suffix used to specify a module directory on the Fortran compiler command
line.
This will be appended to the beginning of the directory
in the &cv-link-FORTRANMODDIR; construction variables
when the &cv-link-_FORTRANMODFLAG; variables is automatically generated.
</para>
</summary>
</cvar>

<cvar name="_FORTRANMODFLAG">
<summary>
<para>
An automatically-generated construction variable
containing the Fortran compiler command-line option
for specifying the directory location where the Fortran
compiler should place any module files that happen to get
generated during compilation.
The value of &cv-link-_FORTRANMODFLAG; is created
by prepending/appending &cv-link-FORTRANMODDIRPREFIX; and
&cv-link-FORTRANMODDIRSUFFIX;
to the beginning and end of the directory in &cv-link-FORTRANMODDIR;.
</para>
</summary>
</cvar>

<cvar name="FORTRANMODPREFIX">
<summary>
<para>
The module file prefix used by the Fortran compiler.  SCons assumes that
the Fortran compiler follows the quasi-standard naming convention for
module files of
<filename>module_name.mod</filename>.
As a result, this variable is left empty, by default.  For situations in
which the compiler does not necessarily follow the normal convention,
the user may use this variable.  Its value will be appended to every
module file name as scons attempts to resolve dependencies.
</para>
</summary>
</cvar>

<cvar name="FORTRANMODSUFFIX">
<summary>
<para>
The module file suffix used by the Fortran compiler.  SCons assumes that
the Fortran compiler follows the quasi-standard naming convention for
module files of
<filename>module_name.mod</filename>.
As a result, this variable is set to ".mod", by default.  For situations
in which the compiler does not necessarily follow the normal convention,
the user may use this variable.  Its value will be appended to every
module file name as scons attempts to resolve dependencies.
</para>
</summary>
</cvar>

<cvar name="FORTRANPATH">
<summary>
<para>
The list of directories that the Fortran compiler will search for
include files and (for some compilers) module files. The Fortran implicit
dependency scanner will search these directories for include files (but
not module files since they are autogenerated and, as such, may not
actually exist at the time the scan takes place). Don't explicitly put
include directory arguments in FORTRANFLAGS because the result will be
non-portable and the directories will not be searched by the dependency
scanner. Note: directory names in FORTRANPATH will be looked-up relative
to the SConscript directory when they are used in a command. To force
&scons;
to look-up a directory relative to the root of the source tree use #:
</para>

<example_commands>
env = Environment(FORTRANPATH='#/include')
</example_commands>

<para>
The directory look-up can also be forced using the
&Dir;()
function:
</para>

<example_commands>
include = Dir('include')
env = Environment(FORTRANPATH=include)
</example_commands>

<para>
The directory list will be added to command lines
through the automatically-generated
&cv-link-_FORTRANINCFLAGS;
construction variable,
which is constructed by
appending the values of the
&cv-link-INCPREFIX; and &cv-link-INCSUFFIX;
construction variables
to the beginning and end
of each directory in &cv-link-FORTRANPATH;.
Any command lines you define that need
the FORTRANPATH directory list should
include &cv-link-_FORTRANINCFLAGS;:
</para>

<example_commands>
env = Environment(FORTRANCOM="my_compiler $_FORTRANINCFLAGS -c -o $TARGET $SOURCE")
</example_commands>
</summary>
</cvar>

<cvar name="FORTRANPPCOM">
<summary>
<para>
The command line used to compile a Fortran source file to an object file
after first running the file through the C preprocessor.
By default, any options specified in the &cv-link-FORTRANFLAGS;,
&cv-link-CPPFLAGS;,
&cv-link-_CPPDEFFLAGS;,
&cv-link-_FORTRANMODFLAG;, and
&cv-link-_FORTRANINCFLAGS;
construction variables are included on this command line.
</para>
</summary>
</cvar>

<cvar name="FORTRANPPCOMSTR">
<summary>
<para>
The string displayed when a Fortran source file
is compiled to an object file
after first running the file through the C preprocessor.
If this is not set, then &cv-link-FORTRANPPCOM;
(the command line) is displayed.
</para>
</summary>
</cvar>

<cvar name="FORTRANSUFFIXES">
<summary>
<para>
The list of suffixes of files that will be scanned
for Fortran implicit dependencies
(INCLUDE lines and USE statements).
The default list is:
</para>

<example_commands>
[".f", ".F", ".for", ".FOR", ".ftn", ".FTN", ".fpp", ".FPP",
".f77", ".F77", ".f90", ".F90", ".f95", ".F95"]
</example_commands>
</summary>
</cvar>

<cvar name="SHFORTRAN">
<summary>
<para>
The default Fortran compiler used for generating shared-library objects.
</para>
</summary>
</cvar>

<cvar name="SHFORTRANCOM">
<summary>
<para>
The command line used to compile a Fortran source file
to a shared-library object file.
</para>
</summary>
</cvar>

<cvar name="SHFORTRANCOMSTR">
<summary>
<para>
The string displayed when a Fortran source file
is compiled to a shared-library object file.
If this is not set, then &cv-link-SHFORTRANCOM;
(the command line) is displayed.
</para>
</summary>
</cvar>

<cvar name="SHFORTRANFLAGS">
<summary>
<para>
Options that are passed to the Fortran compiler
to generate shared-library objects.
</para>
</summary>
</cvar>

<cvar name="SHFORTRANPPCOM">
<summary>
<para>
The command line used to compile a Fortran source file to a
shared-library object file
after first running the file through the C preprocessor.
Any options specified
in the &cv-link-SHFORTRANFLAGS; and
&cv-link-CPPFLAGS; construction variables
are included on this command line.
</para>
</summary>
</cvar>

<cvar name="SHFORTRANPPCOMSTR">
<summary>
<para>
The string displayed when a Fortran source file
is compiled to a shared-library object file
after first running the file through the C preprocessor.
If this is not set, then &cv-link-SHFORTRANPPCOM;
(the command line) is displayed.
</para>
</summary>
</cvar>

</sconsdoc>