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  2008  2009  2010  2011  2012  2013  <20142015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  <20142015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: Dependency issue with shared database templates unless using "make clean"
From: Andrew Johnson <[email protected]>
To: <[email protected]>
Date: Wed, 11 Jun 2014 10:28:25 -0500
Hello Kay,

Janet has made a number of changes to the dependency rules including
those for templates since the 3.14.12.2 release that you appear to be
using. I think we already did what you are suggesting - I just tried
adding an external template file to a .substitutions file using the
3.14.12.3 release of Base and the generated .db.d file has the full
path-name to the template file in it.

The Release Notes for 3.14.12.3 included the following item which I
think describes this issue:

> Build problem with db dependencies
> 
> The dependency output for .db and .acf files created by
> makeDbDepends.pl did not show the directories of the depended
> files. The makeDbDepends.pl script has been replaced by mkmf.pl
> for this purpose after modifying it to accept multiple -I
> include directory options and more than one source file on the
> command line. The makeDbDepends.pl script has been removed from Base.

HTH,

- Andrew


On 06/11/2014 09:53 AM, Kasemir, Kay wrote:
> 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
> 
> 

-- 
Advertising may be described as the science of arresting the human
intelligence long enough to get money from it. -- Stephen Leacock

Replies:
Re: Dependency issue with shared database templates unless using "make clean" Kasemir, Kay
References:
Dependency issue with shared database templates unless using "make clean" Kasemir, Kay

Navigate by Date:
Prev: Dependency issue with shared database templates unless using "make clean" Kasemir, Kay
Next: Re: Dependency issue with shared database templates unless using "make clean" Benjamin Franksen
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  <20142015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Dependency issue with shared database templates unless using "make clean" Kasemir, Kay
Next: Re: Dependency issue with shared database templates unless using "make clean" Kasemir, Kay
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  <20142015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 17 Dec 2015 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·