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  <20222023  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  <20222023  2024 
<== Date ==> <== Thread ==>

Subject: Re: Makefile rule differences with base 3.14 vs 3.15+ in ADCore build with pvi
From: Andrew Johnson via Tech-talk <tech-talk at aps.anl.gov>
To: tech-talk at aps.anl.gov
Date: Wed, 10 Aug 2022 18:19:24 -0500
Hi Gary,

On 8/10/22 7:35 AM, Yendell, Gary (DLSLtd, RAL, LSCI) via Tech-talk wrote:

I am currently working on a proposed change to ADCore to use pvi to generate template and header files during the build.


Why should that go into ADCore? You would appear to be adding a dependency which (currently at least) only your site might need. The EPICS build system allows support modules to publish CONFIG_* and RULES_* files that downstream modules (i.e. other modules that point to this module in their configure/RELEASE file) will include automatically, although some aspects of that did change slightly somewhere in the 3.14-3.15 timescale. I would recommend you look into making your changes in a way that downstream IOCs only need to add your module to obtain the additional build functionality. The EPICS State Notation Compiler/Sequencer module does this in its more recent releases, look at its cfg/RULES_SNCSEQ file for one of the earlier examples, and ask here for more details if you do go this route.

BTW I know nothing about pvi, we don't use it here so some things in my answer may reflect my ignorance about what it does.

This works on 3.14 locally and in GitHub Actions with ci-scripts. The files are generated during the build, and it completes. If I change a yaml file only the relevant files are regenerated and rebuilt against. However, in CI on 3.15 (and 7) I see two problems.


1. Rules are not being run to regenerate existing files even though the sources are newer than the targets.

When the files exist, it does not consider the yaml file as a pre-requisite at all in 3.15, where it does in 3.14, so it just installs the existing file. The rules do run on 3.15 if the targets do not exist at all, but in a preliminary step before the rule for installing to db/ - see here.


Is it because of slightly strange rules to generate the files in the source location and then copy them? Maybe the dependency isn't tracked properly in 3.15? The pvi rules are defined here.


One major change in the build system between 3.14 and 3.15 was that in 3.15 and beyond we expect anyone adding build rules to also provide rules for creating dependency $(DEP) i.e. .d files for their build targets. You might need some conditionals to only enable those dependency rules on 3.15 and later builds, but they are easy to add. I think this is probably causing both problems that you're seeing, you need to provide rules to create your template.d files, and when you do that you can include the yaml file(s) as one of the dependencies, which will then cause later modifications to that file to run the regeneration rules automatically.

You can compare the equivalent sections of the Base/configure/RULES_BUILD files for examples of creating the $(DEP) files.

HTH,

- Andrew
-- 
Complexity comes for free, Simplicity you have to work for.

Replies:
Re: Makefile rule differences with base 3.14 vs 3.15+ in ADCore build with pvi Yendell, Gary (DLSLtd, RAL, LSCI) via Tech-talk
References:
Makefile rule differences with base 3.14 vs 3.15+ in ADCore build with pvi Yendell, Gary (DLSLtd, RAL, LSCI) via Tech-talk

Navigate by Date:
Prev: Re: Industry Pack support for TIP850 under RTEMS Mark Rivers via Tech-talk
Next: pypva, PvObject and NTTable Kuldeep Joshi 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  <20222023  2024 
Navigate by Thread:
Prev: Makefile rule differences with base 3.14 vs 3.15+ in ADCore build with pvi Yendell, Gary (DLSLtd, RAL, LSCI) via Tech-talk
Next: Re: Makefile rule differences with base 3.14 vs 3.15+ in ADCore build with pvi Yendell, Gary (DLSLtd, RAL, LSCI) 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  <20222023  2024 
ANJ, 14 Sep 2022 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·