Experimental Physics and Industrial Control System
Hi Martin,
On 01/18/2018 12:58 PM, Konrad, Martin wrote:
> Thanks for your help. The TARGETS keyword was the missing piece. I also
> had thought about creating empty files to keep track of which file has
> been checked. My final solution looks very similar to what you suggested:
>
> CHECKED = $(addsuffix .asg-checked, $(DB))
> TARGETS += $(CHECKED)
>
> include $(TOP)/configure/RULES
>
> $(CHECKED): %.asg-checked : $(addprefix ../, %)
> @../check-asg.sh $< && touch $@ || true
You can avoid having to include the '|| true' by putting a '-' character
after the tab at the beginning of the line (not sure if it matters which
side of the '@' sign it goes). That's standard GNUmake syntax.
> #!/bin/bash
> if grep -Pzo
> '(?s)record\([^\)]+\)(?:(?!field\(ASG|record\([^\)]+\)).)*?}' $1 >
> /dev/null ; then
> echo "$1: WARNING: Found records without access-security group. Please
> explicitly specify ASG field."
> exit -1
> fi
>
> Engineers see the warning on every build but the check is skipped if it
> already succeeded (unless the corresponding DB file has been updated in
> the meantime).
Glad it works!
- Andrew
--
Arguing for surveillance because you have nothing to hide is no
different than making the claim, "I don't care about freedom of
speech because I have nothing to say." -- Edward Snowdon
- References:
- Forcing make rule in IOC Makefile Konrad, Martin
- Re: Forcing make rule in IOC Makefile Konrad, Martin
- Navigate by Date:
- Prev:
Re: Forcing make rule in IOC Makefile Konrad, Martin
- Next:
Re: IOC crash Michael Davidsaver
- 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
<2018>
2019
2020
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
Re: Forcing make rule in IOC Makefile Konrad, Martin
- Next:
Re: Forcing make rule in IOC Makefile Konrad, Martin
- 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
<2018>
2019
2020
2021
2022
2023
2024