EPICS Home

Experimental Physics and Industrial Control System


 
1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  <20182019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  <20182019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Forcing make rule in IOC Makefile
From: "Konrad, Martin" <[email protected]>
To: EPICS Tech Talk <[email protected]>
Date: Wed, 17 Jan 2018 21:59:32 +0000
Hi,
I'm trying to add a rule to an IOC Makefile that gets executed whenever
I build the IOC. This rule should run a consistency check that should
warn IOC engineers if they forgot to explicitly specify the ASG field on
some record.

Using some regex magic, I managed to craft a rule that does so:

...
include $(TOP)/configure/RULES
#----------------------------------------
#  ADD RULES AFTER THIS LINE

.PHONY: checkasg
checkasg: FORCE
	@if grep -Pzo
'(?s)record\([^\)]+\)(?:(?!field\(ASG|record\([^\)]+\)).)*?}' $(DB) >
/dev/null ; then echo 'WARNING: Found records without access-security
group. Please explicitly specify ASG field.' ; fi
FORCE:

I can run this rule fine by saying "make checkasg". However, I would
prefer if it would run as part of "make all". I tried the force
mechanism above but it doesn't work:

/tmp/testioc/testApp/Db$ make
make -C O.linux-x86_64 -f ../Makefile TOP=../../.. \
    T_A=linux-x86_64 install
make[1]: Entering directory '/tmp/testioc/testApp/Db/O.linux-x86_64'
make[1]: Nothing to be done for 'install'.
make[1]: Leaving directory '/tmp/testioc/testApp/Db/O.linux-x86_64'

It seems like this is not compatible with the EPICS build system but I
don't understand why. Maybe the GNUMake experts can point me into the
right direction?

Thanks a lot,

Martin

-- 
Martin Konrad
High Performance Controls Team Leader
Facility for Rare Isotope Beams
Michigan State University
640 South Shaw Lane
East Lansing, MI 48824-1321, USA
Tel. 517-908-7253
Email: [email protected]

Replies:
Re: Forcing make rule in IOC Makefile Andrew Johnson

Navigate by Date:
Prev: Re: EPICS-DAQmx App Build Issues on cygwin-x86_64 Mark Rivers
Next: Re: Forcing make rule in IOC Makefile Andrew Johnson
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  <20182019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: EPICS-DAQmx App Build Issues on cygwin-x86_64 Mark Rivers
Next: Re: Forcing make rule in IOC Makefile Andrew Johnson
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  <20182019  2020  2021  2022  2023  2024