From d9d35a4eab601fd7e6113415574d9e255bcb6967 Mon Sep 17 00:00:00 2001 From: Simon Rose Date: Thu, 23 Nov 2023 15:56:21 +0100 Subject: [PATCH] Allow auto-declarations for dbdExpand.pl --- modules/database/src/tools/dbdExpand.pl | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/modules/database/src/tools/dbdExpand.pl b/modules/database/src/tools/dbdExpand.pl index 5cd26728b..acd292a45 100644 --- a/modules/database/src/tools/dbdExpand.pl +++ b/modules/database/src/tools/dbdExpand.pl @@ -20,10 +20,14 @@ use EPICS::Getopts; use EPICS::Readfile; use EPICS::macLib; -our ($opt_D, @opt_I, @opt_S, $opt_o); +our ($opt_D, $opt_A, @opt_I, @opt_S, $opt_o); -getopts('DI@S@o:') or - die "Usage: dbdExpand [-D] [-I dir] [-S macro=val] [-o out.dbd] in.dbd ..."; +getopts('DAI@S@o:') or + die "Usage: dbdExpand [-D] [-A] [-I dir] [-S macro=val] [-o out.dbd] in.dbd ..."; + +if ($opt_A) { + $DBD::Parser::allowAutoDeclarations = 1; +} my @path = map { split /[:;]/ } @opt_I; # FIXME: Broken on Win32? my $macros = EPICS::macLib->new(@opt_S);