[OpenBIOS] [PATCH 1/1] [FCODE-utils] Allow overriding more Makefile vars

Mark Cave-Ayland mark.cave-ayland at ilande.co.uk
Mon Jan 18 00:13:20 CET 2016


On 16/01/16 17:48, Peter Lemenkov wrote:

> As a package maintainer I'd like to override some more Makefile
> variables. Namely:
> 
> * DESTDIR
> * strip command invokation (ability to suppress it by passing /bin/true
>   instead of /bin/strip)
> * pass custom gcc flags
> 
> This patch allows this. It does not break any existing workflows where
> it's not required to change these variables.
> 
> Signed-off-by: Peter Lemenkov <lemenkov at gmail.com>
> ---
>  detok/Makefile      | 6 +++---
>  romheaders/Makefile | 6 +++---
>  toke/Makefile       | 6 +++---
>  3 files changed, 9 insertions(+), 9 deletions(-)
> 
> diff --git a/detok/Makefile b/detok/Makefile
> index 3ba6c30..0e422fb 100644
> --- a/detok/Makefile
> +++ b/detok/Makefile
> @@ -24,13 +24,13 @@
>  
>  PROGRAM = detok
>  
> -DESTDIR = /usr/local
> +DESTDIR ?= /usr/local
>  CC      ?= gcc
> -STRIP	= strip
> +STRIP	?= strip
>  INCLUDES = -I../shared
>  
>  # Normal Flags:
> -CFLAGS  = -O2 -Wall #-Wextra
> +CFLAGS  ?= -O2 -Wall #-Wextra
>  LDFLAGS = 
>  
>  # Coverage:
> diff --git a/romheaders/Makefile b/romheaders/Makefile
> index a216e7b..1831036 100644
> --- a/romheaders/Makefile
> +++ b/romheaders/Makefile
> @@ -24,10 +24,10 @@
>  
>  PROGRAM = romheaders
>  
> -DESTDIR  = /usr/local
> +DESTDIR  ?= /usr/local
>  CC	 ?= gcc
> -STRIP    = strip
> -CFLAGS   = -O2 -Wall -Wextra
> +STRIP    ?= strip
> +CFLAGS   ?= -O2 -Wall -Wextra
>  INCLUDES = -I../shared
>  
>  SOURCES = romheaders.c ../shared/classcodes.c
> diff --git a/toke/Makefile b/toke/Makefile
> index aa75acd..8e31abd 100644
> --- a/toke/Makefile
> +++ b/toke/Makefile
> @@ -24,13 +24,13 @@
>  
>  PROGRAM = toke
>  
> -DESTDIR = /usr/local
> +DESTDIR ?= /usr/local
>  CC      ?= gcc
> -STRIP	= strip
> +STRIP	?= strip
>  INCLUDES = -I../shared
>  
>  # Normal flags
> -CFLAGS  = -O2 -Wall #-Wextra 
> +CFLAGS  ?= -O2 -Wall #-Wextra 
>  LDFLAGS =
>  
>  # Coverage:

Hi Peter,

Thanks for the patch! It looks reasonable to me - Segher, any thoughts?
Otherwise I don't see any reason why this couldn't be applied to SVN trunk.


ATB,

Mark.




More information about the OpenBIOS mailing list