EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  <20082009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  <20082009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: multiple levels of substitution in msi
From: John Dobbins <[email protected]>
To: "Allison, Stephanie" <[email protected]>
Cc: EPICS Tech-Talk <[email protected]>
Date: Tue, 15 Apr 2008 15:21:16 -0400
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

Replies:
RE: multiple levels of substitution in msi Allison, Stephanie
References:
multiple levels of substitution in msi John Dobbins
RE: multiple levels of substitution in msi Allison, Stephanie

Navigate by Date:
Prev: edm font file Emmanuel Mayssat
Next: RE: multiple levels of substitution in msi Allison, Stephanie
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  <20082009  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 Allison, Stephanie
Next: RE: multiple levels of substitution in msi Allison, Stephanie
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  <20082009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 02 Sep 2010 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·