Makefile: evaluate CCACHE and HOST{CC, CXX} at time of use
authorThomas Petazzoni <thomas.petazzoni@bootlin.com>
Fri, 23 Nov 2018 14:58:06 +0000 (15:58 +0100)
committerPeter Korsgaard <peter@korsgaard.com>
Mon, 26 Nov 2018 18:08:13 +0000 (19:08 +0100)
commit11e8c900ff085f3f9aad462f0369be5f801e1668
tree136a0b2536ffa5642e049e3d6b4d075c84d50119
parent897f84f262de6582568fb91ecf22e068564cb1f0
Makefile: evaluate CCACHE and HOST{CC, CXX} at time of use

As we are going to move to per-package SDK, the location of CCACHE and
therefore the definitions of HOSTCC and HOSTCXX need to be evaluated
at the time of use and not at the time of assignment. Indeed, the
value of HOST_DIR changes from one package to the other.

Therefore, we need to change from := to =.

In addition, while doing A := $(something) $(A) is possible, doing A =
$(something) $(A) is not legal. So, instead of defining HOSTCC in
terms of the current HOSTCC variable, we re-use HOSTCC_NOCCACHE
instead.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Makefile