Add error message for when EPICS_BASE is not set on templates.

Add error message and validation at convertRelease.pl for empty RELEASE files.
This commit is contained in:
Hugo Slepicka
2021-04-29 17:11:36 -07:00
parent 71a1ff1292
commit f02884d996
3 changed files with 16 additions and 0 deletions

View File

@@ -13,6 +13,11 @@ ifdef T_A
-include $(TOP)/configure/RELEASE.$(EPICS_HOST_ARCH).$(T_A)
endif
# Check for proper EPICS_BASE
ifneq (file,$(origin EPICS_BASE))
$(error EPICS_BASE must be defined in configure/RELEASE or a similar file or it will not be correctly read by convertRelease.pl!)
endif
CONFIG = $(RULES)/configure
include $(CONFIG)/CONFIG

View File

@@ -17,6 +17,11 @@ ifdef T_A
-include $(TOP)/configure/RELEASE.$(EPICS_HOST_ARCH).$(T_A)
endif
# Check for proper EPICS_BASE
ifneq (file,$(origin EPICS_BASE))
$(error EPICS_BASE must be defined in configure/RELEASE or a similar file or it will not be correctly read by convertRelease.pl!)
endif
CONFIG = $(RULES)/configure
include $(CONFIG)/CONFIG

View File

@@ -113,6 +113,9 @@ EOF
#
sub releaseTops {
my @includes = grep !m/^ (TOP | TEMPLATE_TOP) $/x, @apps;
if (!@includes) {
die "No variables defined in RELEASE*s";
}
print join(' ', @includes), "\n";
}
@@ -256,6 +259,9 @@ sub checkRelease {
}
my @modules = grep(!m/^(RULES|TOP|TEMPLATE_TOP)$/, @apps);
if (!@modules) {
die "No variables defined in RELEASE*s";
}
my $app = shift @modules;
my $latest = AbsPath($macros{$app});
my %paths = ($latest => $app);