diff --git a/src/tools/EPICS/Release.pm b/src/tools/EPICS/Release.pm index 9ae6610c3..6ae0dbd9a 100644 --- a/src/tools/EPICS/Release.pm +++ b/src/tools/EPICS/Release.pm @@ -99,17 +99,18 @@ sub expandMacros { } # -# Expand all (possibly nested) macros in dictionary +# Expand all (possibly nested) macros in a dictionary # sub expandRelease { - my ($Rmacros) = @_; + my ($Rmacros, $warn) = @_; # $Rmacros is a reference to a hash + $warn = '' unless defined $warn; while (my ($macro, $val) = each %$Rmacros) { while (my ($pre,$var,$post) = $val =~ m/ (.*) \$\( (\w+) \) (.*) /x) { - warn "EPICS/Release.pm: Undefined macro \$($var) used\n" + warn "EPICS/Release.pm: Undefined macro \$($var) used $warn\n" unless exists $Rmacros->{$var}; - die "EPICS/Release.pm: Circular definition of macro $macro\n" + die "EPICS/Release.pm: Circular definition of macro $var $warn\n" if $macro eq $var; $val = $pre . $Rmacros->{$var} . $post; $Rmacros->{$macro} = $val; diff --git a/src/tools/convertRelease.pl b/src/tools/convertRelease.pl index e3fc2644a..d1a054e87 100644 --- a/src/tools/convertRelease.pl +++ b/src/tools/convertRelease.pl @@ -220,7 +220,7 @@ sub checkRelease { my @order = (); my $relfile = "$path/configure/RELEASE"; readReleaseFiles($relfile, \%check, \@order, $arch); - expandRelease(\%check); + expandRelease(\%check, "while checking module\n\t$app = $path"); delete $check{TOP}; delete $check{EPICS_HOST_ARCH};