Line 388... |
Line 388... |
gfc_free (gfc_option.module_dir);
|
gfc_free (gfc_option.module_dir);
|
}
|
}
|
|
|
|
|
static FILE *
|
static FILE *
|
open_included_file (const char *name, gfc_directorylist *list, bool module)
|
open_included_file (const char *name, gfc_directorylist *list,
|
|
bool module, bool system)
|
{
|
{
|
char *fullname;
|
char *fullname;
|
gfc_directorylist *p;
|
gfc_directorylist *p;
|
FILE *f;
|
FILE *f;
|
|
|
Line 405... |
Line 406... |
strcpy (fullname, p->path);
|
strcpy (fullname, p->path);
|
strcat (fullname, name);
|
strcat (fullname, name);
|
|
|
f = gfc_open_file (fullname);
|
f = gfc_open_file (fullname);
|
if (f != NULL)
|
if (f != NULL)
|
|
{
|
|
if (gfc_cpp_makedep ())
|
|
gfc_cpp_add_dep (fullname, system);
|
|
|
return f;
|
return f;
|
}
|
}
|
|
}
|
|
|
return NULL;
|
return NULL;
|
}
|
}
|
|
|
|
|
Line 419... |
Line 425... |
to open the file in the current directory first. */
|
to open the file in the current directory first. */
|
|
|
FILE *
|
FILE *
|
gfc_open_included_file (const char *name, bool include_cwd, bool module)
|
gfc_open_included_file (const char *name, bool include_cwd, bool module)
|
{
|
{
|
FILE *f;
|
FILE *f = NULL;
|
|
|
if (IS_ABSOLUTE_PATH (name))
|
if (IS_ABSOLUTE_PATH (name) || include_cwd)
|
return gfc_open_file (name);
|
|
|
|
if (include_cwd)
|
|
{
|
{
|
f = gfc_open_file (name);
|
f = gfc_open_file (name);
|
if (f != NULL)
|
if (f && gfc_cpp_makedep ())
|
return f;
|
gfc_cpp_add_dep (name, false);
|
}
|
}
|
|
|
return open_included_file (name, include_dirs, module);
|
if (!f)
|
|
f = open_included_file (name, include_dirs, module, false);
|
|
|
|
return f;
|
}
|
}
|
|
|
FILE *
|
FILE *
|
gfc_open_intrinsic_module (const char *name)
|
gfc_open_intrinsic_module (const char *name)
|
{
|
{
|
|
FILE *f = NULL;
|
|
|
if (IS_ABSOLUTE_PATH (name))
|
if (IS_ABSOLUTE_PATH (name))
|
return gfc_open_file (name);
|
{
|
|
f = gfc_open_file (name);
|
|
if (f && gfc_cpp_makedep ())
|
|
gfc_cpp_add_dep (name, true);
|
|
}
|
|
|
return open_included_file (name, intrinsic_modules_dirs, true);
|
if (!f)
|
|
f = open_included_file (name, intrinsic_modules_dirs, true, true);
|
|
|
|
return f;
|
}
|
}
|
|
|
|
|
/* Test to see if we're at the end of the main source file. */
|
/* Test to see if we're at the end of the main source file. */
|
|
|