Hi Jörn -
There are two solutions you could try, depending on preference. You could instead define your rule to generate the .template file as
$(COMMON_DIR)/db.template:
perl script.pl
db.template$(DEP):
@echo $(COMMON_DIR)/db.db: ../Makefile > $@
This would generate the .template file as needed, within the O.Common directory, which would then be installed in as db/db.template. Note that you do need the second target as well, as EPICS base expects a file that describes the dependencies of generated files.
If, on the other hand, you want to simply create a .db file in the end, you could also do:
DB += db.db
db.template:
perl script.pl
In this case, the regular EPICS build rules to convert a .template file to a .db file will take place, and you will get a .db file only installed.
In the end, it depends on whether or not you case about having specifically a .template file or a .db file installed.
Cheers,
Simon
On 2024-02-06, 14:25, "Tech-talk on behalf of Jörn Dreyer via Tech-talk" <tech-talk-bounces at aps.anl.gov <mailto:tech-talk-bounces at aps.anl.gov> on behalf of tech-talk at aps.anl.gov <mailto:tech-talk at aps.anl.gov>> wrote:
Hi,
I'm working on a device which has around 20.000 channels which have mostly very similar names. Therefor I created a perl script that auto generates some template files to be used by the IOC. How can I define a rule in the Db/Makefile that calls this script?
A simple
DB += db.template
db.template:
perl script.pl
does not work. It complains that there is no rule to create ../O.Common/db.template.
Regards,
Jörn
- Replies:
- Re: Build system issue Jörn Dreyer via Tech-talk
- References:
- Build system issue Jörn Dreyer via Tech-talk
- Navigate by Date:
- Prev:
Build system issue Jörn Dreyer via Tech-talk
- Next:
RE: Issue with Stream Device. Timeout only on Reconnect Maximilian Scharpey via Tech-talk
- 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:
Build system issue Jörn Dreyer via Tech-talk
- Next:
Re: Build system issue Jörn Dreyer via Tech-talk
- 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>
|