Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Lorenz Huedepohl
ftimings
Commits
189a54b0
Commit
189a54b0
authored
May 22, 2015
by
Lorenz Huedepohl
Browse files
Better error output
parent
6132d7e3
Changes
2
Hide whitespace changes
Inline
Side-by-side
fortran_dependencies.mk
View file @
189a54b0
...
...
@@ -69,7 +69,7 @@ ifneq ($(call is_clean),1)
include
$(_f90_depfile)
endif
$(_f90_depfile)
:
$(top_srcdir)/fdep/fortran_dependencies.pl $(foreach p
,
$(_f90_targets)
,
$(_$p_use_mods) $(_$p_def_mods)) | $(foreach p
,
$(_f90_targets)
,
$(_f90_depdir)/$p)
$(
call
_f90_verbose,F90 DEPS
$@
)
echo
>
$@
;
$(
foreach
p,
$(_f90_targets)
,
$(top_srcdir)
/fdep/fortran_dependencies.pl
$
(
_
$p_use_mods
)
$
(
_
$p_def_mods
)
>>
$@
;
)
$(
call
_f90_verbose,F90 DEPS
$@
)
echo
>
$@
;
$(
foreach
p,
$(_f90_targets)
,
$(top_srcdir)
/fdep/fortran_dependencies.pl
$p
$
(
_
$p_use_mods
)
$
(
_
$p_def_mods
)
>>
$@
;
)
$(_f90_depdir)
:
@
mkdir
$@
...
...
fortran_dependencies.pl
View file @
189a54b0
...
...
@@ -39,10 +39,15 @@ sub add_def {
}
}
my
$target
=
shift
;
foreach
my
$file
(
@ARGV
)
{
my
$re
;
my
$add
;
my
$object
;
if
(
defined
(
$ENV
{
V
})
&&
$ENV
{
V
}
ge
"
2
")
{
print
STDERR
"
fdep: Considering file
$file
for target
$target
\n
";
}
if
(
$file
=~
/^(.*)\.def_mods(\..*)$/
)
{
$re
=
$def_re
;
$add
=
\
&add_def
;
...
...
@@ -61,7 +66,7 @@ foreach my $file (@ARGV) {
if
(
$_
=~
$re
)
{
&$add
(
$object
,
$
1
);
}
else
{
die
"
Cannot parse module statement '
$_
', was expecting
$re
";
die
"
At
$file
:$.
\n
Cannot parse module statement '
$_
', was expecting
$re
";
}
}
close
(
FILE
)
...
...
@@ -71,8 +76,8 @@ foreach my $object (sort keys %uses) {
for
my
$m
(
keys
%
{
$uses
{
$object
}})
{
if
(
defined
$defs
{
$m
})
{
print
"
$object
:
",
$defs
{
$m
},
"
\n
";
}
elsif
(
defined
(
$ENV
{
V
})
&&
$ENV
{
V
}
e
q
"
1
")
{
print
STDERR
"
Warning: Cannot find definition of module
$m
in files for current
program
, might be external
\n
";
}
elsif
(
defined
(
$ENV
{
V
})
&&
$ENV
{
V
}
g
e
"
1
")
{
print
STDERR
"
Warning: Cannot find definition of module
$m
in files for current
target
$target
, might be external
\n
";
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment