Experimental Physics and Industrial Control System
|
Hi Martin,
On Mar 18, 2020, at 2:04 PM, Konrad, Martin via Core-talk < core-talk at aps.anl.gov> wrote:
I have an IOC directory which is revision controlled using Git. It
contains iocBoot directories for multiple IOC instances. An automatic
deployment system runs something like this (simplified):
git pull
make
This generally works fine. But whenever we are retiring an IOC instance
which means we are removing the corresponding sub-directory in
$(TOP)/iocBoot from the Git repo. Now running the commands above fails.
Turns out this is because the first make run generated
iocBoot/ioctest2/envPaths which is left behind when running "git pull"
(Git only manages files, it automatically deletes empty directories but
it can't delete my iocBoot directory since it still contains an
auto-generated file).
I'm wondering if it would be possible/safe to use a Make rule that only
considers sub-directories of iocBoot that actually contain a Makefile.
Wouldn’t it be easier to just do a ‘make -C iocBoot clean’ before you do the ‘git pull’?
If you look at your iocBoot/Makefile you’ll see that if sets the DIRS itself using wildcards; you should be able to modify the value of that variable like this:
DIRS := $(subst /Makefile,,$(wildcard $(addsuffix /Makefile, $(DIRS))))
The result will not descend into a directory that doesn’t have a Makefile. I wouldn’t want to add that to Base though, some people use GNU’s alternative names for their Makefiles.
- Andrew
--
Complexity comes for free, simplicity you have to work for.
|
- References:
- IOC build fails after removing an iocBoot dir from Git Konrad, Martin via Core-talk
- Navigate by Date:
- Prev:
Re: write to a single element of an array field Ben Franksen via Core-talk
- Next:
Re: write to a single element of an array field Ben Franksen via Core-talk
- 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:
IOC build fails after removing an iocBoot dir from Git Konrad, Martin via Core-talk
- Next:
IOC build fails after removing an iocBoot dir from Git Konrad, Martin via Core-talk
- Index:
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
<2020>
2021
2022
2023
2024
|
ANJ, 19 Mar 2020 |
·
Home
·
News
·
About
·
Base
·
Modules
·
Extensions
·
Distributions
·
Download
·
·
Search
·
EPICS V4
·
IRMIS
·
Talk
·
Bugs
·
Documents
·
Links
·
Licensing
·
|