EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

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

Subject: Re: IOC build fails after removing an iocBoot dir from Git
From: "Johnson, Andrew N. via Core-talk" <core-talk at aps.anl.gov>
To: "Konrad, Martin" <konrad at frib.msu.edu>
Cc: EPICS core-talk <core-talk at aps.anl.gov>
Date: Wed, 18 Mar 2020 20:24:06 +0000
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  <20202021  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  <20202021  2022  2023  2024 
ANJ, 19 Mar 2020 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·