2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 <2015> 2016 2017 2018 2019 2020 2021 2022 2023 2024 | Index | 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: RFC: Creating st.cmd from snippets |
From: | Torsten Bögershausen <[email protected]> |
To: | Andrew Johnson <[email protected]>, <[email protected]>, <[email protected]> |
Date: | Wed, 23 Sep 2015 06:51:41 +0200 |
Hej,some loose thinking: - (agreed with Andrew:) I think live is easier when snippets should have an unique extension, so that everybody (both the human and the Makefile) knows what they are good for. ".iocs", ".isn" or why not ".ioc". - I like the numbering - Local overrides global, how to do that: Does it make sense to re-order the command line, first things first, The first directory wins over the second:
- and as soon as e.g. 40_settings has been read from the command line via /my/st.cmd.d, all 40_settings in global are blocked automatically. - Add an "-x" option to the script: "script -o st.cmd -x
"script -o st.cmd
On 09/22/2015 10:27 PM, Andrew Johnson
wrote:
Hi Ralph, On 09/22/2015 04:28 AM, Ralph Lange wrote:https://github.com/epics-base/epics-base/wiki/Simple-mechanism-to-create-files-from-ordered-snippets-(blocks)My original thought was that the output file would only contain a list of iocshLoad commands for all the snippet files that it found, not that it would read in and spit out the contents of those files. This might result in a much simpler Perl script, but it would then have to handle the case where the IOC's directory tree looks different to the build host. Your solution has different areas of complexity and simplicity but overall is probably equivalent. A few comments & questions on your document: 1. Why the design D03 for no dots in snippet filenames? I would suggest a requirement that filenames all have the same specific extension such as .cmd or .ish. GNUmake pattern rules are hard to get right without a unique extension to hang them onto. 2. The pattern rule that runs the script will need a wildcard dependency for each snippet directory, but then just removing a snippet file would be insufficient to trigger a rebuild. Not sure this is going to be easy to get right even when snippets have an extension. 3. R21 probably needs a bit more detail, e.g. where you set macro values, and how expansion should handle environment variable macros in the snippets. BTW there is an EPICS::macLib Perl module for when you get to implementation, don't go writing your own. 4. D92 -- is the idea to add rules to base/configure/RULES.ioc or put them in the iocBoot/ioc*/Makefile itself? That's all for now, I may have more ideas later in the process. - Andrew |