[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: About "$(if $(KBUILD_VERBOSE:1=),@)"
From: |
Paul D. Smith |
Subject: |
Re: About "$(if $(KBUILD_VERBOSE:1=),@)" |
Date: |
Fri, 26 May 2006 15:12:59 -0400 |
%% "zong jians" <address@hidden> writes:
zj> In the linux kernel makefile,there is some words like
zj> "$(if $(KBUILD_VERBOSE:1=),@)" in some line.
The syntax $(VAR:x=y) is syntactic sugar (shorthand) for:
$(patsubst x,y,$(VAR))
In the special case where either "x" or "y" don't contain a pattern
character (%), it's considered to be prepended; so it would be
equivalent to:
$(patsubst %x,%y,$(VAR))
or in the above example:
$(if $(patsubst %1,%,$(KBUILD_VERBOSE)),@)
which essentially evaluates to "@" if the value of KBUILD_VERBOSE is any
value other than "1", and empty if it's exactly "1".
See the GNU make manual for details.
--
-------------------------------------------------------------------------------
Paul D. Smith <address@hidden> Find some GNU make tips at:
http://www.gnu.org http://make.paulandlesley.org
"Please remain calm...I may be mad, but I am a professional." --Mad Scientist