EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  <20152016  2017  2018  2019  2020  2021  2022  2023  2024  Index 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  <20152016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: Q: Portable way to construct a filename?
From: Ralph Lange <[email protected]>
To: EPICS Core-Talk <[email protected]>
Date: Tue, 22 Sep 2015 11:21:09 +0200


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  <20152016  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  <20152016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 16 Dec 2015 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·