On 21/09/2015 17:34, Andrew Johnson wrote:
On 09/21/2015 05:28 AM, Ralph Lange wrote:
What is this for?
Application: a new iocsh command.
iocshLoadDir <pathname> <macros>
Source files inside a directory.
iocshLoadDir creates a list of all files in the specified directory
that are not directories themselves and whose file names
* start with a number,
* do not contain a dot ('. '), and
* do not end with a tilde ('~').
It then sources (via the iocshLoad command) all matching files in
alphabetical order, supplying the specified macro substitutions.
This will allow to get rid of all the ugliness linked to sets of '<
stcmd-snippet' lines with fixed names and orders inside a st.cmd file,
replacing it with a standard mechanism that allows easy non-conflicting
installation of st.cmd snippets by different apps, different system
packages etc.
The actual names, phases and related numbers are completely left to the
users' conventions - base just provides the mechanism.
Interesting idea, can I suggest a different implementation? Would it be
acceptable for the directory parsing to be implemented in a Perl script
that runs at build-time (e.g. in iocBoot/ioc*/Makefile) instead?
While I was initially not completely convinced I wanted to do this at
compile time, my use case (and a few others I was making up) all work
nicely with the compile-time approach, and it is admittedly a lot easier
in terms of ease, flexibility, and portability.
So I will follow that path...
Thanks,
~Ralph
- References:
- Q: Portable way to construct a filename? Ralph Lange
- Re: Q: Portable way to construct a filename? Andrew Johnson
- Re: Q: Portable way to construct a filename? Ralph Lange
- Re: Q: Portable way to construct a filename? Andrew Johnson
- Navigate by Date:
- Prev:
Re: Q: Portable way to construct a filename? Andrew Johnson
- Next:
RFC: Creating st.cmd from snippets Ralph Lange
- Index:
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:
Re: Q: Portable way to construct a filename? Andrew Johnson
- Next:
Build failed in Jenkins: epics-base-3.15-mac-test #19 APS Jenkins
- Index:
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
<2015>
2016
2017
2018
2019
2020
2021
2022
2023
2024
|