[Scons-users] SCons ignoring FORTRANPATH
Dirk Bächle
tshortik at gmx.de
Thu Sep 25 11:34:32 EDT 2014
Hi Tom,
On 25.09.2014 07:34, Tom Cook wrote:
> On Thu, Sep 25, 2014 at 1:02 PM, Damien <damien at khubla.com> wrote:
>> All,
>>
>> This comes up every few years on the list in some form or another. It is an
>> annoying, fickle and somewhat temperamental aspect, but very effective, much
>> like those of us who still have to have to compile Fortran :-).
> I'm not quite clear. Are you saying that it is a good thing that the
> user has to set _FORTRANINCFLAGS because SCons won't do it? That's
> not what the documentation says. From Appendix A:
>
>> _FORTRANINCFLAGS
>>
>> 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 $_FORTRANINCFLAGS is
>> created by prepending/appending $INCPREFIX and$INCSUFFIX to the
>> beginning and end of each directory in $FORTRANPATH.
> That is flat out wrong, as far as I can see.
I'm no Fortran expert, but here's what I can see in the sources. The
Fortran tools are setup as an array of environment variable settings, in
the form of "F77*", "F90*", "F95*" and "F03*"...each representing a kind
of Fortran dialect. Each of these dialects gets bound to a default file
suffix, so for a ".f90" (like in your failing example) the "F90*" vars
are the ones that'll get used.
When looking at the Dump() of your environment from the first email, one
can see that you setup "FORTRANPATH", but *not* "F90PATH"...so I guess
that's where your trouble comes from.
The fix should be easy:
env['F90PATH'] = '$FORTRANPATH'
will then create a non-empty "_F90INCFLAGS" and you should see your
include folders in the build command for "*.f90" as well.
Best regards,
Dirk
More information about the Scons-users
mailing list