Experimental Physics and Industrial Control System
Hi All
CONFIG_COMMON currently contains this snippet:
#-------------------------------------------------------
# Make echo output - suppress echoing if make's '-s' flag is set
COMMENT = \#
ECHO = @$(if $(findstring s,$(patsubst T_A=%,,$(MAKEFLAGS))),
$(COMMENT),echo)
(for win32 COMMENT gets overridden as COMMENT = $(PERL) -e '')
This is a bit dangerous, as it breaks rules that use ';', e.g.
$(ECHO) Creating foo; ../create-foo.sh > foo
The comment will disable the whole command line, not only the echo command.
This broke one of our self-written build rules and took me and a colleague
almost a whole day to debug.
There is an alternative: The colon (':') can be used as NOP (ignore all
arguments) in all unix shells (including at least dash, bash, and zsh).
So I propose to replace COMMENT with NOP, defining
NOP = ":"
ECHO = @$(if $(findstring s,$(patsubst T_A=%,,$(MAKEFLAGS))),$(NOP),echo)
and on win32 systems
NOP = $(PERL) -e ''
The extra definition for ECHO in RULES.Db is not necessary and should be
removed.
Cheers
Ben
Attachment:
signature.asc
Description: This is a digitally signed message part.
- Replies:
- Re: ECHO variable in build rules Andrew Johnson
- Navigate by Date:
- Prev:
Problem installing EDM on Fedora 16 manta santosh aditya santosh_aditya
- Next:
Re: [StreamDevice] need advice Pavel Masloff
- 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:
Problem installing EDM on Fedora 16 manta santosh aditya santosh_aditya
- Next:
Re: ECHO variable in build rules 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
2018
2019
2020
2021
2022
2023
2024