Hi:
We have certain database templates that are shared, and run into a problem with the make system when trying to re-build them without a prior "make clean". As the project grows, it's very inconvenient that every change requires a full rebuild.
Assume we have some example.template in a shared location:
/path/to/my/support/example/db/example.template
In the configure/RELEASE file of a new application, we define its path:
# Where the shared templates are
SUPPORT_EXAMPLE=/path/to/my/support/example
In the application's Db directory, we have my_database.substitutions:
file example.template
{ ..
.. and in the Makefile there's
TOP=../..
include $(TOP)/configure/CONFIG
DB += my_database.db
include $(TOP)/configure/RULES
A fresh build works OK:
$ make
perl ......R3.14.12.2/base/bin/linux-x86_64/makeMakefile.pl O.linux-x86_64 ../../..
mkdir O.Common
make -C O.linux-x86_64 -f ../Makefile TOP=../../.. T_A=linux-x86_64 install
make[1]: Entering directory `....xxxxApp/Db/O.linux-x86_64'
echo "../O.Common/my_database.db : " >> my_database.db.d
Inflating database from ../my_database.substitutions
msi -I. -I.. -I ../../../db -I/home/controls/epics/R3.14.12.2/base/db -I/path/to/my/support/example/db -S../my_database.substitutions > my_database.tmp
mv my_database.tmp ../O.Common/my_database.db
Installing created db file ../../../db/my_database.db
But when trying to run 'make' again, this fails:
$ make
make -C O.linux-x86_64 -f ../Makefile TOP=../../.. T_A=linux-x86_64 install
make[1]: Entering directory `....xxxxApp/Db/O.linux-x86_64'
make[1]: *** No rule to make target `example.template', needed by `../O.Common/my_database.db'. Stop.
The problem seems to be that makeDbDepends.pl, called from RULES.Db, creates a dependency file like this:
$ cat O.linux-x86_64/my_database.db.d
../O.Common/my_database.db: example.template
../O.Common/my_database.db :
When msi is called, it received command line options like "-I/path/to/my/support/example/db" that allow it to find all dependencies, but when 'make' is looking at the my_database.db.d dependency file, it only has "example.template" without any idea where to find it, so it rightly complains "No rule to make..".
Would it make sense to invoke makeDbDepends.pl with options similar to the msi invocation, and update it to write the full path to all dependencies into the dependency file?
That way, makeDbDepends.pl could create a dependency file that lists the complete path names, i.e.
../O.Common/my_database.db: /path/to/my/support/example/db/example.template
and then make would be happy.
Thanks,
Kay
- Replies:
- Re: Dependency issue with shared database templates unless using "make clean" Andrew Johnson
- Re: Dependency issue with shared database templates unless using "make clean" Benjamin Franksen
- Navigate by Date:
- Prev:
Re: EPICS database Feature request Benjamin Franksen
- Next:
Re: Dependency issue with shared database templates unless using "make clean" Andrew Johnson
- 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: calc out record to verify pv not connected Andrew C. Starritt
- Next:
Re: Dependency issue with shared database templates unless using "make clean" Andrew Johnson
- 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
|