Commit ad089190 authored by Lorenz Huedepohl's avatar Lorenz Huedepohl
Browse files

Print current program name for make V=1 in fdep

parent 99de360c
_f90_verbose = $(_f90_verbose_$(V))
_f90_verbose_ = $(_f90_verbose_$(AM_DEFAULT_VERBOSITY))
_f90_verbose_0 = @echo " $1";
_f90_targets = $(subst .,_,$(bin_PROGRAMS) $(lib_LTLIBRARIES))
_f90_targets = $(subst -,_,$(patsubst %.la,%_la,$(patsubst %.a,%_a,$(patsubst %.so,%_so,$(PROGRAMS) $(LTLIBRARIES)))))
FORTRAN_CPP ?= cpp -P -traditional -Wall -Werror
# $1 source files
......@@ -59,11 +58,16 @@ define is_clean
$(if $(filter-out mostlyclean clean distclean maintainer-clean,$(MAKECMDGOALS)),0,1)
endef
define _fdep_newline
endef
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) >> $@;$(_fdep_newline))
$(_f90_depdir):
@mkdir $@
......
......@@ -33,10 +33,15 @@ sub add_def {
}
}
my $p = 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\n";
}
if ($file =~ /^(.*)\.def_mods(\..*)$/) {
$re = $def_re;
$add = \&add_def;
......@@ -65,8 +70,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} eq "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} ge "1") {
print STDERR "fdep: Warning: Cannot find definition of module $m in files for program $p, might be external\n";
}
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment