Experimental Physics and Industrial Control System
On Wednesday, March 28, 2012, Yves Lussignol wrote:
> Hi,
>
> The perl script makeDbDepends.pl has been changed with EPICS Base
> R3.14.12.2. Now the script works and produces a file like this one:
>
> $ cat O.linux-x86/iocLlrf.db.d
> ../O.Common/iocLlrf.db: llrfSim.db llrfLabview.db llrf.db llrfCavUp.db
> llrfCavTune.db llrfAcq.db
> ../O.Common/iocLlrf.db :
>
> With previous EPICS Base versions the file looked like this:
>
> $ cat O.linux-x86/iocLlrf.db.d
> ../O.Common/iocLlrf.db:
>
> The first build works but the second build fails because the file
> iocLlrf.db.d exists:
>
> $ make
> make -C O.linux-x86 -f ../Makefile TOP=../../.. T_A=linux-x86 install
> make[1]: Entering directory
> `/home/lussi/tmp/topSP2/llrfApp/db2/O.linux-x86' make[1]: *** No rule to
> make target `llrfSim.db', needed by
> `../O.Common/iocLlrf.db'. Stop.
> make[1]: Leaving directory
> `/home/lussi/tmp/topSP2/llrfApp/db2/O.linux-x86' make: ***
> [install.linux-x86] Error 2
>
> I tried to correct this with the patch found in the 3.14.12.2 known
> problems (rules-db.patch) and with the patch proposed by Bruce Hill, but
> none works for me.
>
> My file iocLlrf.db is built from iocLlrf.substitutions. The substituted
> db files are located in my $(TOP)/db. But this location is not known by
> the make command. So I tried to modify the file RULES.Db this way:
>
> vpath %.db $(USR_VPATH) $(GENERIC_SRC_DIRS) $(dir $(DB)) $(TOP)/db
>
> But this modification introduces a circular dependency problem and it
> doesn't work.
The EPICS build system does not correctly handle dependencies between
different Apps under the same TOP. The reason for this is the recursive call
to make in subdirectories.
That said, you can do what you want by following the "advice" make gives you
in the error message, which says:
> No rule to make target `llrfSim.db'
So, give it a rule! Like this:
$(COMMON_DIR)/llrfSim.db: $(INSTALL_LOCATION)/db/llrfSim.db:
$(CP) $< $@
(should go into your AppThatUsesTheFile/Db/Makefile). You can also add such
a rule to your RULES.Db like this:
$(LOCAL_DB): $(COMMON_DIR)/%.db: $(INSTALL_LOCATION)/db/%.db:
$(CP) $< $@
and then say
LOCAL_DB += llrfSim.db
in your Makefile.
The rule fails if $(INSTALL_LOCATION)/db/llrfSim.db does not exist. So you
want to tell make that the application that creates the llrfSim.db should be
built before the one that uses it llrfSim.db. This can be done in the top
level Makefile by saying
AppThatUsesTheFile_DEPEND_DIRS += AppThatCreatesTheFile
Cheers
Ben
Attachment:
signature.asc
Description: This is a digitally signed message part.
- References:
- another build problem with db dependencies Yves Lussignol
- Navigate by Date:
- Prev:
Re: What is void* puser in ca_create_channel Florian Feldbauer
- Next:
Re: What is void* puser in ca_create_channel Benjamin Franksen
- 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:
another build problem with db dependencies Yves Lussignol
- Next:
Keithley 2400 Christian Roehrig
- 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