[PATCH] Makefile: Allow to override CPP variable

Date: Sat, 23 May 2015 16:02:08 +0200 Using the conditional assignment operator `?=` [1] instead of `=` makes it possible to override the variable `CPP` by using an environment variable $ CPP=cpp-5 make or directly setting it. $ make CPP=cpp-5 [1] https://www.gnu.org/software/make/manual/make.html#Setting Signed-off-by: Paul Menzel <paulepanter@users.sourceforge.net> --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 01cadda..63bff49 100644 --- a/Makefile +++ b/Makefile @@ -23,7 +23,7 @@ OBJCOPY=$(CROSS_PREFIX)objcopy OBJDUMP=$(CROSS_PREFIX)objdump STRIP=$(CROSS_PREFIX)strip PYTHON=python -CPP=cpp +CPP?=cpp IASL:=iasl LD32BIT_FLAG:=-melf_i386 -- 2.1.4

On Sat, May 23, 2015 at 04:15:47PM +0200, Paul Menzel wrote:
Date: Sat, 23 May 2015 16:02:08 +0200
Using the conditional assignment operator `?=` [1] instead of `=` makes it possible to override the variable `CPP` by using an environment variable
$ CPP=cpp-5 make
or directly setting it.
$ make CPP=cpp-5
I think picking up build definitions from the environment is confusing. The second form you show above should work today, and I think it is sufficient for those needing to override build definitions. -Kevin
participants (2)
-
Kevin O'Connor
-
Paul Menzel