[CRIU] [PATCHv2] tools.mk: Define CC if not set to 'default'

Cyrill Gorcunov gorcunov at gmail.com
Sat Apr 13 10:44:36 MSK 2019


On Fri, Apr 12, 2019 at 09:04:43AM +0100, Radostin Stoyanov wrote:
> 	FOO ?= bar
> 
> is equivalent to
> 
> 	ifeq ($(origin FOO), undefined)
> 	FOO = bar
> 	endif
> 
> However, when CC is not set its value is 'default' rather than
> 'undefined'.
> 
> From [1]:
> 
> 'undefined': if variable was never defined.
> 
> 'default': if variable has a default definition, as is usual with CC
> and so on. See Variables Used by Implicit Rules. Note that if you have
> redefined a default variable, the origin function will return the
> origin of the later definition.
> 
> [1] https://www.gnu.org/software/make/manual/make.html
> 
> Signed-off-by: Radostin Stoyanov <rstoyanov1 at gmail.com>
Acked-by: Cyrill Gorcunov <gorcunov at gmail.com>


More information about the CRIU mailing list