diff --git a/src/std/rec/test/Makefile b/src/std/rec/test/Makefile index 129c6e91f..0602ef5d2 100644 --- a/src/std/rec/test/Makefile +++ b/src/std/rec/test/Makefile @@ -97,6 +97,7 @@ TESTFILES += $(COMMON_DIR)/analogMonitorTest.dbd ../analogMonitorTest.db TESTS += analogMonitorTest TARGETS += $(COMMON_DIR)/regressTest.dbd +DBDDEPENDS_FILES += regressTest.dbd$(DEP) regressTest_DBD += base.dbd TESTPROD_HOST += regressTest regressTest_SRCS += regressTest.c diff --git a/src/tools/EPICS/Copy.pm b/src/tools/EPICS/Copy.pm index d61800e0e..e1ef2a54e 100644 --- a/src/tools/EPICS/Copy.pm +++ b/src/tools/EPICS/Copy.pm @@ -5,8 +5,6 @@ # in file LICENSE that is included with this distribution. #************************************************************************* -use Carp; - # Copy directories and files from a template sub copyTree { @@ -15,7 +13,7 @@ sub copyTree { # $Rtextsubs contains substitutions for file content. opendir my $FILES, $src - or croak "opendir failed while copying $src: $!\n"; + or die "opendir failed while copying $src: $!\n"; my @entries = readdir $FILES; closedir $FILES; @@ -36,9 +34,9 @@ sub copyTree { print "." unless $opt_d; copyFile($srcName, $dstName, $Rtextsubs); } elsif (-l $srcName) { - carp "\nSoft link in template, ignored:\n\t$srcName\n"; + warn "\nSoft link in template, ignored:\n\t$srcName\n"; } else { - carp "\nUnknown file type in template, ignored:\n\t$srcName\n"; + warn "\nUnknown file type in template, ignored:\n\t$srcName\n"; } } } @@ -46,11 +44,11 @@ sub copyTree { sub copyDir { my ($src, $dst, $Rnamesubs, $Rtextsubs) = @_; if (-e $dst && ! -d $dst) { - carp "\nTarget exists but is not a directory, skipping:\n\t$dst\n"; + warn "\nTarget exists but is not a directory, skipping:\n\t$dst\n"; return; } print "Creating directory '$dst'\n" if $opt_d; - mkdir $dst, 0777 or croak "Can't create $dst: $!\n" + mkdir $dst, 0777 or die "Can't create $dst: $!\n" unless -d $dst; copyTree($src, $dst, $Rnamesubs, $Rtextsubs); } @@ -61,7 +59,7 @@ sub copyFile { print "Creating file '$dst'\n" if $opt_d; open(my $SRC, '<', $src) and open(my $DST, '>', $dst) - or croak "$! copying $src to $dst\n"; + or die "$! copying $src to $dst\n"; while (<$SRC>) { # Substitute any @VARS@ in the text s{@(\w+?)@} diff --git a/src/tools/EPICS/Release.pm b/src/tools/EPICS/Release.pm index 98f18514b..6ae0dbd9a 100644 --- a/src/tools/EPICS/Release.pm +++ b/src/tools/EPICS/Release.pm @@ -5,8 +5,6 @@ # in file LICENSE that is included with this distribution. #************************************************************************* -use Carp; - # # Parse all relevent configure/RELEASE* files and includes # @@ -51,7 +49,7 @@ sub readRelease { "discovered in $file\n"; } - open(my $IN, '<', $file) or croak "Can't open $file: $!\n"; + open(my $IN, '<', $file) or die "Can't open $file: $!\n"; $Ractive->{$file}++; while (<$IN>) { chomp; @@ -79,7 +77,7 @@ sub readRelease { if (-e $path) { &readRelease($path, $Rmacros, $Rapps, $Ractive); } elsif ($op eq "include") { - carp "EPICS/Release.pm: Include file '$path' not found\n"; + warn "EPICS/Release.pm: Include file '$path' not found\n"; } } $Ractive->{$file}--; @@ -101,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) { - carp "EPICS/Release.pm: Undefined macro \$($var) used\n" + warn "EPICS/Release.pm: Undefined macro \$($var) used $warn\n" unless exists $Rmacros->{$var}; - croak "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 e2f13a556..5900612f3 100644 --- a/src/tools/convertRelease.pl +++ b/src/tools/convertRelease.pl @@ -222,7 +222,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};