Hi Benjamin,
Your change to convertRelease.pl plus the following 2 changes to base/configure/RULES.Db would be ideal:
# dbExpand
INSTALL_DBDFLAGS += -I $(INSTALL_LOCATION)/dbd
############# Add INSTALL_DBFLAGS for databases in the installation area
INSTALL_DBFLAGS += -I $(INSTALL_LOCATION)/db
DBDFLAGS = $(USR_DBDFLAGS) -I . -I .. $(INSTALL_DBDFLAGS) $(RELEASE_DBDFLAGS)
############# Add INSTALL_DBFLAGS and RELEASE_DBFLAGS to the list of places that msi looks to find databases
DBFLAGS = $($*_DBFLAGS) $(USR_DBFLAGS) -I. $(GENERIC_SRC_INCLUDES) $(INSTALL_DBFLAGS) $(RELEASE_DBFLAGS)
Thanks for the follow up on this issue.
Stephanie
> -----Original Message-----
> From: [email protected]
> [mailto:[email protected]] On Behalf Of Benjamin Franksen
> Sent: Wednesday, April 16, 2008 1:24 AM
> To: [email protected]
> Subject: Re: multiple levels of substitution in msi
>
> To fix this, I propose to add this patch to the next base release:
>
> aragon: .../configure/tools > cvs diff -u -r epics_R3_14_9
> convertRelease.pl
> Index: convertRelease.pl
> ===================================================================
> RCS
> file:
> /opt/repositories/controls/epics/base/3.14/configure/tools/con
> vertRelease.pl,v
> retrieving revision 1.1.1.8
> retrieving revision 1.3
> diff -u -r1.1.1.8 -r1.3
> --- convertRelease.pl 1 Mar 2007 11:31:42 -0000 1.1.1.8
> +++ convertRelease.pl 7 Mar 2007 11:16:18 -0000 1.3
> @@ -220,6 +220,11 @@
> next unless (-d "$path/dbd");
> print OUT "RELEASE_DBDFLAGS += -I \$(strip \$($app))/dbd\n";
> }
> + foreach my $app (@includes) {
> + my $path = $macros{$app};
> + next unless (-d "$path/db");
> + print OUT "RELEASE_DBFLAGS += -I\$(strip \$($app))/db\n";
> + }
> close OUT;
> }
>
> On Tuesday 15 April 2008 23:23, John Dobbins wrote:
> > Stephanie,
> >
> > If I change
> >
> > #13 Makefile to:
> >
> > TOP=../../..
> > include $(TOP)/configure/CONFIG
> >
> > DB = second.db
> >
> > include $(TOP)/configure/RULES
> >
> > DBFLAGS += $(TOP)/db
> >
> > but I can't seem to get DBFLAGS to appear automatically.
> >
> > Is there a way to debug the RULES building part of the
> build process?
> >
> > John
> >
> > Allison, Stephanie wrote:
> > > Hi John,
> > >
> > > Your rule for inflating the database isn't properly using
> DBFLAGS so it
> > > doesn't have the directories with "db" in the include list. Is it
> > > possible you are using a rule that is different from the one in
> > > base/configure/RULES.Db?
> > >
> > > Here is an example from my build (I have several modules
> included in my
> > > RELEASE which is why the long list of potential areas to
> find database
> > > files):
> > >
> > > Inflating database from ../evrEventAll.substitutions
> > >
> /nfs/slac/g/lcls/build/epics/extensions/extensions-R3-14-8-2/b
> in/linux-
> > >x86/msi -I. -I.. -I ../../../../db -I
> > >
> /nfs/slac/g/lcls/build/epics/modules/generalTime/generalTime-R1-2-1/db
> > > -I
> /nfs/slac/g/lcls/build/epics/modules/sSubRecord/sSubRecord-R1-0-1/db
> > > -I
> /nfs/slac/g/lcls/build/epics/modules/miscUtils/miscUtils-R1-0-1/db
> > > -I /nfs/slac/g/lcls/build/epics/base/base-R3-14-8-2-lcls2/db
> > > -I../O.Common -S../evrEventAll.substitutions > msi.tmp
> > > mv msi.tmp ../O.Common/evrEventAll.db
> > >
> > > If you are using your own rule, you may need to add the
> "db" in front
> > > of the file name. For example:
> > >
> > > file db/firstAll.db
> > > {
> > > pattern { DEVICE }
> > > { device1 }
> > > { device2 }
> > > ...
> > > {device30}
> > > }
> > >
> > > Stephanie
> > >
> > >> -----Original Message-----
> > >> From: John Dobbins [mailto:[email protected]]
> > >> Sent: Tuesday, April 15, 2008 12:21 PM
> > >> To: Allison, Stephanie
> > >> Cc: EPICS Tech-Talk
> > >> Subject: Re: multiple levels of substitution in msi
> > >>
> > >> Allison,
> > >>
> > >> Using your suggestion (from January) I tried unsuccessfully
> > >> to get MSI to do
> > >> multiple levels of substitution. I am using 3.14.9 but I
> > >> assume that is not the
> > >> issue.
> > >>
> > >> Setup:
> > >>
> > >> #1 xxx
> > >> #2 Makefile
> > >> #3 configure/
> > >> #4 iocBoot/
> > >> #5 xxxApp/
> > >> #6 Makefile
> > >> #7 Db/
> > >> #8 first/
> > >> #9 Makefile
> > >> #10 firstAll.substitutions
> > >> #11 firstAll.template
> > >> #12 second/
> > >> #13 Makefile
> > >> #14 second.substitutions
> > >> #15 src/
> > >>
> > >>
> > >> Fails with:
> > >>
> > >> Inflating database from ../second.substitutions
> > >> msi -I. -I.. -I../O.Common
> -S../second.substitutions > msi.tmp
> > >> Could not open firstAll.db
> > >>
> > >>
> > >> firstAll.db exists but not in any of the places MSI is
> > >> looking. How do I get
> > >> MSI to find it?
> > >>
> > >> Details:
> > >>
> > >> #6 Makefile is:
> > >>
> > >> TOP=../..
> > >> include $(TOP)/configure/CONFIG
> > >>
> > >> DIRS += first
> > >> DIRS += second
> > >>
> > >> include $(TOP)/configure/RULES_DIRS
> > >>
> > >>
> > >> #9 Makefile is:
> > >>
> > >> TOP=../../..
> > >> include $(TOP)/configure/CONFIG
> > >>
> > >> DB = firstAll.db
> > >>
> > >> include $(TOP)/configure/RULES
> > >>
> > >> #13 Makefile is:
> > >>
> > >> TOP=../../..
> > >> include $(TOP)/configure/CONFIG
> > >>
> > >> DB = second.db
> > >>
> > >> include $(TOP)/configure/RULES
> > >>
> > >>
> > >> Thanks,
> > >>
> > >> John Dobbins
> > >> Cornell University
> > >> Lab for Elementary Particle Physics
> > >>
> > >> Allison, Stephanie wrote:
> > >>> Hi John,
> > >>>
> > >>>> Is there a way to get MSI to deal with multiple levels of
> > >>>> substitution?
> > >>>
> > >>> I divide my Db directory into sub-directories and build
> > >>
> > >> them in the proper order. For example:
> > >>> xxxApp/Db/first contains Makefile, first.db, and
> > >>
> > >> firstAll.substitions:
> > >>> Makefile has:
> > >>> DB += firstAll.db
> > >>> firstAll.substitutions which looks something like this:
> > >>> file first.db
> > >>> {
> > >>> pattern { DEV , CARD , NAME , ID
> > >>
> > >> ,P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,VME}
> > >>
> > >>> { $(DEVICE) , 0 , NAME1 , 1 , 0, 0, 0,
> > >>
> > >> 0, 0, 0, 0, 0, 0, 0, 0 , 0 , 0 , 0 , 1 }
> > >>
> > >>> { $(DEVICE) , 0 , NAME2 , 2 , 1, 0, 0,
> > >>
> > >> 0, 0, 0, 0, 0, 0, 0, 0 , 0 , 0 , 0 , 1 }
> > >>
> > >>> ...
> > >>> { $(DEVICE) , 0 , NAME15 , 12 , 0, 0, 0,
> > >>
> > >> 0, 0, 0, 0, 0, 0, 0, 0 , 0 , 0 , 1 , 1 }
> > >>
> > >>> }
> > >>>
> > >>>
> > >>> xxxApp/Db/second contains Makefile, second.substitutions:
> > >>> Makefile has:
> > >>> DB += second.db
> > >>> second.substitutions looks something like this:
> > >>> file firstAll.db
> > >>> {
> > >>> pattern { DEVICE }
> > >>> { device1 }
> > >>> { device2 }
> > >>> ...
> > >>> {device30}
> > >>> }
> > >>>
> > >>> and xxxApp/Db/Makefile looks like:
> > >>> TOP = ../..
> > >>> include $(TOP)/configure/CONFIG
> > >>> # first must be first since second will need for the
> > >>
> > >> .db file created by first
> > >>
> > >>> DIRS += first
> > >>> DIRS += second
> > >>> include $(TOP)/configure/RULES_DIRS
> > >>>
> > >>> The RULES.Db files that come with epics 3.14.8.2 will do
> > >>
> > >> the MSI properly - I don't think we had to change
> RULES.Db for this.
> > >>
> > >>> If you don't like sub-directories, just create more *Db
> > >>
> > >> directories under xxxApp:
> > >>> xxxApp/CommonDb1
> > >>> xxxApp/CommonDb2
> > >>> xxxApp/Db (which depends on CommonDb1 and CommonDb2
> > >>
> > >> being built first)
> > >>
> > >>> xxxApp/Makefile must enforce proper build order
> > >>>
> > >>> Note there is a bug in the RULES somewhere that requires
> > >>
> > >> the "{" that comes after the "file xxxx.db" to be on the next
> > >> line if xxxx.db comes from another module listed in your
> RELEASE file.
> > >>
> > >>> Doesn't work:
> > >>> file xxxx.db {
> > >>> Works:
> > >>> file xxxx.db
> > >>> {
> > >>>
> > >>> Hope this helps more than confuses...
> > >>>
> > >>> Stephanie Allison
>
> --
> "Programming = Mathematics + Murphy's Law" (E.W.Dijkstra)
>
- References:
- multiple levels of substitution in msi John Dobbins
- RE: multiple levels of substitution in msi Allison, Stephanie
- Re: multiple levels of substitution in msi John Dobbins
- Re: multiple levels of substitution in msi Benjamin Franksen
- Navigate by Date:
- Prev:
Channel Archiver Build Problem Tasaddaq Ali Khan
- Next:
edm font init failed solution jskinner
- 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
- Navigate by Thread:
- Prev:
Re: multiple levels of substitution in msi Benjamin Franksen
- Next:
Soft IOC VME access Robert Ellis
- 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
|