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: Makefile rule differences with base 3.14 vs 3.15+ in ADCore build with pvi |
From: | "Yendell, Gary \(DLSLtd, RAL, LSCI\) via Tech-talk" <tech-talk at aps.anl.gov> |
To: | "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov>, Andrew Johnson <anj at anl.gov> |
Date: | Fri, 12 Aug 2022 17:03:38 +0000 |
Hi Andrew,
pvi is entirely optional for the user of a support module - it only needs to be used by the developers. If ADCore is built and pvi is available, then it will generate the files and then they can be checked in and released as normal. If it is not available,
i.e. when other sites are importing it, then it will just build against the checked in files as it normally would. This is done by an optional include in the Makefiles in ADCore. It only will go into ADCore if we can convince Mark that it is a good idea. Your
suggestion to copy the way sequencer does this is interesting - it would make things a bit neater. We will investigate that.
---
Adding an empty rule for a template.d file with a dependency
on the yaml file
fixes the second problem, but not the first problem. Testing in a local EPICS7 container locally, I have tried to insert the .template dependency on the yaml into the .d file like so:
%Parameters.template$(DEP): $(TOP)/pvi/%.pvi.producer.yaml
@$(RM) $@
echo "%Parameters.template: $(TOP)/pvi/%.pvi.producer.yaml" > $@as that is what it looks like some of the other .d files in ADCore do, but it doesn't make a difference. I am not sure how the content of the template.d file would help because it doesn't run the rule for the
template.d file when the template already exists.
I notice that when I build without the file so that it is generated, then touching the file causes it to be regenerated. This is because the template file then exists in ADApp/Db/O.linux-x86_64 - if I delete
that file then it stops working again. Is that a clue?
Cheers,
Gary
From: Tech-talk <tech-talk-bounces at aps.anl.gov> on behalf of Andrew Johnson via Tech-talk <tech-talk at aps.anl.gov>
Sent: 11 August 2022 00:19 To: tech-talk at aps.anl.gov <tech-talk at aps.anl.gov> Subject: Re: Makefile rule differences with base 3.14 vs 3.15+ in ADCore build with pvi Hi Gary,
On 8/10/22 7:35 AM, Yendell, Gary (DLSLtd, RAL, LSCI) via Tech-talk wrote:
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.
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.
-- This e-mail and any attachments may contain confidential, copyright and or privileged material, and are for the use of the intended addressee only. If you are not the intended addressee or an authorised recipient of the addressee please notify us of receipt by returning the e-mail and do not use, copy, retain, distribute or disclose the information in or attached to the e-mail. |