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  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  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  <2024
<== Date ==> <== Thread ==>

Subject: Re: Build system issue
From: Simon Rose via Tech-talk <tech-talk at aps.anl.gov>
To: Jörn Dreyer <j.dreyer at hzdr.de>, "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov>
Date: Tue, 6 Feb 2024 13:48:28 +0000
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
ANJ, 06 Feb 2024 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·