Thank you for your email.
you brought me to look at the envPath function in
convertRelease.pl as well, and I showed it to my colleague Mike
who knows perl very well.
we then discovered that the script just generates the $(IOC)
variable from the $(TOP)/iocBoot/iocYOURNAME/ path (in perl its
the $cwd variable)
by just removing everything before the last "/". ($ioc =~
s/^.*\///; -> $ioc =~ s/ ^.*\/ / /;)
so, I'll leave my dbLoadDatabase "dbd/test.dbd" hardcoded and not
use $(IOC) here.
thanks! :)
William Kirstaedter
PP&B Computer Support Group
Fritz-Haber-Institut Berlin
Am 28.08.24 um 14:02 schrieb Marco
Filho:
For some reason my emails aren't going to tech-talk...
Re-sending it here
You
kinda got me curious to this too.
I found this script segment which seems to be
creating envPaths in
epics-base/bin/linux-x86_64/convertRelease.pl:
#
# Generate envPaths file with epicsEnvSet
commands for iocsh IOCs.
# Include parentheses anyway in case CEXP
users want to use this.
#
sub envPaths {
my @includes = grep !m/^ (RULES |
TEMPLATE_TOP) $/x, @apps;
unlink($outfile);
open(OUT,">$outfile") or die "$!
creating $outfile";
my $ioc = $cwd;
$ioc =~ s/^.*\///; # iocname is last
component of directory name
print OUT
"epicsEnvSet(\"IOC\",\"$ioc\")\n";
foreach my $app (@includes) {
my $iocpath = my $path =
$macros{$app};
$iocpath =~ s/^$root/$iocroot/o if
($opt_t);
$iocpath =~ s/([\\"])/\\$1/g; # escape
back-slashes and double-quotes
print OUT
"epicsEnvSet(\"$app\",\"$iocpath\")\n" if (-d
$path);
}
close OUT;
}
I don't know perl but it seems it gets the name from the
directory and the directory itself is created from another
mechanism from makeBaseApp?
I tried changing the directory name and recompiling and it
really changes the IOC variable name in envPaths. I'm not sure
where is the part of makeBaseApp that creates the directory
though.
Hello,
I'd like to know how the envPaths file in the iocBoot
Directory is built.
I tried to load the IOC's main dbd file by using the
$(IOC) variable
from envPaths, but noticed that it always will contain
an "ioc" Prefix
to the actual IOC name, while the dbd file is called
just like the IOC name.
for example, if you create a new empty IOC by using
"makeBaseApp.pl -t
ioc test" and "makeBaseApp.pl -i -t ioc test":
you get a Makefile in $(TOP)/testApp/src/ that builds a
test.dbd
while in iocBoot, envPaths with always have the $(IOC)
variable set to
"ioctest".
Just curious,
--
William Kirstaedter
PP&B Computer Support Group
Fritz-Haber-Institut Berlin
Attachment:
smime.p7s
Description: Kryptografische S/MIME-Signatur
- References:
- how is envPaths built? William Kirstaedter via Tech-talk
- Re: how is envPaths built? Marco Filho via Tech-talk
- Navigate by Date:
- Prev:
Re: how is envPaths built? Ralph Lange via Tech-talk
- Next:
Re: how is envPaths built? Abdalla Ahmad via Tech-talk
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
<2024>
2025
- Navigate by Thread:
- Prev:
Re: how is envPaths built? Han Lee via Tech-talk
- Next:
MVME 5500 How to flash the VxWorks bootrom? whitetiger1123 via Tech-talk
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
<2024>
2025
|